[sqlalchemy] Re: Collation and Column()

2010-02-11 Thread Christoph Burgmer
Thanks for your quick answer,

On Feb 11, 1:32 am, Michael Bayer mike...@zzzcomputing.com wrote:

 if SQLite supports a COLLATE syntax, then sure we can accept patches for 0.6 
 /trunk.

 If you want instant gratification on sqlite just build yourself a 
 UserDefinedType for now (again 0.6/trunk).

The library I'm developing for still depends on 0.4.8+ so instant
gratification is needed for much earlier versions. I'm thinking about
adapting the SQLAlchemy types and injecting my private class. Any
hooks I need to know about? A better solution?

-Christoph

-- 
You received this message because you are subscribed to the Google Groups 
sqlalchemy group.
To post to this group, send email to sqlalch...@googlegroups.com.
To unsubscribe from this group, send email to 
sqlalchemy+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en.



[sqlalchemy] Re: Collation and Column()

2010-02-11 Thread Christoph Burgmer
On Feb 11, 2:20 pm, Michael Bayer mike...@zzzcomputing.com wrote:

 0.4.8 you'd subclass TypeEngine.   I don't think theres too much surprising 
 going on there with types, plus sqlite accepts only unicode strings these 
 days anyway so that's sort of handled too.

Thanks, that looks promising.

I'll look into 0.6 SQLite later on.

-Christoph

-- 
You received this message because you are subscribed to the Google Groups 
sqlalchemy group.
To post to this group, send email to sqlalch...@googlegroups.com.
To unsubscribe from this group, send email to 
sqlalchemy+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en.



[sqlalchemy] Collation and Column()

2010-02-10 Thread Christoph Burgmer
Having collations on a per-column basis in MySQL and SQLite, I'd like
to specify the collation when creating tables/views. I have been
trying google and source for some hours now, and it seems there's just
no way to handle it easily with SA.
MySQL has support via private VARCHAR, but SQLite has nothing similar.
Generic support is absent.

Could a simple CP of this functionality give SQLite similar support?
I'd file a patch then.

Is there any other way to select a collation via SA, either globally,
or via text() or similar?

I'd hate to completly rewrite the CREATE TABLE statements.

-Christoph

-- 
You received this message because you are subscribed to the Google Groups 
sqlalchemy group.
To post to this group, send email to sqlalch...@googlegroups.com.
To unsubscribe from this group, send email to 
sqlalchemy+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en.



[sqlalchemy] Re: Simple view on multiple databases

2010-01-24 Thread Christoph Burgmer
On Jan 24, 3:52 am, Michael Bayer mike...@zzzcomputing.com wrote:
  As far as your pick one table with given name X and ignore the others 
 behavior that's some kind of registry logic you'd have to build yourself.

Is there an easy way to replicate metadata.tables[]? Inserting my own
dict object instead might not promise future compatibility. I need to
keep track of new and deleleted table objects.
-Christoph

-- 
You received this message because you are subscribed to the Google Groups 
sqlalchemy group.
To post to this group, send email to sqlalch...@googlegroups.com.
To unsubscribe from this group, send email to 
sqlalchemy+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en.



[sqlalchemy] Re: Simple view on multiple databases

2010-01-24 Thread Christoph Burgmer
On Jan 24, 3:19 pm, Michael Bayer mike...@zzzcomputing.com wrote:
 On Jan 24, 2010, at 4:14 AM, Christoph Burgmer wrote:

  On Jan 24, 3:52 am, Michael Bayer mike...@zzzcomputing.com wrote:
  As far as your pick one table with given name X and ignore the others 
  behavior that's some kind of registry logic you'd have to build yourself.

  Is there an easy way to replicate metadata.tables[]? Inserting my own
  dict object instead might not promise future compatibility. I need to
  keep track of new and deleleted table objects.

 its a dictionary that uses table.key as keys and the Table object as values.  
 table.key as you know is schema.name or just name.  that's pretty 
 much it.   The only intricacy with MetaData is that Table objects might 
 reference each other with ForeignKeys.   If you don't have any of those, 
 tables can be swapped in and out freely.

I have implemented a dictionary that does lazy lookup of Table objects
using their simple names and is used now instead of the one provided
by MetaData. As data is relatively stable/should be modified in a way
stipulated by the library this currently seems enough logic for my use
case. A nice gimmick for the future though would be a trigger for
syncing updates with the MetaData class.

If anybody is interested, source code went into:
http://code.google.com/p/cjklib/source/browse/trunk/cjklib/dbconnector.py?spec=svn245r=245

-- 
You received this message because you are subscribed to the Google Groups 
sqlalchemy group.
To post to this group, send email to sqlalch...@googlegroups.com.
To unsubscribe from this group, send email to 
sqlalchemy+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en.