Re: [sqlalchemy] Why is there no SQLA-List class?

2015-08-03 Thread Adam Tauno Williams
Quoting c.bu...@posteo.jp: I know that in most all RDBMS are no implementations of lists or arrays. On the contrary - and emphatically - just about every modern RDMBS supports collection types including lists, sets, multi-sets, and key-value data. This support has been in most databases

Re: [sqlalchemy] HSTORE Column Update

2013-11-18 Thread Adam Tauno Williams
for the synchronize_session parameter. -- Adam Tauno Williams mailto:awill...@whitemice.org GPG D95ED383 Systems Administrator, Python Developer, LPI / NCLA signature.asc Description: This is a digitally signed message part

Re: [sqlalchemy] HSTORE Column Update

2013-11-18 Thread Adam Tauno Williams
) prefs = Column('prefs', MutableDict.as_mutable(HSTORE)) -- Adam Tauno Williams mailto:awill...@whitemice.org GPG D95ED383 Systems Administrator, Python Developer, LPI / NCLA -- You received this message because you are subscribed to the Google Groups sqlalchemy group. To unsubscribe from

[sqlalchemy] [SOLVED] HSTORE Column Update

2013-11-18 Thread Adam Tauno Williams
cannot wait till PG9.4 nested HSTORE support. Very cool stuff. -- Adam Tauno Williams mailto:awill...@whitemice.org GPG D95ED383 Systems Administrator, Python Developer, LPI / NCLA -- You received this message because you are subscribed to the Google Groups sqlalchemy group. To unsubscribe

Re: [sqlalchemy] [SOLVED] HSTORE Column Update [DELETE KEY]

2013-11-18 Thread Adam Tauno Williams
, %(param_1)s) WHERE user_data.prefs ? %(prefs_1)s {'prefs_1': 'inboundBusStop', 'param_1': 'inboundBusStop'} -- Adam Tauno Williams mailto:awill...@whitemice.org GPG D95ED383 Systems Administrator, Python Developer, LPI / NCLA -- You received this message because you are subscribed

[sqlalchemy] HSTORE Column Update

2013-11-17 Thread Adam Tauno Williams
, for the HSTORE type, to update the existing value, not just assign a value to it. -- Adam Tauno Williams mailto:awill...@whitemice.org GPG D95ED383 Systems Administrator, Python Developer, LPI / NCLA -- You received this message because you are subscribed to the Google Groups sqlalchemy group

[sqlalchemy] PG's JSON Data Type

2013-11-17 Thread Adam Tauno Williams
Tauno Williams mailto:awill...@whitemice.org GPG D95ED383 Systems Administrator, Python Developer, LPI / NCLA -- You received this message because you are subscribed to the Google Groups sqlalchemy group. To unsubscribe from this group and stop receiving emails from it, send an email to sqlalchemy

Re: [sqlalchemy] Self-Referential scalar query as column_property [SOLVED]

2013-10-03 Thread Adam Tauno Williams
of the model definition [it is a complex model] gets sort of smeared. This works perfectly. -- Adam Tauno Williams mailto:awill...@whitemice.org GPG D95ED383 Systems Administrator, Python Developer, LPI / NCLA -- You received this message because you are subscribed to the Google Groups sqlalchemy

Re: [sqlalchemy] Self-Referential scalar query as column_property

2013-10-01 Thread Adam Tauno Williams
On Mon, 2013-09-30 at 13:35 -0400, Michael Bayer wrote: On Sep 30, 2013, at 1:25 PM, Adam Tauno Williams awill...@whitemice.org wrote: I have a table named project [class Project] which relates to records in table job [class Task]. I can add a column_property to Project so that I get

[sqlalchemy] Self-Referential scalar query as column_property

2013-09-30 Thread Adam Tauno Williams
extend_existing=True for adding to a class mapper... but I can't find an example of the syntax that works. -- Adam Tauno Williams mailto:awill...@whitemice.org GPG D95ED383 Systems Administrator, Python Developer, LPI / NCLA -- You received this message because you are subscribed to the Google Groups

[sqlalchemy] Can an association_proxy fill in the gaps?

