u can make a simple dict-cache for your authors only, and let it grow.
in case of limited memory, u can do more sophisticated statistical
one (say keep recent 1000 authors, or most used ones or whatever
criterion) and query db if not there and create new one if not there
either.
But if it's
Hi everyone,
I m trying to get to grips with SQLAlchemy by parsing a file, extracting
certain fields and then storing them in a database. I am currently using the
object relational and trying to get a sense of how it all works. I have two
objects Paper and Author, which is a many to many
Thanks for the code. For those who might also be interested in an ORM base
class providing __init__, update and __repr__ - this is what I use now with
0.5 (comments welcome):
=
import sqlalchemy as sql
from sqlalchemy import orm
class
No, I'm going to use a template layout. I'm not sure how I'm going to
organize it is clear to you, so it might be better to give an example:
Say Bob has a Web site, so he creates a project named bobsite. For the
site, he finds three applications other people have written -
aguestbook,
may or may not be relevant, those n- apps may have same-named tables
that have nothing to do with each other, e.g. Item.
so either separate metadata's or separate schema's if they are
supported... and the latter is not easily made transparent into the
apps - if they all expect a table called
the metadata is just a dictionary, and is basically a namespace where
a program can find Table objects based on their name. it should be in
as narrow a scope as possible, and should not be considered to have
any relationship to a database engine or connection - its ability in
that regard
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Is it possible to define multiple mappers for one table?
Usecase: I have one big table (60 cols) and one big mapper class.
For some reporting I don't need only a small number of cols. For
performance reasons I would like to load the related rows
I am not very familiar with SqlAlchemy, now I have a problem to query
with aggregate function.
Here is the class
--
class Directory(DeclarativeBase):
An ultra-simple group definition.
__tablename__ = 'docman_directory'
dir_id = Column(Integer,
On Jan 13, 2009, at 8:19 AM, Andreas Jung wrote:
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Is it possible to define multiple mappers for one table?
Usecase: I have one big table (60 cols) and one big mapper class.
For some reporting I don't need only a small number of cols. For
On Jan 13, 2009, at 9:46 AM, Chen Houwu wrote:
I am not very familiar with SqlAlchemy, now I have a problem to query
with aggregate function.
Here is the class
--
class Directory(DeclarativeBase):
An ultra-simple group definition.
__tablename__ =
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On 13.01.2009 15:52 Uhr, Michael Bayer wrote:
On Jan 13, 2009, at 8:19 AM, Andreas Jung wrote:
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Is it possible to define multiple mappers for one table?
Usecase: I have one big table (60 cols)
On Jan 13, 2009, at 10:04 AM, Andreas Jung wrote:
This fails:
This is full-fledged mapper:
class Arbeitsmittel(Base, AsDictMixin):
__tablename__ = 'arbeitsmittel'
__table_args__ = (
{ 'autoload' : True, })
# column redefinitions needed for
Indeed, you are correct.
When I use the adjusted statement of:
Column('data', Text(4294967295), nullable=False)
The column type was created as longtext. Sorry for the trouble, I
thought I had tried that before.
Thank you,
Jon Miller
On Jan 9, 8:13 pm, Michael Bayer mike...@zzzcomputing.com
some columns have type timestamp without time zone. In this case its
a utc-Timestamp.
Its possible to set tzinfo=utc by default (in SA) if I have a
timestamp without time zone column reflected?
Thx.
--~--~-~--~~~---~--~~
You received this message because you are
not sure what effect this would have ? we don't use a tzinfo
argument anywhere. only the sqlite dialect actually generates
datetime objects and there's similarly no explicit notion of timezone
there either.
On Jan 13, 2009, at 11:04 AM, _t...@arcor.de wrote:
some columns have type
Ok I was wrong about the problem being present in the merge()
function. The problem is only present in my custom merge() function.
Thanks for your help.
On Jan 13, 12:08 am, Duder dthomp...@gmail.com wrote:
I am using the merge() function to merge the de-serialized object into
the session. I
Mr. Bayer, you know entirely too much about all kinds of databases.
A follow-up question to your erudite comment (and let me first say
that I love sqlalchemy and have spent a good amount of time immersed
in its documentation before posting):
I tried running an update query of the form
17 matches
Mail list logo