Hello all,
I have been using SQL Alchemy for sometime now in a turbo gears
project. Recently, i wanted to write a small piece of python code
which has to do a few DB operations on the same DB which is used by my
TG project. so i decided to use the existing model.py file.
to my delight, as soon
-Original Message-
From: sqlalchemy@googlegroups.com
[mailto:sqlalch...@googlegroups.com] On Behalf Of abhishek
Sent: 20 January 2009 14:26
To: sqlalchemy
Subject: [sqlalchemy] how to use model.py file across
different applications
Hello all,
I have been using SQL Alchemy
Michael,
I read the expression language tutorial and found the section on
bindparam. So, here's what I came up with:
idworks = Table(
'ps_ih_idworks', metadata,
Column('emplid', String(11), primary_key=True),
Column('date_acquired', Date),
RAW columns have a max of 2000 bytes (http://www.orafaq.com/wiki/
RAW ). you want to create your table with a BLOB column for more than
that.
On Jan 20, 2009, at 11:12 AM, Gregg Parks wrote:
Michael,
I read the expression language tutorial and found the section on
bindparam. So,
On Tue, Jan 20, 2009 at 8:24 AM, a...@svilendobrev.com wrote:
mmh, cant really grasp what u want to do.
what are Line.* attributes?
.filter does and(), so this can be simplified:
q = query(Line).filter( models.Line.LineDiscarded == LineDiscarded )
if ...:
return q.filter( sites...)
unsubscribe
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
sqlalchemy group.
To post to this group, send email to sqlalchemy@googlegroups.com
To unsubscribe from this group, send email to
I'm trying to build up the model I need in my current project, but I'm
also having a few issues with implementing properties of the following
kind. I want to add a property to one of my mappers. This property is
supposed to refer to a different object, only given the id (primary
key of the table,
On Jan 20, 2009, at 11:34 AM, Georg Schmid wrote:
I'm trying to build up the model I need in my current project, but I'm
also having a few issues with implementing properties of the following
kind. I want to add a property to one of my mappers. This property is
supposed to refer to a
which join are u mentioning? and which result u want to save?
the query itself or the objects it returns after execution?
q = query(Line).join( Fiber, ...condition ).filter()
if ... return q.filter( 123...)
else: return q.filter( 456...)
building that q is not expensive;
saving it is fine
My apologies - I forgot to mention the photo field is a LONG RAW and
that the table already exists.
In the table definition the field is now defined as Column
('employee_photo', OracleRaw(10)) and code that is trying to write
to the table is:
u =
Thanks simon.
On Jan 20, 8:37 pm, King Simon-NFHD78 simon.k...@motorola.com
wrote:
-Original Message-
From: sqlalchemy@googlegroups.com
[mailto:sqlalch...@googlegroups.com] On Behalf Of abhishek
Sent: 20 January 2009 14:26
To: sqlalchemy
Subject: [sqlalchemy] how to use
On Jan 20, 5:45 pm, Michael Bayer mike...@zzzcomputing.com wrote:
On Jan 20, 2009, at 11:34 AM, Georg Schmid wrote:
I'm trying to build up the model I need in my current project, but I'm
also having a few issues with implementing properties of the following
kind. I want to add a
first, try this patch:
Index: lib/sqlalchemy/databases/oracle.py
===
--- lib/sqlalchemy/databases/oracle.py (revision 5695)
+++ lib/sqlalchemy/databases/oracle.py (working copy)
@@ -258,9 +258,19 @@
return process
On Jan 20, 2009, at 12:55 PM, Georg Schmid wrote:
On a side note, could you give me a hint on what's the difference
between deferred and lazy loading? I suspect it's exactly the same
thing, except one for columns only and the other one for relation()s.
that's the difference, yup. the
Hi ALL!
Does tometadata have to change foreign key schema name if it already
specified?
For example if I have column 'user_id' with 'system.users.id' FK -
tometadata change 'system' schema to SOME_SCHEMA. Is it ok, or
tometadata have to set schema to SOME_SCHEMA for street_id,
locality_id
I've got the following code to reflect an MS SQL 8 database using the
latest stable pyodbc, python 2.5, and SQLAlchemy 5.1:
engine = create_engine('mssql://userXXX:pass...@mydsn', echo=False)
meta = MetaData()
meta.bind = engine
artreqs = Table('tb_FSAR_Data_SampArtReq', meta, autoload=True,
send along what the CREATE TABLE for the table in question looks like.
On Jan 20, 2009, at 4:20 PM, Greg wrote:
I've got the following code to reflect an MS SQL 8 database using the
latest stable pyodbc, python 2.5, and SQLAlchemy 5.1:
engine =
If I understand, i only need to do that when I want to create a table.
I'm just trying to introspect an existing production database, not
create any new tables.
On Jan 20, 4:37 pm, Michael Bayer mike...@zzzcomputing.com wrote:
send along what the CREATE TABLE for the table in question looks
I'm just trying to introspect an existing production database, not
create any new tables.
The structure of the table is read when reflecting the table: it's likely
that an unusual column definition would trigger an error like this, and it
would be helpful to someone diagnosing the problem to
Hi,
I've got a query as follows:
from sqlalchemy.sql import text
gq = text(
SELECT decode_genotype(cell.snpval_id, snp.allelea_id,
snp.alleleb_id) FROM cell JOIN snp ON snp.fid =
cell.snp_id WHERE cell.patient_chipid IN ('DUKE1_plateA_A10.CEL',
'DUKE1_plateA_A11.CEL')
)
I want
this can be changed but the function still makes no sense. What if
you also said t3 = users.tometadata(metadata,
schema='SOME_SCHEMA') ? then you would want the system.users.id
FK to be changed.the tometadata() approach doesn't provide an API
that can take the use case of
On Jan 19, 2009, at 7:08 PM, Michael Bayer wrote:
relation, or add a flag such as single_parent=True, something like
that, since technically we should be doing something similar for
manytoone as well.
OK, single_parent=True is added to the trunk along with a bunch of new
tests. Try it
On Tue, Jan 20, 2009 at 4:26 PM, Michael Bayer mike...@zzzcomputing.com wrote:
On Jan 19, 2009, at 7:08 PM, Michael Bayer wrote:
relation, or add a flag such as single_parent=True, something like
that, since technically we should be doing something similar for
manytoone as well.
OK,
How do I go about doing this? Showing the create table?
On Jan 20, 4:54 pm, Rick Morrison rickmorri...@gmail.com wrote:
I'm just trying to introspect an existing production database, not
create any new tables.
The structure of the table is read when reflecting the table: it's likely
that
yeah i meant send along the CREATE TABLE to the mailing list here.
or a describe, whatever shows us what column type might be failing.
On Jan 20, 2009, at 9:45 PM, Greg wrote:
How do I go about doing this? Showing the create table?
On Jan 20, 4:54 pm, Rick Morrison
25 matches
Mail list logo