t;instrument_class" event here, you should
> be able to create the remote class as the primary one is created.
>
> On May 22, 2012, at 2:28 PM, David Bowser wrote:
>
>> Hi,
>>
>> I had a lot of trouble finding a decent set of examples on how to write a
>
ified, and commented an example, but I
didn't see how to submit it for consideration for use the in the documentation.
Please see attached.
~David Bowser
--
You received this message because you are subscribed to the Google Groups
"sqlalchemy" group.
To post to this group,
Nope, just use the one inside the scope, TagMixin.TagClass, like so for your
example:
session.add(User.TagClass(tagged=doc1,name='foo'))
On May 2, 2012, at 5:07 AM, Ciaran Farrell wrote:
> But how would you actually add a tag? For example, say, using the example you
> provided below, I had
You're looking for func which generates SQL function expressions.
See: http://docs.sqlalchemy.org/en/latest/core/expression_api.html
For your example:
from sqlalchemy.sql.expression import func
session.query(Posting).filter(func.date(Posting.timestamp_created)==func.date(my_var)).all()
On A
On Apr 24, 2012, at 7:18 PM, David Bowser wrote:
>
> On Apr 24, 2012, at 6:14 PM, Michael Bayer wrote:
>
>>
>> On Apr 24, 2012, at 5:59 PM, David Bowser wrote:
>>
>>>
>>> On Apr 24, 2012, at 5:50 PM, Michael Bayer wrote:
>>>
>>
On Apr 24, 2012, at 6:14 PM, Michael Bayer wrote:
>
> On Apr 24, 2012, at 5:59 PM, David Bowser wrote:
>
>>
>> On Apr 24, 2012, at 5:50 PM, Michael Bayer wrote:
>>
>>> one-to-many is defined as parent->child where child has a foreign key
>>>
On Apr 24, 2012, at 5:50 PM, Michael Bayer wrote:
> one-to-many is defined as parent->child where child has a foreign key column
> referring to parent; many-to-one is the reverse, where parent has a foreign
> key that refers to child. When you tell the ORM "foreign_keys =
> [some_col_on_pare
On Apr 24, 2012, at 3:36 PM, Michael Bayer wrote:
>
> On Apr 24, 2012, at 1:16 PM, David Bowser wrote:
>
>> I have a mixin as follows designed to remove a bunch of copy paste
>> relationship code.
>>
>> class UserMixin(object):
>> @_declared_attr
I have a mixin as follows designed to remove a bunch of copy paste relationship
code.
class UserMixin(object):
@_declared_attr
def user_id(cls):
return sa.Column('user_id',typ.Integer,sa.ForeignKey("tg_user.user_id",
ondelete="CASCADE"),nullable=False)
@_declared_attr
de
With postgres in raw sql I can do create an index like: "CREATE INDEX
users_lower_username_idx ON users (lower(username));"
How would I do this in sqlalchemy using a declarative model?
--
You received this message because you are subscribed to the Google Groups
"sqlalchemy" group.
To post to
10 matches
Mail list logo