Re: [sqlalchemy] Is there a good ORM tutorial? And advice on parent/child management

2014-01-10 Thread Kevin Horn
han I'm solving right now. Or > maybe stick to what I know and drop back to the SQL core stuff. > There's certainly nothing wrong with using the SA Core, if that's what you're more comfortable with. Even just using the core is a big win over using bare SQL IMO, since it mak

Re: [sqlalchemy] Polymorphic joined-table inheritance

2014-01-10 Thread Kevin Horn
> > I have been looking at this code for quite some time and I can't figure > out what I am missing. > If any of you have any idea of what I could be possibly doing wrong, or > any ideas that I could > try, I will be very very happy to hear them, because I have run out of > ideas to try

Re: [sqlalchemy] Is there a good ORM tutorial? And advice on parent/child management

2014-01-10 Thread Kevin Horn
n more interested in a good "ORM for experienced SQL developers" > tutorial that tells me how the ORM differs from the core level (and where > its benefits lie). > > Thanks, > Paul > > -- > You received this message because you are subscribed to the Googl

Re: [sqlalchemy] Insert from JSON data (coping with unneeded fields and varying types)

2013-12-19 Thread Kevin Horn
bscr...@googlegroups.com. > To post to this group, send email to sqlalchemy@googlegroups.com. > Visit this group at http://groups.google.com/group/sqlalchemy. > For more options, visit https://groups.google.com/groups/opt_out. > -- -- Kevin Horn -- You received this message because

Re: [sqlalchemy] Creating Tables from a Schema defined in YAML

2013-08-22 Thread Kevin Horn
ns first, get them into a list or tuple, and then use "star args" to pass them into the Table constructor. Something like this: columns = [Column(name, type) for name, type in some_kind_of_iterable_generated_from_your_yaml] table = Table(theTableName, Metadata, *columns) though obviously that&#

Re: [sqlalchemy] automated mapping - sqlalchemy or sqlsoup or something else

2013-07-26 Thread Kevin Horn
ost to this group, send email to sqlalchemy@googlegroups.com. > Visit this group at http://groups.google.com/group/sqlalchemy. > For more options, visit https://groups.google.com/groups/opt_out. > > > -- -- Kevin Horn -- You received this message because you are subscribed to the

Re: [sqlalchemy]

2012-11-07 Thread Kevin Horn
On Fri, Nov 2, 2012 at 2:09 PM, Michael Bayer wrote: > > On Nov 2, 2012, at 1:25 PM, Kevin Horn wrote: > >> I'm trying to copy some tables from MySQL to PostgreSQL, and it looked >> like Table.tometadata() was exactly what I needed. >> >> However, it

[sqlalchemy]

2012-11-02 Thread Kevin Horn
I'm trying to copy some tables from MySQL to PostgreSQL, and it looked like Table.tometadata() was exactly what I needed. However, it's not working. I keep getting a SQL syntax error when trying to create the new table. -- sqlalchemy.exc.ProgrammingError: (ProgrammingError) syntax er

Re: [sqlalchemy] event interface

2010-12-30 Thread Kevin Horn
On Thu, Dec 30, 2010 at 11:50 AM, Michael Bayer wrote: > the twitterstream is leaning a lot towards not having the "on_", we'll see > what happens as the day goes on. > > For what it's worth, I think it's fine. It makes the interface seem very obvious to me. Kevin -- You received this message

Re: [sqlalchemy] Table as dictionary?

2010-01-15 Thread Kevin Horn
make your mapped object behave like a dictionary by using __getitem__(), __setitem__(), etc. I don't know enough about SQLAlchemy internals to know whether that would interfere with anything SQLAlchemy itself is doing though. Kevin Horn -- You received this message because you are subscribed to t

[sqlalchemy] Re: vertical partitioning

2009-09-30 Thread Kevin Horn
nal offence. >-- E. Dijkstra, 1975 > Check out the "Customizing Column Properties" in the Mapper Configuation docs: http://www.sqlalchemy.org/docs/05/mappers.html#customizing-column-properties If I understand correctly, this should do what you want. (Disclaimer: haven't

[sqlalchemy] Re: Inheritance + Pseudo-adjacency-list?

2009-09-23 Thread Kevin Horn
#x27;employees', order_by=id)) __mapper_args__ = {'polymorphic_identity':'person'} def __init__(self, first_name, middle_init, last_name): self.first_name = first_name self.middle_init = middle_init self.last_name = last_name def __repr__(se

[sqlalchemy] Re: Inheritance + Pseudo-adjacency-list?

2009-09-23 Thread Kevin Horn
On Wed, Sep 23, 2009 at 10:57 AM, Kevin Horn wrote: > > > On Wed, Sep 23, 2009 at 12:27 AM, Michael Bayer > wrote: > >> >> >> On Sep 22, 2009, at 11:59 AM, Kevin H wrote: >> >> > >> > I'm having some trouble developing

[sqlalchemy] Re: Inheritance + Pseudo-adjacency-list?

2009-09-23 Thread Kevin Horn
le...I didn't even notice that. > None of this would cause the wrong "Company" to come back from a > simple query by id, though. If that is really the effect you're > seeing then something more fundamental might be amiss. > Looking at it again, it looks like this was