Hi Mike, thanks to reply my question.
In my case the extract function is unuseful because it needs a datetime
to extract parts of it
but I don't have a datetime but a codified date.
I need to manage a string which is a personal code with info about name,
birthday, birth place and gender.
It looks like in sqlalchemy = 0.9.9 that a insert from cte doesn't get
rendered properly.
Code:
from sqlalchemy import *
table = Table(my_table, MetaData(),
Column(id, Integer, primary_key=True),
Column(name, String(30)),
)
c = table.select().cte(c)
query = c.select()
insert =
I've found some rather unexpected behavior when using
joinedload(...).load_only
https://bpaste.net/show/57322148e56f
The ex.description attribute is loaded on the first result, but not on the
second, even though all the data is part of the result.
It looks like the data is discarded when the
On 5/8/15 3:47 AM, Kristi Tsukida wrote:
It looks like in sqlalchemy = 0.9.9 that a insert from cte doesn't
get rendered properly.
Code:
from sqlalchemy import *
table = Table(my_table, MetaData(),
Column(id, Integer, primary_key=True),
Column(name, String(30)),
)
c =
On 5/8/15 12:10 PM, Mike Bayer wrote:
On 5/8/15 3:47 AM, Kristi Tsukida wrote:
It looks like in sqlalchemy = 0.9.9 that a insert from cte doesn't
get rendered properly.
Code:
from sqlalchemy import *
table = Table(my_table, MetaData(),
Column(id, Integer, primary_key=True),
On 5/8/15 9:23 AM, Marcus Cobden wrote:
I've found some rather unexpected behavior when using
joinedload(...).load_only
https://bpaste.net/show/57322148e56f
The ex.description attribute is loaded on the first result, but not on
the second, even though all the data is part of the result.
On 5/8/15 2:41 PM, Carlus wrote:
Hello,
Sorry I couldnt find info about in google neither in the documentation,
I have a model structure like this one:
class Person(Base):
__tablename__ ='person' id = Column(Integer, primary_key=True,
nullable=False)
person_name = Column(String,
awesome, thanks Michael!
On Friday, May 8, 2015 at 12:47:35 AM UTC-7, Kristi Tsukida wrote:
It looks like in sqlalchemy = 0.9.9 that a insert from cte doesn't get
rendered properly.
Code:
from sqlalchemy import *
table = Table(my_table, MetaData(),
Column(id, Integer,
Hello,
Sorry I couldnt find info about in google neither in the documentation,
I have a model structure like this one:
class Person(Base):
__tablename__ = 'person'
id = Column(Integer, primary_key=True, nullable=False)
person_name = Column(String, nullable=False)
Would you be able to use a TypeDecorator?
http://docs.sqlalchemy.org/en/latest/core/custom_types.html#sqlalchemy.types.TypeDecorator
That will allow you to define a function for handling how sqlalchemy
inserts and accesses the data from sql.
--
You received this message because you are
The problem is a behavioral quirk. I'm not sure if this is a regression or
not, but I've seen it brought up recently...
IIRC:
The join creates a matrix result (many rows), but `first()` only pulls the
first item from the result.
Calling 'one()' will pull all the results, but raise an error
I was afraid that was the only solution, but how to delete and insert new
row with the relationships of the old one?
El viernes, 8 de mayo de 2015, 23:59:28 (UTC+2), Michael Bayer escribió:
On 5/8/15 5:09 PM, Carlus wrote:
Yes exactly, imagine and hotel vanish, and it became into an
On 5/8/15 5:09 PM, Carlus wrote:
Yes exactly, imagine and hotel vanish, and it became into an
apartment, i know is a weird situation but the code is just an example.
OK so the ORM doesn't support an object changing into a new class in
place. You have to emit the UPDATE that you want, and
On 5/8/15 7:17 PM, Carlus wrote:
I was afraid that was the only solution, but how to delete and insert
new row with the relationships of the old one?
it doesn't seem like you have to. your Person refers to
accomodation.id, and you aren't deleting from that table, only UPDATEing
the type.
14 matches
Mail list logo