Hi, I am trying to sote pairs in a table as follows:
#--
from elixir import *
metadata.bind = sqlite:///:memory:
metadata.bind.echo = False
class Pairs(Entity):
name = Field(String(50), primary_key = True)
I should probably make the pair method:
def pair(name1, name2):
p1, p2 = Pairs(name1), Pairs(name2)
p1.other = p2
p2.other = p1
On Feb 3, 11:57 am, lars van gemerden l...@rational-it.com wrote:
Hi, I am trying to sote pairs in a table as follows:
Is it possible to mix Elixir classes and SQLA classes in one database
(with foreign keys between them)?
Cheers, Lars
--
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
yes
Elixir classes are in fact SQLA classes, only defined with
a different syntax
you can mix Elixir, Declarative and plain python objects mapped
with SQLA
On Feb 3, 12:13 pm, lars van gemerden l...@rational-it.com wrote:
Is it possible to mix Elixir classes and SQLA classes in one database
Thanks,
Can you also mix Elixir Fields and SQLA Column/relationships in the
same class?
Cheers, Lars
On Feb 3, 12:56 pm, erikj tw55...@gmail.com wrote:
yes
Elixir classes are in fact SQLA classes, only defined with
a different syntax
you can mix Elixir, Declarative and plain python
no, that's not possible
Elixir does some custom postprocessing on a class
definition, and so does Declarative, but they are not
interoperatable
On Feb 3, 1:20 pm, lars van gemerden l...@rational-it.com wrote:
Thanks,
Can you also mix Elixir Fields and SQLA Column/relationships in the
same
Too bad, thanks
On Feb 3, 1:38 pm, erikj tw55...@gmail.com wrote:
no, that's not possible
Elixir does some custom postprocessing on a class
definition, and so does Declarative, but they are not
interoperatable
On Feb 3, 1:20 pm, lars van gemerden l...@rational-it.com wrote:
Hi:
I'm having trouble getting a subquery to return entities.
class Question(Base):
__tablename__ = 'question'
question_id = Column(INTEGER(unsigned=True), primary_key=True)
...etc
q_answers = relationship(Answer, backref=question)
class Answer(Base):
I should add: First element is always none _even if question has been
answered by that user_
On Feb 3, 11:28 am, cbc clayton.cafi...@mondaylambson.com wrote:
Hi:
I'm having trouble getting a subquery to return entities.
class Question(Base):
__tablename__ = 'question'
Hi,
If i have a table named 'message' and it has the following columns:
message_id, tar_del, src_del. I pass in del_list which is a list of
message to delete. I tried the following
self.session.query(Message)\
.filter(Message.message_id.in_(del_list))\
Is there an example or other explanation of how to use a SEQUENCE that is not a
primary key on a table, particularly how to create the sequence, get next
value, reset seq, etc. I see the base docs here, but it's not obvious to me how
exactly to use this class.
On Feb 3, 2012, at 11:28 AM, cbc wrote:
Hi:
I'm having trouble getting a subquery to return entities.
class Question(Base):
__tablename__ = 'question'
question_id = Column(INTEGER(unsigned=True), primary_key=True)
...etc
q_answers = relationship(Answer,
On Feb 3, 2012, at 1:04 PM, Mason wrote:
Hi,
If i have a table named 'message' and it has the following columns:
message_id, tar_del, src_del. I pass in del_list which is a list of
message to delete. I tried the following
self.session.query(Message)\
On Feb 3, 2012, at 6:24 PM, Michael Hipp wrote:
Is there an example or other explanation of how to use a SEQUENCE that is not
a primary key on a table, particularly how to create the sequence, get next
value, reset seq, etc. I see the base docs here, but it's not obvious to me
how exactly
14 matches
Mail list logo