2012-07-30 Thread Adam Tauno Williams
I have two classes Contact and CompanyInfo that should exist in a 1:1 relation; CompanyInfo contains a comment related to Contact. This works - class Contact(Base, KVC): ... _info = relation( 'CompanyInfo', uselist = False, backref = backref(

Re: [sqlalchemy] Re: PostgreSQL hstore custom type?

2012-05-21 Thread Adam Tauno Williams
On Tue, 2012-05-15 at 00:24 -0700, Kyle Schaffrick wrote: On Mon, Apr 30, 2012 at 8:52 AM, Adam Tauno Williams Sure, my original version was the attachment here: http://groups.google.com/group/sqlalchemy/msg/6f7284341ab69164 FYI, for anyone looking for hstore.py in the future I've put

Re: [sqlalchemy] Syntax Error on *legitimate* statement using Informix dialect [SOLVED]

2012-05-17 Thread Adam Tauno Williams
On Tue, 2012-05-15 at 20:32 -0400, Adam Tauno Williams wrote: On Tue, 2012-05-15 at 19:51 -0400, Adam Tauno Williams wrote: On Tue, 2012-05-15 at 16:27 -0400, Michael Bayer wrote: Could be tough, you'd need to test it against the informix dbapi directly, using bound parameters

Re: [sqlalchemy] Best and easy web framwork for sqlalchemy

2012-05-17 Thread Adam Tauno Williams
On Thu, 2012-05-17 at 13:23 +0200, Matteo Boscolo wrote: (1) - Do not hi-jack threads! I'm looking for a good web framework to show my sqlalchemy information on the web. I google and I found several solution like piramid,django, glashammer,flask but I' do not know exactly witch is the more

[sqlalchemy] Syntax Error on *legitimate* statement using Informix dialect

2012-05-15 Thread Adam Tauno Williams
I'm use the Informix dialog with SQLalchemy 0.7.7 (the latest 0.7.x release). It works. But now I'm getting this error - sqlalchemy.exc.ProgrammingError: (ProgrammingError) SQLCODE -201 in PREPARE: 42000: Syntax error or access violation 'SELECT xrefr.xr_serial_no AS xrefr_xr_serial_no,

Re: [sqlalchemy] Syntax Error on *legitimate* statement using Informix dialect

2012-05-15 Thread Adam Tauno Williams
, 2012, at 11:36 AM, Adam Tauno Williams awill...@whitemice.org wrote: I'm use the Informix dialog with SQLalchemy 0.7.7 (the latest 0.7.x release). It works. But now I'm getting this error - sqlalchemy.exc.ProgrammingError: (ProgrammingError) SQLCODE -201 in PREPARE: 42000: Syntax error

Re: [sqlalchemy] Syntax Error on *legitimate* statement using Informix dialect [SOLVED]

2012-05-15 Thread Adam Tauno Williams
On Tue, 2012-05-15 at 19:51 -0400, Adam Tauno Williams wrote: On Tue, 2012-05-15 at 16:27 -0400, Michael Bayer wrote: Could be tough, you'd need to test it against the informix dbapi directly, using bound parameters, to see what it needs. Could be a typing issue. Ok, I got a response

Re: [sqlalchemy] Re: PostgreSQL hstore custom type?

2012-04-30 Thread Adam Tauno Williams
On Sun, 2012-04-15 at 05:32 -0700, Kyle Schaffrick wrote: Wow, a blast from the past! :) Yes. Which version of SQLAlchemy does your new version work with? It's great that you are now able to get rid of the HStoreComparator, that really makes it easier to use. The version of SQLA I was

Re: [sqlalchemy] Sequences, Primary Keys, Relations

2012-02-25 Thread Adam Tauno Williams
On Thu, 2012-02-23 at 14:49 -0500, Adam Tauno Williams wrote: I have a database where multiple objects use the same sequence to generate primary keys - class ProjectInfo(Base, KVC): __tablename__ = 'project_info' object_id = Column(project_info_id, Integer

[sqlalchemy] Sequences, Primary Keys, Relations

2012-02-23 Thread Adam Tauno Williams
I have a database where multiple objects use the same sequence to generate primary keys - class ProjectInfo(Base, KVC): __tablename__ = 'project_info' object_id = Column(project_info_id, Integer, Sequence('key_generator'),

[sqlalchemy] Clas ... does not have a mapped column named [moving to 0.7.4]

2012-01-06 Thread Adam Tauno Williams
I'm updating my code to work with 0.7.4; and I have a class that is derived from two tables.I'm looking at http://www.sqlalchemy.org/docs/orm/mapper_config.html#mapping-a-class-against-multiple-tables but I'm not having any luck. When I try to operate on the database the first time it

[sqlalchemy] SQLalchemy, PostgreSQL/tsearch/ts_rank_cd

2011-12-23 Thread Adam Tauno Williams
I'm stumped how to build the following query in SQLalchemy: SELECT title, ts_rank_cd(textsearch, query) AS rank FROM apod, to_tsquery('neutrino|(dark matter)') query WHERE query @@ textsearch ORDER BY rank DESC LIMIT 10; I can do tsearch operations; but I can't figure out the syntax for this

[sqlalchemy] PostgreSQL HSTORE Support?

2011-07-26 Thread Adam Tauno Williams
://www.mail-archive.com/sqlalchemy@googlegroups.com/msg19441.html -- Adam Tauno Williams awill...@whitemice.org LPIC-1, Novell CLA http://www.whitemiceconsulting.com OpenGroupware, Cyrus IMAPd, Postfix, OpenLDAP, Samba -- You received this message because you are subscribed to the Google Groups

[sqlalchemy] extract / PostgreSQL / Birthdays

2010-10-12 Thread Adam Tauno Williams
Database: PostgreSQL 8.4.4 SQLAlchemy: 0.6 I attempting to query the database for contacts with a recent or upcoming birthday. So -- doy = datetime.today().timetuple().tm_yday floor = doy - 2 if (floor 1): floor +=365 ceiling = doy + 14 if (ceiling 365): ceiling -= 365 db.query(Contact).\

Re: [sqlalchemy] extract / PostgreSQL / Birthdays

2010-10-12 Thread Adam Tauno Williams
On Tue, 2010-10-12 at 14:20 -0400, Michael Bayer wrote: On Oct 12, 2010, at 1:59 PM, Adam Tauno Williams wrote: Database: PostgreSQL 8.4.4 SQLAlchemy: 0.6 I attempting to query the database for contacts with a recent or upcoming birthday. So -- doy = datetime.today().timetuple

Re: [sqlalchemy] Is ORM the right choice for large scale data manipulation?

2010-07-07 Thread Adam Tauno Williams
to use an ORM - as it automates much of the plumbing and is very well tested. -- Adam Tauno Williams awill...@whitemice.org LPIC-1, Novell CLA http://www.whitemiceconsulting.com OpenGroupware, Cyrus IMAPd, Postfix, OpenLDAP, Samba -- You received this message because you are subscribed to the Google

[sqlalchemy] Column X on class Y conflicts with existing column Z

2010-06-24 Thread Adam Tauno Williams
, in _as_declarative (c, cls, inherited_table.c[c.name]) sqlalchemy.exc.ArgumentError: Column 'title' on class class 'coils.foundation.alchemy.doc.Folder' conflicts with existing column 'doc.title' /error -- Adam Tauno Williams awill...@whitemice.org LPIC-1, Novell CLA http://www.whitemiceconsulting.com

[sqlalchemy] SET TRANSACTION ISOLATION LEVEL must be called before any query

2010-05-09 Thread Adam Tauno Williams
I have an large SQLalchemy based project that has been working perfectly - until I added a single query which seems to frequently crash with the following error. Is the SET TRANSACTION ISOLATION LEVEL must be called before any query error the cause of the problem or possibly being raised by an

[sqlalchemy] '_TextClause' object has no attribute 'foreign_keys'

2010-02-03 Thread Adam Tauno Williams
I'm trying to convert a working non-declarative map of a two-entity table to declarative style, but the join always fails with '_TextClause' object has no attribute 'foreign_keys' NON-DECLARATIVE STYLE (WORKING) -- engine =

Re: [sqlalchemy] '_TextClause' object has no attribute 'foreign_keys'

2010-02-03 Thread Adam Tauno Williams
On Wed, 2010-02-03 at 10:55 -0500, Michael Bayer wrote: Adam Tauno Williams wrote: x3 = join(x1, x2) join() here is: http://www.sqlalchemy.org/docs/reference/sqlalchemy/expressions.html#sqlalchemy.sql.expression.join it knows nothing about classes x1 and x2 and interprets them as text. You

[sqlalchemy] Columns in joined entity [Was: '_TextClause' object has no attribute 'foreign_keys]

2010-02-03 Thread Adam Tauno Williams
FYI: Upgraded to SQLalchemy 0.5.8 A class produces using __table__ instead of __tablename__ provides the field names as in the database, not as mapped in the joined objects (below: x1, x2). [example: I can use x3.job_id but task_id fails.] And trying to set columns in the derived class like:

Re: [sqlalchemy] Re: Two Table Entity In Declarative Style [$50!]

2010-01-26 Thread Adam Tauno Williams
On Tue, 2009-10-06 at 09:56 -0400, Michael Bayer wrote: Adam Tauno Williams wrote: But I have one 1:1 relation in my database that would be much easier to model as just one object. job_history job_history_info

Re: [sqlalchemy] Re: Two Table Entity In Declarative Style [$50!]

2010-01-26 Thread Adam Tauno Williams
On Tue, 2010-01-26 at 07:36 -0500, Adam Tauno Williams wrote: On Tue, 2009-10-06 at 09:56 -0400, Michael Bayer wrote: Adam Tauno Williams wrote: But I have one 1:1 relation in my database that would be much easier to model as just one object. job_history

[sqlalchemy] Two Table Entity In Declarative Style

2009-10-06 Thread Adam Tauno Williams
I'm using SQLAlchemy 0.5.4p2 with Python 2.6.0. So far all of my model has been in the declarative style - class Task(Base): An OpenGroupare Task object __tablename__ = 'job' object_id = Column(job_id, Sequence('key_generator'),