ies_from_join()
for ent in entities:
# check entity and apply filtering
return query
Thanks!
воскресенье, 9 декабря 2018 г., 19:57:26 UTC+3 пользователь Mike Bayer
написал:
>
> On Sun, Dec 9, 2018 at 11:22 AM Stanislav Lobanov > wrote:
> >
> >
o override "new_version" method, then the
system may start having consistency issues.
воскресенье, 9 декабря 2018 г., 19:57:26 UTC+3 пользователь Mike Bayer
написал:
>
> On Sun, Dec 9, 2018 at 11:22 AM Stanislav Lobanov > wrote:
> >
> > Hello, i have one more questi
cs.sqlalchemy.org/en/latest/orm/examples.html#module-examples.versioned_rows
>
> since it has this new twist of doing both UPDATE and INSERT, if that's
> OK with you
> On Fri, Dec 7, 2018 at 1:20 AM Stanislav Lobanov > wrote:
> >
> > Thank you so much, Mike!
> >
> > Did
has this new twist of doing both UPDATE and INSERT, if that's
> OK with you
> On Fri, Dec 7, 2018 at 1:20 AM Stanislav Lobanov > wrote:
> >
> > Thank you so much, Mike!
> >
> > Did not tried it yet, but it looks like you nailed it :) I'll check the
> s
;child_end" columns to form full
> composite FK to child table).
> > >
> > > When child is updated (effectively UPDATE is converted to INSERT) then
> only child table is modified, so there are no cascades to parent, because
> parent just targets to the row where
instance.end = dt.datetime(2060, 1, 1)
# re-add
session.add(instance)
Thanks :)
четверг, 6 декабря 2018 г., 18:02:48 UTC+3 пользователь Mike Bayer написал:
>
> On Thu, Dec 6, 2018 at 3:53 AM Stanislav Lobanov > wrote:
> >
> > Example bu
tency, data integrity, data
querying must be done by hands, because i did not found a way to provide
cascades and correct relationship behaviour without full composite FK.
Thanks!
вторник, 4 декабря 2018 г., 15:36:42 UTC+3 пользователь Stanislav Lobanov
написал:
>
> Hello.
>
> I have a t
зователь Mike Bayer написал:
>
> On Wed, Dec 5, 2018 at 2:42 AM Stanislav Lobanov > wrote:
> >
> > First of all, thank you for such a detailed answer. Thank you for
> sharing your experience and continued support.
> >
> > Now i understand that using datab
Mike Bayer написал:
>
> On Wed, Dec 5, 2018 at 2:42 AM Stanislav Lobanov > wrote:
> >
> > First of all, thank you for such a detailed answer. Thank you for
> sharing your experience and continued support.
> >
> > Now i understand that using database views is not th
ad english, it is not on my tongue.
вторник, 4 декабря 2018 г., 15:36:42 UTC+3 пользователь Stanislav Lobanov
написал:
>
> Hello.
>
> I have a table with schema:
>
> name: users
> fields: id int, name text, start datetime, end datetime
> primary key: id, start, end
&g
Hello.
I have a table with schema:
name: users
fields: id int, name text, start datetime, end datetime
primary key: id, start, end
This is kind of a historical table, where each row defines separate
"historical version" of an object. There are a single business User entity
(model) with
Thank you very much! It is working now.
My mistake was to use @declared_attr to create a unique sequence per
mapper, and that was not working of course.
среда, 25 апреля 2018 г., 22:04:58 UTC+3 пользователь Stanislav Lobanov
написал:
>
> Hello!
>
> I have a base model class wit
Hello!
I have a base model class with "id" field, which is primary key and also
not nullable. It does not have autoincrement feature, but uses custom
sequence manually to assign it's value.
There are standard on table / sequence naming:
class Base:
id = Column(Integer, primary_key=True,
Thank you very much, your answer is very detailed as always. I think that
this approach may fit to me, because this tables are read-only, because it
is kind of datawarehouse.
Thanks!
суббота, 3 марта 2018 г., 10:45:45 UTC+3 пользователь Stanislav Lobanov
написал:
>
> Hello!
>
Hello!
I have a database with 10 tables with same structure. This structure of a
tables are always the same.
I want to be able to query this tables using one declarative mapper instead
of 10 similar mappers, but to do so i need a way to change table name
somehow.
Desired code:
class
Thank you for your support and contributions, Mike, you are a great person.
понедельник, 12 февраля 2018 г., 13:14:24 UTC+3 пользователь Stanislav
Lobanov написал:
>
> Hello, i'm supporting legacy database, and using such models (code
> contains examples of my problem, keep reading):
Hello, i'm supporting legacy database, and using such models (code contains
examples of my problem, keep reading):
class Product: # This table is never used straightforward in queries
type = Column(db.Integer)
name = Column(db.String)
TYPE_GUITARS = 1
TYPE_DRUMS = 2
technical requirements.
четверг, 1 февраля 2018 г., 5:35:26 UTC+3 пользователь Jonathan Rogers
написал:
>
>
>
> On Wednesday, January 31, 2018 at 12:27:12 PM UTC-5, Stanislav Lobanov
> wrote:
>>
>> Hello, i need to create a system, that can store historical versions of
>
any of those fit your
> specific needs.
>
> Bests,
> Martín
>
> 1- https://github.com/kvesteri/sqlalchemy-continuum
> 2-
> http://docs.sqlalchemy.org/en/latest/orm/examples.html?highlight=history#versioning-objects
>
> On Wed, Jan 31, 2018 at 2:27 PM Stanislav Loba
Hello, i need to create a system, that can store historical versions of
objects.
Example model looks like:
class User(Base):
id=Column(Integer) # ForeignKey
start=Column(DateTime)
end=Column(DateTime)
name=Column(String)
I have implemented .add_new() and .save() methods on base
20 matches
Mail list logo