UGGG! I have been fighting with this for a while. I never thought to
just use an actual file for my db instead of using memory. I was
using memory because I was only wanting to test things and didn't want
to keep the data. Seems that perhaps due to cherrypy the database was
being deleted. I
Yeah!
That's what I was looking for...and I didn't find. Actually I'm using
a declarative model thru declarative_base: every column in the table
is an attribute in the class, so I have a column very similar to the
one you wrote.
The problem was that I was looking for generator instead of
I just discovered answer for myself:
from sqlalchemy.orm.properties import RelationProperty
from sqlalchemy.orm import class_mapper
def foo(entity_class, collection_property):
rel_prop = class_mapper(entity_class, compile=False).get_property
(collection_property)
related_entity_class =
On Wed, Aug 5, 2009 at 08:16, kportertxkporte...@gmail.com wrote:
O on a side note would you recommend elixir over declarative_base?
The biggest difference between the two is that Elixir can generate
some columns and tables for you (using common patterns). Michael
Bayer probably won't
On Wed, Aug 5, 2009 at 08:13, kportertxkporte...@gmail.com wrote:
UGGG! I have been fighting with this for a while. I never thought to
just use an actual file for my db instead of using memory. I was
using memory because I was only wanting to test things and didn't want
to keep the data.
Netezza = data warehouse appliance server
1. yes its SQL
2. I can connect to it via pyodbc
ok will take a look at it :)
On Aug 4, 4:52 pm, Michael Bayer mike...@zzzcomputing.com wrote:
dusans wrote:
Is there a possibility to connect to Netezza db server?
to use SQLalchemy with a certain
Hi all,
I'm trying to share an object with a thread, I already tryed to use
Session.merge but I'm doing something wrong,
here is a test case:
from sqlalchemy import
*
from sqlalchemy.orm import
*
e = create_engine('postgres://postgres:postg...@127.0.0.1/test',
echo=True)
m = MetaData(e)
t1 =
a link to a example would be nice. tnx :)
On 4 avg., 16:52, Michael Bayer mike...@zzzcomputing.com wrote:
dusans wrote:
Is there a possibility to connect to Netezza db server?
to use SQLalchemy with a certain backend, you have to answer these questions:
1. is it SQL ?
2. is there a
I have a fairly complex SQL query which looks like this:
sql.or_(
sql.and_(model.SurveyTreeItem.type==module,
model.SurveyTreeItem.skip_children==False,
sql.exists().correlate(model.Risk.__table__).where(sql.and_(
a link to a example would be nice. tnx :)
what would be the simplest interface that only performes SELECT,
INSERT, UPDATE, DELETE (netezza uses standard sql for that...)
since i dont want to create tables with sqlalchemy... netezza has a
bit different syntax and more simple types
btw. netezza
SQL precedence will evaluate the AND's before the OR's. So unless there is
an OR condition embedded within a series of AND's the parenthesis are not
needed. I do agree that using parenthesis can make the intent clearer, but
will not change the result.
The clauses
a AND b OR c
(a AND b) OR
Hi,
I have been working on supporting spatial data types and spatial
operations on SQLAlchemy as my summer of code project. The code is
available at http://bitbucket.org/sanjiv/geoalchemy/ and a demo TG2
app using it is at http://geo.turbogears.org/ .
I started out by following the postgis
That was exactly the conclusion I reached before I read your reply. I
modeled it that way and it seems to work perfectly. Guess I was just
overthinking it.
Thanks for getting back to me, Mike.
On Aug 3, 11:41 pm, Michael Bayer mike...@zzzcomputing.com wrote:
On Aug 3, 2009, at 5:21 PM,
On Jul 28, 12:17 pm, David Gardner dgard...@creatureshop.com wrote:
Just thought I would toss in my 2-cents here, since I have lots of
hierarchical data and have
at one time or another used most of the below methods.
Choice #1 is the option that I have found that works the best.
I Use a
Seems that once I defined a scoped session as:
Session = scoped_session(sessionmaker())
I can switch to a non scoped session simply calling:
sess=Session()
infact:
sess=Session
sess
sqlalchemy.orm.scoping.ScopedSession object at 0x1debbd0
sess=Session()
sess
sqlalchemy.orm.session.Session
Hello,
Where do you folks recommend storing the database connection string in
my application. Clearly not in the same file with my declaratively
defined model objects.
And more generally, how do you recommend laying out an SQLAlchemy
based application? (In what files to define the engine,
16 matches
Mail list logo