Hi Michael,
On Apr 20, 11:20 am, Michael Bayer <[email protected]> wrote:
> yeah that is pretty awful, Oracle is super picky about names, and there's
> already a lot of stuff to appease its limitations with bind parameters. The
> bind name is ultimately derived from the "key" of the column so this would
> change the name:
>
> Table("my_table", metadata, Column("100K_Name", String,
> key="hundredkname"), autoload=True)
Thank you for the key tip. For now I'll do something like this:
---8<---
FOUNDDIGITNAME=False
digitcols = []
for c in vals:
if re.match('^[0-9]',c):
digitcols.append(c)
FOUNDDIGITNAME=True
if FOUNDDIGITNAME:
cols = []
for dc in digitcols:
dckey='dc_' + dc
col = Column(dc,site_tbl.c[dc].type,key=dckey)
cols.append(col)
vals[dckey]=vals[dc]
del vals[dc]
site_tbl = Table('TBL_SITE',
metadata,
*cols,
schema='foo',
useexisting=True,
autoload=True
)
---8<---
> beyond using the key thing, which changes how you reference the column object
> in Python, we'd have to dig into the core and handle this case.
This would be a great rainy day project.
Kind Regards,
Sirko
--
You received this message because you are subscribed to the Google Groups
"sqlalchemy" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sqlalchemy?hl=en.