backwards to get the right URL.
On 05/17/2016 10:42 AM, robert rottermann wrote:
Hi there,
I try to access a firebird db on windows from my ubuntu box.
I have a gui-tool (FlameRobin), from which this works nicely. Therefore
it is not a firewall or access problem.
Now I would like to do
Hi there,
I try to access a firebird db on windows from my ubuntu box.
I have a gui-tool (FlameRobin), from which this works nicely. Therefore
it is not a firewall or access problem.
Now I would like to do it using python and sqlalchemy.
So far I failed..
This is the connection string I use:
Hi there,
DB: mysql 5.5.46-0ubuntu0.12.04.2
Python: 2.7.3
SQLAlchemy-1.0.9-py2.7-linux-x86_64.egg
snippet that provokes trace back:
c = tblMembership.__table__.c
records = session.query(tblMembership).filter(c['idPerson'] ==
member_id).all()
I use a zope/plone python
Hi there,
I try to run the sample at:
http://docs.sqlalchemy.org/en/rel_0_9/_modules/examples/postgis/postgis.html
but I get the following traceback:
Traceback (most recent call last):
File scripts/test_geom.py, line 18, in module
class BinaryGisElement(GisElement, expression.Function):
Hi there,
I have a mysql database that I use on several linux boxes.
No I get the following error on on of them:
Traceback (most recent call last):
File ../bin/zopepy, line 317, in module
execfile(__file__)
File t.py, line 38, in module
BaseA.metadata.reflect(local_engine_a)
File
Hi there,
I have a bunch of mysql tables.
Up to now I did not define their structure in python but used
Base.metadata.reflect(engine)
No I started to define their structure in Python and stumbled over the fact,
that I do not understand
how ForeignKeyConstraint should be used correctly.
The
the string you are generating must be proper sql.
to test is you migth print it and try in directly against the db.
but what you show us is for sure no valid sql. In sql the equality operator is
not '==' but '='.
robert
On 22/12/11 06:34, Sana klh wrote:
I am getting the following error
Hi there,
after Upgrading sqlalchemy to V 0.7.x i get the following error
Traceback (innermost last):
Module ZPublisher.Publish, line 126, in publish
Module ZPublisher.mapply, line 77, in mapply
Module ZPublisher.Publish, line 46, in call_object
Module wrapper, line 5, in wrapper
hi there,
for a zope website I am using sqlalchemy.
Now I am unsure how to use the session object.
What I do now is:
from sqlalchemy.orm import scoped_session
...
Session = scoped_session(session_factory, scopefunc)
session = Session()
this session object I import into all classes where ever I
Hi there,
when testing one of my routines I get a strange error.
SystemError: null argument to internal routine
this is the method I call:
def getExistingDoktypes(self, typid=0):
return tuple with ((typid, typ), ((typid1, typ1), (typid2, typ2), ..))
session =
this was caused by some error erlier error that somehow messed up the test
environment.
thanks for listening
robert
Am 11.03.2011 10:23, schrieb robert rottermann:
Hi there,
when testing one of my routines I get a strange error.
SystemError: null argument to internal routine
hi there,
up to now I did use something like:
c = tblCompany.__table__.columns
COMPANY_FIELDS = [(k, c[k].type.get_col_spec()) for k in c.keys() if not
k=='id']
to build some dynamic forms for a web application.
now this breaks with an error:
AttributeError: 'VARCHAR' object has no
hi there
i get an error:
Could not determine relationship direction for primaryjoin condition
'cisdata.`ID_cis` = cisbr.`ID_cisbr`', on relationship Branchen.branche.
Do the columns in 'foreign_keys' represent only the 'foreign' columns in
this join condition ?
when I use the following
hi there
I would like to define a m:n relation between two tables that are linked by an
association table.
I am using MySQL 5.1 and SA 0.6.3
this is the select that I want to implement:
select * from
cisdata c,
cisbr cb
branchen b,
where c.ID_cis = cb.ID_cisbr and cb.ID_br
hi there,
I am using a one to many relation, and would like the result to be ordered by a
field of the child table. however no order by statement is executed when I
access the related property of the parent object.
this is my declaration:
mitarbeiter_table = Table('mitarbeiter',
thanks
robert
Gaetan de Menten schrieb:
On Wed, Oct 14, 2009 at 08:34, robert rottermann rob...@redcor.ch wrote:
I am using a one to many relation, and would like the result to be ordered
by a
field of the child table. however no order by statement is executed when I
access the related
it. is this possible?
thanks again
robert
On Aug 23, 2009, at 4:23 PM, robert rottermann wrote:
Hi there,
I would like to create a batching functionality for a web based
aplication that
uses a mysql database.
mysql offeres SQL_CALC_FOUND_ROWS for this purpose.
how can I use
session.query(...).from_statement(q.statement.prefix_with
(SQL_CALC_FOUND_ROWS...))
On Aug 29, 2009, at 2:47 AM, robert rottermann wrote:
Michael Bayer schrieb:
use the prefixes argument to select() for this.
thanks very much.
it it possible to use this somehow with session.query?
I do
Hi there,
I would like to create a batching functionality for a web based aplication that
uses a mysql database.
mysql offeres SQL_CALC_FOUND_ROWS for this purpose.
how can I use it, or is there a generic way to have sqlalchemy return the number
of rows a query would have returned without
Werner F. Bruhin schrieb:
Robert,
robert rottermann wrote:
...
however I would like to change the assignMyselfToCompany method in a way
that I
could achieve the same with:
product = tblProducts_kl()
product.assignMyselfToCompany(company_id)
Unless you do some more things in your
hi there,
how can an instance of a class with a Table bound to it
access the values of the values of its db record?
what I would like to do is something like the following:
class company(Base):
__table__ = 'tblCompany'
...
def listAssignedProducts(self):
print assigned products
hi there,
I am using sqlalchemy 0.5.3
with the following declaration:
# membership
class tblMembershiptype(Base2):
__table__ = tables2[tblMembershiptype]
company_members = relation(
tblCompany,
secondary=tables2[tblMembership],
backref='membershiptyp',
)
Hi there,
I would like to have a dictionary like collection based on one of the
collections provided by sa like attribute_mapped_collection.
now my question: May I use id which is autogenerated and primary key as the
controlling attribute of the collection like:
flagged_companies =
Hi there,
i have two tables that are lined trouh association table.
now on the developpment box every thing works fine. but on the live db it does
not work.
insted I get the following error.
Could not determine join condition between parent/child tables on relation
dokumentCL.verteiler.
here are my mappings and the tbl definition
thanks again
robert
engine_factory = EngineFactory(DSN) #, echo=True)
SCOPED_SESSION_NAME = SESSIONNAME
engine = engine_factory()
Base = declarative_base(engine)
Base.metadata.reflect()
tables = Base.metadata.tables
class verteilerCL(Base):
reflection for that table.
this works now. thanks
robert
On Feb 19, 2009, at 10:37 AM, robert rottermann wrote:
here are my mappings and the tbl definition
thanks again
robert
engine_factory = EngineFactory(DSN) #, echo=True)
SCOPED_SESSION_NAME = SESSIONNAME
engine = engine_factory
Hi there,
I have a table tblPerson that has a m:n relation with a table tblFlag using an
association table tblCompany_has_Flag
now I would like to find all persons, that do not have assigned any of list of
flags.
what I have tried among other things is the following:
s =
hi there,
when I try to reflect a postges db like this:
Base2 = declarative_base(engine)
Base2.metadata.reflect()
I get a key error (see below).
however, if I define its class using autoload, things are fine
class dokstatus(Base2):
#__table__ = tables2[dokstatus]
__tablename__ =
hi there
I have a class tblMembershiptypeTable which I defind using declarative notation
now I wold like to issue a query that returns instances of this class
session.query(tblMembershiptypeTable).filter_by(name=mtype).all()[0]
works as expected.
whereas
t = tblMembershiptypeTable.__table__
mt
found it out myself:
related_persons = orm.relation(tblPersonTable,
secondary=tblPersonCompanyTable, backref=company)
must be
related_persons = orm.relation(tblPersonTable,
secondary=tblPersonCompanyTable.__table__, backref=company)
have a good time
robert
robert
Hi there,
I have a query like:
sesion.query(MytableTable)
which returns a huge numer of recors.
now I would like to iterate trough the records.
What method should I use?
sesion.query(MytableTable).all() returns all
and next or fetchone is not defined.
thanks for your help
robert
Hi there,
I try to grasp relations ..
I have an m:n association between two tables.
this is what I do:
engine = sa.create_engine('mysql://[EMAIL PROTECTED]/energie_2', echo=True)
Session = sessionmaker(bind=engine)
session = Session()
this is what I have:
tblPersonTable and tblSupplierTable
found it out myself.
a commit was missing
thanks for your time
robert
robert rottermann schrieb:
Hi there,
I try to grasp relations ..
I have an m:n association between two tables.
this is what I do:
engine = sa.create_engine('mysql://[EMAIL PROTECTED]/energie_2', echo=True)
Session
hi there,
I would like to add entries to an and_ clause dinamycally like:
and_clause = and_()
if x:
add sommething to and_clause
if y:
add sommething to and_clause
..
how would I do that
thanks
robert
--~--~-~--~~~---~--~~
You received this message because
jason kirtland schrieb:
robert rottermann wrote:
thanks jason,
jason kirtland schrieb:
robert rottermann wrote:
Hi there,
I am building a zope/plone site that uses sqlalchemy (collective.lead).
on two systems I am developping on everything works fine, a third one
Hi there,
I am building a zope/plone site that uses sqlalchemy (collective.lead).
on two systems I am developping on everything works fine, a third one that
has 64 bit linux installed (all systems use SuSE 10.3) I get an traceback:
Module ruagaero.intradevcontent.db.db, line 22, in
thanks jason,
jason kirtland schrieb:
robert rottermann wrote:
Hi there,
I am building a zope/plone site that uses sqlalchemy (collective.lead).
on two systems I am developping on everything works fine, a third one that
has 64 bit linux installed (all systems use SuSE 10.3) I get
Michael Bayer wrote:
the error message indicates that there is more than one Session in
play. a big reason for this is that people have import
sqlalchemy.ext.threadlocal lying around when they dont really want
that.
thanks for the hint,
I do not use threadlocal in any direct way but I am
I would like to read data from aa Excel-sheet
to this goal I have created a mapper using:
from sqlalchemy.ext.sqlsoup import class_for_table
columns = construct_columns_from_excel
table = Table(self.tblname, self.metadata, *columns)
..
mapper = sqlalchemy.ext.sqlsoup(table)
now I would like
what I meant is that I use use XYZ from python code ..
robert
--~--~-~--~~~---~--~~
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
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
hi there,
I am creating a tool that should add data from an excel sheet into
mysql. i am using sqlalchmy 0.3
I want to be able to set the database in mysql at runtime.
what I do is sommething allong the following lines:
connectionstr =
Michael Bayer wrote:
create a new, empty MetaData instance. redefine=True didnt work so
great since tables have dependencies on each other.
thanks for the answer,
I just saw that redefine is still in the docstring for 0.3s Table class.
robert
hi there,
i want to create a database in mysql and then use it.
this is what I do:
in the __init__
def __init__( self, connectionstr ):
self.connectionstr = connectionstr
def _checkEngine(self):
if self._db_engine is None:
self._db_engine =
hi there,
I am new to SA.
For a tool I am creating I am also writing unittests.
In these I recreate the same table object repeatedly.
Up to now (with 0.28) this worked fine when I added
redefine=True.
In 0.3 this does not work anymore.
How would I remove/update a table from from a MetaData
44 matches
Mail list logo