is relatively simple.
Thanks again,
Anton
--
SQLAlchemy -
The Python SQL Toolkit and Object Relational Mapper
http://www.sqlalchemy.org/
To post example code, please provide an MCVE: Minimal, Complete, and Verifiable
Example. See http://stackoverflow.com/help/mcve for a full description
ery.
The question is - how can I used BakedQuery with this setup? From the
source I can guess I should use add_criteria / with_criteria, but in the
unit tests / documentation I could not find an example of doing so with the
function parameter values.
Thank you for any help,
Anton
--
SQL
Thank you Mike, worked as expected!
>
--
SQLAlchemy -
The Python SQL Toolkit and Object Relational Mapper
http://www.sqlalchemy.org/
To post example code, please provide an MCVE: Minimal, Complete, and Verifiable
Example. See http://stackoverflow.com/help/mcve for a full description.
ery subqueries
separately and then somehow join them with the main BakedQuery (how?).
Should I somehow do the BakedQuery only of the main query (what to do with
subqueries then?).
Thank you for any help,
Anton
--
SQLAlchemy -
The Python SQL Toolkit and Object Relational Mapper
h
they are public and safe to use.
Got it.
Thanks,
Anton.
--
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+unsubscr...@googlegroups.com.
To post to this group
on ColumnDefault internals and partially duplicates
logic from DefaultExecutionContext._exec_default()
I am wondering if there is a better solution to it?
Thanks,
Anton.
--
You received this message because you are subscribed to the Google Groups
sqlalchemy group.
To unsubscribe from this group
mapped tables. Ensure that only
those columns referring to a parent column are marked as foreign, either
via the foreign() annotation or via the foreign_keys argument.
I am not sure how to overcome this error. Would appreciate any help.
Best,
Anton.
On Tuesday, September 9, 2014 1:10:40 PM UTC-7
-referencing because two models use the same table.
SimpleModel is just a mixin that I use in every model I create to make sure
that they all have a unique id.
Thanks,
Anton.
On Wednesday, September 10, 2014 3:00:39 PM UTC-7, Michael Bayer wrote:
On Sep 10, 2014, at 5:11 PM, Anton ansch...@gmail.com
);
CREATE TABLE group_entity (
id integer NOT NULL,
entity_id integer,
key character varying,
value text,
group_id integer NOT NULL
);
Best,
Anton.
On Wednesday, September 10, 2014 4:51:54 PM UTC-7, Michael Bayer wrote:
hi Anton -
if you can show me correct table designs
I already have models for group, entity and group_entity. Now I am trying
to build a model that would represent an entity for a group with all the
custom attributes.
On Wednesday, September 10, 2014 5:06:36 PM UTC-7, Anton wrote:
Mike, the tables are already there, I am trying to create
is that there is an additional foreign key.
I wonder if there is any approach I can use to adapt vertical pattern for
my needs without modifying tables.
Best,
Anton.
--
You received this message because you are subscribed to the Google Groups
sqlalchemy group.
To unsubscribe from this group and stop receiving emails
Trying to use with multiple table mapping.
On Tuesday, September 9, 2014 1:03:25 PM UTC-7, Anton wrote:
Hi,
I need some help choosing the right pattern for the models I have. I have
the following tables:
Entity (INT id, VARCHAR name)
Group (INT id, VARCHAT name)
GroupEntityAttributes
and SQLAlchemy==0.9.4
Thanks!
Best,
Anton.
On Wednesday, November 6, 2013 12:58:53 PM UTC-8, Michael Bayer wrote:
I wrote a full post regarding this topic on stackoverflow at
http://stackoverflow.com/questions/11769366/why-is-sqlalchemy-insert-with-sqlite-25-times-slower-than-using-sqlite3-directly
Hey guys,
I am facing the same issue, I am using PostgreSQL and want to use native
ENUM type in two tables. For migration I am going to use alembic.
Did you guys find out any was to do this?
Thanks,
Anton
On Thursday, May 1, 2014 10:33:21 AM UTC-7, Michael Bayer wrote:
OK. ENUM
Hi all,
I'm happy to announce the availability of sqlamp 0.6. This release
introduces the support of moving nodes and adds compatibility with
python 3.2 and SQLAlchemy 0.7.x. See full changelog at
http://sqlamp.angri.ru/
sqlamp is an implementation of materialized path for SQLAlchemy. It is
Michael,
On 22 июн, 17:48, Michael Bayer mike...@zzzcomputing.com wrote:
On Jun 22, 2011, at 3:41 AM, Anton wrote:
On 22 июн, 01:31, Michael Bayer mike...@zzzcomputing.com wrote:
On Jun 21, 2011, at 7:04 PM, Anton wrote:
On 22 июн, 00:47, Michael Bayer mike...@zzzcomputing.com wrote:
I
On 22 июн, 01:31, Michael Bayer mike...@zzzcomputing.com wrote:
On Jun 21, 2011, at 7:04 PM, Anton wrote:
On 22 июн, 00:47, Michael Bayer mike...@zzzcomputing.com wrote:
I added StatementError after having too often a custom type or other kind
of error happen deep inside the preparation
On 22 июн, 17:48, Michael Bayer mike...@zzzcomputing.com wrote:
On Jun 22, 2011, at 3:41 AM, Anton wrote:
On 22 июн, 01:31, Michael Bayer mike...@zzzcomputing.com wrote:
On Jun 21, 2011, at 7:04 PM, Anton wrote:
On 22 июн, 00:47, Michael Bayer mike...@zzzcomputing.com wrote:
I added
the exception if it is not an instance of
self.dialect.dbapi.Error. 0.7 in turn does [3]. And it reraises the
exception of different type - instead of the original one it uses
DBAPIError.instance(), which in my case returns StatementError. How
can I fix it on my side?
Thanks.
--
Anton
[1] http
).
--
Anton
On Jun 21, 2011, at 6:39 PM, an...@angri.ru wrote:
Hi,
I'm porting sqlamp [1] to SQLAlchemy 0.7 and have some difficulties
with it. One of them is raising an exception (non-DBAPI) from
process_bind_param() method of classes derived from TypeDecorator. In
0.6 [2] method
of PostTagLink instances), then it does post.tag_links = [] and tries
to Session.commit() it. And fails terribly.
Guts tell me I may be doing something wrong, but I don't know what
exactly. I'll greatly appreciate your help.
Best regards, Anton Shestakov.
--
You received this message because you
2010/10/4 Michael Bayer mike...@zzzcomputing.com:
On Oct 4, 2010, at 1:34 AM, Anton Shestakov wrote:
Hello all,
So, here's simple script that produces the error: http://pastie.org/1197851
please take a look at it, the script isn't big at all and there's
traceback for the error as well
Hi all,
The sqlamp project gets a new release -- 0.5.1. The most important
highlight is that it now supports polymorphic inheritance of nodes. It
means that your trees can now contain objects of different types,
provided that they all have one base class.
sqlamp is an implementation of
/#declarative
--
Anton Gritsay,
http://angri.ru
--~--~-~--~~~---~--~~
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
Hi, Allen!
You can use something like this (yeah, I know that it isn't
declarative in any way):
class Node(Base):
__tablename__ = 'node'
id = Column(Integer, primary_key=True)
parent_id = Column(ForeignKey('node.id'))
parent = relation(Node,
unfortunately the logging module included with Python adds significant
performance overhead even if no handlers are configured. We would like
to be able to have fine-grained logging available in our library, but at
the same time when the logging is disabled for significant latency to not
merge is working rudimentally for objects with unloaded scalar/
instance/collection attributes in r3974. whats not yet happening is
the merging of the various query.options() that may be present on the
original deferred loader, which means the merged instance wont
necessarily maintain the
I rearranged instance-level deferred loaders to be serializable
instances in r3968. you can now pickle an instance + its _state and
restore, and all deferred/lazy loaders will be restored as well. I
didnt yet test it specifically with merge() but give it a try, you
shoudnt be getting that
),
Column('name', String(100)),
Column('surname', String(100)))
mapper(User, users,
properties={
'surname': deferred(users.c.surname)
})
s = create_session()
u = User()
u.name = 'anton'
u.surname = 'belyaev'
s.save(u)
s.flush()
# now we need an instance
pickle isnt going to work with deferred columns unless you implement
__getstate__ and __setstate__. so the issue with session.merge() is
just an extension of that issue, correct ? i.e. without deferreds
merge has no issue.
is it not reasonable to ask that objects which are to be
Hello,
Several people already wrote something about memcached + SqlAlchemy.
Remember, Mike Nelson wrote a mapper extention, it is available at:
http://www.ajaxlive.com/repo/mcmapper.py
http://www.ajaxlive.com/repo/mcache.py
I've rewritten it a bit to fit 0.4 release of SA.
Any response and
On Dec 6, 11:51 pm, Andrew Stromnov [EMAIL PROTECTED] wrote:
I have DB with onemasterserver and several replicated slaves
(MySQL). How to implement this functionality: read-only request can be
passed to any DB (masterorslave), but any write request with
following read requests must be sended
I am building a grading system for students and got unexpected
performance problems. I am using composite key for marks, which refer
to students and subjects.
When I am creating a mark (for student_1 and subject_1), unnecessary
select operations are performed (select all marks for
Hello all,
I am building a grading system for students and got unexpected
performance problems. I am using composite key for marks, which refer
to students and subjects.
When I am creating a mark (for student_1 and subject_1), unnecessary
select operations are performed (select all marks for
Hello, here is a sample:
children_table = Table('children', metadata,
Column('id', Integer, primary_key=True))
child2group_table = Table('child2group', metadata,
Column('child_id', Integer,
ForeignKey('children.id'),
t = Table('mytable', meta,
Column(...)
)
someothermeta = MetaData()
t2 = Table('mytable', someothermetadata, autoload=True,
autoload_with=connection)
assert t.compare(t2)
I believe this should be done somehow automatically. Because everyone
needs this.
Hey,
I believe there is a common approach to the situation, but I just dont
know it.
Let say, I have some tables created in the DB using SQLAlchemy. Then I
modify Python code, which describes the table (add a column, remove
another column,...). What is the common way to handle this situation?
I
On 24 июл, 17:34, svilen [EMAIL PROTECTED] wrote:
On Tuesday 24 July 2007 16:22:43 Anton V. Belyaev wrote:
Hey,
I believe there is a common approach to the situation, but I just
dont know it.
Let say, I have some tables created in the DB using SQLAlchemy.
Then I modify Python code
38 matches
Mail list logo