On Thu, Jun 27, 2019, at 12:02 PM, Charles-Axel Dein wrote:
> Hi,
>
> I'm trying to have a deleted_at column on my records. I use MySQL and latest
> sqlalchemy as of writing. For historical reasons, I want to keep using the
> MySQL's TIMESTAMP columns.
>
> I would like to use timezone-aware
On Wed, Jun 26, 2019, at 1:51 PM, Brian Maissy wrote:
> Background: I have a bunch of materialized views (postgres) that are
> dependent on each other. When I want to change one of them, I drop cascade it
> (postgres does not provide a way to modify the query of an existing
> materialized
t SQLAlchemy is supposed to do :)
that's a really big query though :)
>
> On Fri, Jun 21, 2019 at 02:32:36AM -0700, Julien Cigar wrote:
> >
> >
> > On Thursday, June 20, 2019 at 4:24:14 PM UTC+2, Mike Bayer wrote:
> > >
> &g
please communicate with the sqlalchemy-redshift folks at
https://github.com/sqlalchemy-redshift/sqlalchemy-redshift/issues as I know
nothing about what special options it offers
On Tue, Jun 25, 2019, at 10:30 PM, Preutti Puawade wrote:
> Hi,
>
> When I set engine as below,
>
> engine =
>
On Fri, Jun 21, 2019, at 7:22 AM, Dmytro Starosud wrote:
> Base class `A1` contains `polymorphic_identity` (along with
> `polymorphic_on`), but `Query(A1)`doesn't produce where clause, whereas
> `Query(A2)` (where `A2` is subclass of `A1` with its own
> `polymorphic_identity`) does.
> Tried
On Mon, Jun 24, 2019, at 1:24 PM, Nico C. wrote:
> One of the many reasons not to implement __lt__, is that the types are used
> with different databases. Those have had very different stories, especially
> enum labels may not have been added in the same order. Hence, defining and
> order may
On Mon, Jun 24, 2019, at 6:12 AM, Nico C. wrote:
> Hi there,
>
> Where I work, in our data model, we'd have several the opportunity to have
> primary keys defined has a composite of something + an enum value. Though
> because sqlalchemy requises
> that primary keys can be sorted, it is not
On Mon, Jun 24, 2019, at 3:33 AM, Preutti Puawade wrote:
> Hi there,
>
> It could be a non-sense question for you but for I've struggling on this for
> weeks and search result from google cannot help so I'm end up here.
>
> Normally I've use SQL client program as SQLwokbench/J and it's using
On Sun, Jun 23, 2019, at 5:45 PM, Andrew Martin wrote:
> I have a generic CRUDService for my web app. It's a pattern that was loosely
> suggested to me by Mike a while back. I've probably not implemented it the
> way he intended, but it works pretty well in a pretty small amount of code.
>
>
On Fri, Jun 21, 2019, at 2:14 AM, Chris Withers wrote:
> On 20/06/2019 16:00, Mike Bayer wrote:
> >
> >> On Thu, Jun 20, 2019, at 3:14 AM, Chris Withers wrote:
> >>> Hi All,
> >>>
> >>> I'm getting this warning:
> >>>
>
you probably want to use cast()
from sqlalchemy.dialects.postgresql import UUID
from sqlalchemy import cast
cast(MyModel.data['track']['id'], UUID) == UserTrack.id
see the examples at
https://docs.sqlalchemy.org/en/13/core/type_basics.html#sqlalchemy.types.JSON
On Thu, Jun 20, 2019, at 3:25
On Thu, Jun 20, 2019, at 1:45 PM, Michael Merickel wrote:
> I think the basic idea is to create a database and codebase in the state of
> the target revision. Then autogenerate a migration from nothing to that
> revision - just like you would do when starting to use alembic from an
> existing
On Thu, Jun 20, 2019, at 1:50 PM, Jonathan Vanasco wrote:
>
>
> On Thursday, June 20, 2019 at 3:14:06 AM UTC-4, Chris Withers wrote:
>>
>> How can I indicate in my code that this is intentional and no warning
>> should be omitted?
>
>
> Personal option:
>
> I would not mask these. I
On Thu, Jun 20, 2019, at 10:41 AM, Mike Bayer wrote:
>
>
> On Thu, Jun 20, 2019, at 3:14 AM, Chris Withers wrote:
>> Hi All,
>>
>> I'm getting this warning:
>>
>> SAWarning: Flushing object with incompatible
>> polymorphic identity ; the obj
On Thu, Jun 20, 2019, at 3:14 AM, Chris Withers wrote:
> Hi All,
>
> I'm getting this warning:
>
> SAWarning: Flushing object with incompatible
> polymorphic identity ; the object may not refresh
> and/or load correctly (this warning may be suppressed after 10 occurrences)
>
On Thu, Jun 20, 2019, at 8:39 AM, Julien Cigar wrote:
>
>
> On Wednesday, June 19, 2019 at 9:53:42 PM UTC+2, Mike Bayer wrote:
>>
>>
>> On Wed, Jun 19, 2019, at 10:50 AM, Julien Cigar wrote:
>>> That's the (almost) final version if you're interrested:
ritten ?
>
> On Wednesday, June 19, 2019 at 4:44:55 PM UTC+2, Julien Cigar wrote:
>>
>>
>> On Wednesday, June 19, 2019 at 4:09:55 PM UTC+2, Mike Bayer wrote:
>>>
>>>
>>> On Wed, Jun 19, 2019, at 4:48 AM, Julien Cigar wrote:
>>>> Tha
Class]).select_from(MyClass.__mapper__.selectable)
>
> Cheers,
> Julien
>
>
> On Wednesday, June 19, 2019 at 7:32:24 AM UTC+2, Mike Bayer wrote:
>>
>> This test doesn't run yet because it looks like you need to have
>> initializers for things like Content.current_tran
in one query, and that it is transparent (it's a Pyramid plugin), that's why
> I'm also using hybrid properties
>
>
> On Tuesday, June 18, 2019 at 3:38:36 PM UTC+2, Mike Bayer wrote:
>>
>>
>> On Tue, Jun 18, 2019, at 6:21 AM, Julien Cigar wrote:
>>> Hello,
&
On Tue, Jun 18, 2019, at 9:00 AM, Julien Cigar wrote:
>
>
> On Tuesday, June 18, 2019 at 12:20:55 PM UTC+2, Julien Cigar wrote:
>> Hello,
>>
>> I'm trying to add a 'read-only' relationship involving a subquery and I have
>> some problems with remote and foreign sides, SQLAlchemy returns:
>>
On Tue, Jun 18, 2019, at 9:14 AM, Guy Zehavi wrote:
> When I use sqlalchemy using mysql-connector-python to read unicode from a
> blob I am getting:
Hi there -
While this issue may be impacted if you are using an old version of
mysql-connector-python or of SQLAlchemy, assuming you are on
On Tue, Jun 18, 2019, at 6:21 AM, Julien Cigar wrote:
> Hello,
>
> I'm trying to add a 'read-only' relationship involving a subquery and I have
> some problems with remote and foreign sides, SQLAlchemy returns:
>
> sqlalchemy.exc.ArgumentError: Relationship Folder.current_translation could
>
ure! Thanks!
>>
>> On Fri, Jun 14, 2019 at 5:50 PM Mike Bayer wrote:
>>> __
>>>
>>>
>>> On Fri, Jun 14, 2019, at 12:46 PM, Mike Bayer wrote:
>>>>
>>>>
>>>> On Fri, Jun 14, 2019, at 12:22 PM, João
here's no other alternative?
>
>
> Thanks in advance,
> João
>
> On Fri, Jun 14, 2019 at 5:52 PM João Miguel Neves
> wrote:
>> Cool, wasn't aware of that feature! Thanks!
>>
>> On Fri, Jun 14, 2019 at 5:50 PM Mike Bayer wrote:
>>> __
>>>
>>&
On Fri, Jun 14, 2019, at 12:46 PM, Mike Bayer wrote:
>
>
> On Fri, Jun 14, 2019, at 12:22 PM, João Miguel Neves wrote:
>> Not performance, actually to avoid a race condition with key/values written
>> to JSONB fields. Ended up with the following function that we use
On Fri, Jun 14, 2019, at 12:30 PM, Jonathan Vanasco wrote:
>
>
> On Friday, June 14, 2019 at 9:33:49 AM UTC-4, Mike Bayer wrote:
>> docs for this general idea are at
>> https://docs.sqlalchemy.org/en/13/core/custom_types.html#redefining-and-creating-new-operators
>>
you are updating
columns in both "person" and "engineer". I might use SELECT..FOR UPDATE for a
pessimistic approach.
>
> On Fri, Jun 14, 2019 at 5:07 PM Mike Bayer wrote:
>> __
>>
>>
>> On Fri, Jun 14, 2019, at 11:49 AM, João Miguel Ne
to do an
> update in a codepath that can have several different models passed to it)
you're doing query.update() for performance reasons, right? yeah you probably
have to do something like that, or just use regular session patterns to update
data.
>
> TIA,
> João
>
> On Fri, Jun 1
On Fri, Jun 14, 2019, at 10:30 AM, João Miguel Neves wrote:
> Hi,
>
> I have a situation where an update tries to update the wrong table on when a
> column comes from the parent table and is not on the current table. I'll
> grant I didn't quite understand all the caveats in
>
On Fri, Jun 14, 2019, at 6:22 AM, Berislav Lopac wrote:
> Hi, does anyone know of a simple way to apply a (SQL) function to each and
> every query in an ORM model? For example, this article[0] suggests building a
> lower()-based index for emails in order to normalise them, and then using
>
what's the default on the column? seems like that's the problem here. if this
is an in-SQLAlchemy default, that won't work, you need to generate the uuids on
the database side if you are using a SELECT. The functions are available
through an extension on PG, there's background here:
On Wed, Jun 12, 2019, at 10:10 AM, Javier Martínez wrote:
> Hi everyone,
> I am searching but I find no solution for my issue that is why I decided to
> ask here. Thanks in advance for your attention.
>
> The issue is related to the update of a second level hierarchy object Id. I
> am
On Mon, Jun 10, 2019, at 2:09 AM, Chris Withers wrote:
> On 05/06/2019 20:47, Mike Bayer wrote:
> >
> >
> >> The panacea I'm after is to be able to run the DDL in a transaction, run
> >> each test in a subtransaction off that which is rolled back at the end
&g
On Sun, Jun 9, 2019, at 1:33 AM, Zsolt Ero wrote:
> I figured out the keyword is NOTICES.
>
> However this section of the docs doesn't work / didn't had any effect:
> https://docs.sqlalchemy.org/en/13/dialects/postgresql.html#notice-logging
that document assumes one is familiar with logging in
On Wed, Jun 5, 2019, at 2:30 PM, Chris Withers wrote:
> On 05/06/2019 17:15, Mike Bayer wrote:
> >
> >> How come close() doesn't rollback the SessionTransaction if it throws it
> >> away?
> >
> > that's currently what .close() does, it discards th
On Wed, Jun 5, 2019, at 12:02 PM, Christian Barra wrote:
> Hi, I am trying to understand what the best approach is to have lazy
> attributes defined on a mixin and then used them on the subclasses.
>
> Ideally I'd would like to defer the load of that attribute (controller) and
> use `undefer`
On Wed, Jun 5, 2019, at 11:47 AM, Chris Withers wrote:
> On 05/06/2019 16:41, Mike Bayer wrote:
> >
> >> Which gives me:
> >>
> >> $ python sessions_are_weird.py
> >> Traceback (most recent call last):
> >> File "sessions_are_weird.py&q
On Wed, Jun 5, 2019, at 3:50 AM, Chris Withers wrote:
> On 04/06/2019 23:21, Mike Bayer wrote:
>
>>
>> On Tue, Jun 4, 2019, at 4:33 PM, Chris Withers wrote:
>>>
>>> So, how do I roll back the further subtransaction created by the web
>>> framew
On Tue, Jun 4, 2019, at 6:31 PM, Chris Withers wrote:
> On 04/06/2019 23:21, Mike Bayer wrote:
> >
> >
> > I'm not following all your code but if there are two sessions in play
> > I'd probably try to avoid that, there should be only one Session you
> >
On Tue, Jun 4, 2019, at 4:33 PM, Chris Withers wrote:
> On 04/06/2019 14:49, Mike Bayer wrote:
> >
> >
> > On Tue, Jun 4, 2019, at 2:15 AM, Chris Withers wrote:
> >> Now, what I'm trying to test is that I haven't forgotten to include
> >> the
On Tue, Jun 4, 2019, at 4:34 PM, Chris Withers wrote:
> On 04/06/2019 14:47, Mike Bayer wrote:
> >
> >
> > On Tue, Jun 4, 2019, at 3:05 AM, Chris Withers wrote:
> >> Hi All,
> >>
> >> What creates session.transaction? I can't spot get __getatt
On Tue, Jun 4, 2019, at 2:15 AM, Chris Withers wrote:
> Hi All,
>
> I'm working with the pattern described at
> https://docs.sqlalchemy.org/en/13/orm/session_transaction.html#joining-a-session-into-an-external-transaction-such-as-for-test-suites
> along with pytest and FastAPI, an async web
On Tue, Jun 4, 2019, at 3:05 AM, Chris Withers wrote:
> Hi All,
>
> What creates session.transaction? I can't spot get __getattr__ magic,
> but the only place in the code I see it being created is in .begin(...),
> which has a docstring saying that it should no longer be used, so I feel
>
you would use deferred() on the mapping for this:
https://docs.sqlalchemy.org/en/13/orm/loading_columns.html?highlight=deferred#deferred
On Mon, Jun 3, 2019, at 8:29 PM, Desmond Lim wrote:
> Hi All,
>
> I have a question which I think I know the answer to but I'd like to confirm.
>
> I have
On Mon, Jun 3, 2019, at 3:19 PM, Jonathan Vanasco wrote:
> We have a fairly complex SqlAlchemy model that spans several integrated
> applications (300+ tables).
>
> Our text columns are all of the `sqlalchemy.UnicodeText` class, however they
> all have widely different 'cleaning' or
the .expression form of the hybrid_property to SELECT/calculate it in
>> SQL
>>
>> with_entities(ORM_Class.column_attr,... etc)
>> -Returns Tuple
>> -Will *NOT* add necessary joins from relationship definitions in Model. Must
>> join manually in query.
>>
well hybrids don't apply to a load_only operation because they are not included
in the query that emits when the ORM SELECTs for an object. that is,
@hybrid_property.expression gives you a SQL expression, but that's never
included when you say session.query(Task). It's only if you said,
So that's an empty Session, which won't do anything immediately, however if
anything is done on it that uses a database, then that all blocks, and if so,
db.close() can also block because it has to cleanup the database connection
which is definitely blocking IO stuff. If you didn't do anything
On Tue, May 28, 2019, at 9:10 AM, Chris Wilson wrote:
> Dear Michael,
>
> I have discovered a limitation of TypeDecorators (custom column types): any
> one that uses the database (e.g. to load objects serialised in a custom way)
> has no way to know which database session to use. During
On Thu, May 30, 2019, at 9:21 AM, Mike Bayer wrote:
>
>
> On Thu, May 30, 2019, at 8:42 AM, Chris Wilson wrote:
>> Hi Mike,
>>
>> On Wed, 29 May 2019 at 15:30, Mike Bayer wrote:
>>> Note that we suggested approaches that work in conjunction with t
On Thu, May 30, 2019, at 8:42 AM, Chris Wilson wrote:
> Hi Mike,
>
> On Wed, 29 May 2019 at 15:30, Mike Bayer wrote:
>> Note that we suggested approaches that work in conjunction with the
>> serialized approach you gave, the @property approach and the mapper.load
ould you accept my request to implement something like this?
>
> Thanks, Chris.
>
> On Tuesday, 28 May 2019 23:42:59 UTC+1, Jonathan Vanasco wrote:
>>
>>
>> On Tuesday, May 28, 2019 at 4:35:32 PM UTC-4, Mike Bayer wrote:
>>>
>>> additionally, runnin
On Tue, May 28, 2019, at 12:03 PM, Jonathan Vanasco wrote:
>
>
> On Tuesday, May 28, 2019 at 9:10:19 AM UTC-4, Chris Wilson wrote:
>>
>> During initial load one can use a global session object,
>> **
>
> You should not do that. Global sessions are widely considered an anti-pattern.
On Tue, May 28, 2019, at 6:46 AM, Sebastian Meinhardt wrote:
> The profiler results are in but they do not tell me anything that I did not
> already find by manually stepping through the code. See my first post, above.
> The method that takes all the time is `execute` of `cx_Oracle.Cursor`
On Tue, May 28, 2019, at 5:29 AM, Sebastian Meinhardt wrote:
> Thank you for the pointers! After digging into this some more, I found that
> this is definitely related to something in cartain versions of SQLAlchemy. I
> also tried different versions of cx_Oracle (6.4.1, 7.1.2, and 7.1.3) but
On Mon, May 27, 2019, at 12:05 PM, Sebastian Meinhardt wrote:
> Hello,
>
> given an SQLAlchemy engine `con` (cx_oracle dialect) and a moderately complex
> SQLAlchemy selectable object `sql`, the following code will consistently take
> ~15 seconds:
>
> con.execute(sql).fetchall()
>
> Whereas
On Sat, May 25, 2019, at 5:10 AM, Antony Gelberg wrote:
> I have a table "delivery" with a "status" column (yes, I still think in
> tables, not sure if this is a cause for concern...). I need to refactor it to
> track status history rather than just the current status. I would want to be
>
On Fri, May 24, 2019, at 12:48 PM, Jonathan Vanasco wrote:
> I agree with Simon, and I think I'm very much -1 on the usage of
> contains_eager above (and I think that ticket you linked to, Mike). I find
> that sort of stuff causes a lot of bugs in the long run.
>
> I am looking at it from
d
> see this filter and apply it.
> My usage then becomes :
> qry_users = session.query(User).options(filterrelated(User.addresses,
> Address.city=='Mumbai')).all()
>
>
>
> On Thu, May 23, 2019 at 11:46 PM Mike Bayer wrote:
>> __
>>
>>
>> On Thu, May 23, 2
in to it again, to filter it.
>> The transform looks useful.
>>
>> Another thing : Is it possible to specify which relation columns to fetch
>> when i declare the relation ?
>>
>> regards,
>> manoj
>>
>> On Wed, May 22, 2019 at 12:05 PM Mike Bayer
ormance.html#how-can-i-profile-a-sqlalchemy-powered-application
as well as demonstrations at
https://docs.sqlalchemy.org/en/13/orm/examples.html#examples-performance .
>
>
>
> On Wednesday, May 22, 2019 at 4:49:58 PM UTC-7, Mike Bayer wrote:
>>
>>
>> On Wed,
d IN (?, ?, ?) ORDER BY c.b_id
2019-05-22 19:39:25,164 INFO sqlalchemy.engine.base.Engine (1, 2, 3)
>
>
>
>
> So I was wondering if anyone knows of a way to do that query so it is fast.
> Perhaps the 3x number of queries is because it eager loads Address.residents
On Wed, May 22, 2019, at 3:56 PM, bvbav wrote:
> Hi
>
> I was wondering if I can get some advice on this...
>
> Let's say I have these models:
>
> class Pet(db.Model):
> id = db.Column(..., primary_key=True)
> name = db.Column(...)
>
>
> resident_pet = db.Table('resident_pet',
of statement to be
generated using the before_execute or ORM level before_update / etc. events I
illustrated earlier.
>
> On Thursday, May 16, 2019 at 2:49:56 PM UTC-7, Mike Bayer wrote:
>> On Thu, May 16, 2019 at 4:26 PM Tony Cao wrote:
>> >
>> > Ohh I see thanks for the he
On Wed, May 22, 2019 at 1:02 AM Manoj Mokashi wrote:
>
> Hi Michael,
>
> It would be nice to have something like options(filterrelated(relation,
> filter))
> That way, since the join is already specified in the relation, we don't have
> to add it again.
> Or is that difficult due to lazyloading
I hope you can forgive that I've been allowing you to figure this out
on your own as the emails here seem to be more of glimpses of an
in-progress situation rather than something those of us who are
outside of your project can easily engage within, if you are stuck on
something is there any chance
On Fri, May 17, 2019 at 4:39 PM Alex Net wrote:
>
> Hello! I have been writing code that would allow me to read from an Excel
> sheet and writing it in a MS SQL Database. The code was functioning well,
> meaning it was running and writing all cells until it got to cell E,23 ,
> where it
On Fri, May 17, 2019 at 9:43 AM Massi wrote:
>
> Hi,
>
> I'm trying to issue a query in SQL Server via select(cols, cond, ...) and I
> would like to add collation at query execution time for executing the query
> in a case sensitive mode.
> I tried this:
>
> cond = and_(tab.c.col3=="mystring1",
imit(page_size)
> File "", line 2, in limit
>
> File
> "/opt/rh/rh-python36/root/usr/lib64/python3.6/site-packages/sqlalchemy/orm/base.py",
> line 219, in generate
> assertion(self, fn.__name__)
> File
> "/opt/rh/rh-python36/root/usr/li
me what you get if you want to work with that.
>
> On Wednesday, May 15, 2019 at 5:30:06 PM UTC-7, Mike Bayer wrote:
>>
>> On Wed, May 15, 2019 at 6:10 PM Tony Cao wrote:
>> >
>> > I mean query.update().
>> >
>> > Ah our goal was to make it s
the stack trace would show you where it's going wrong. Are you
calling first() on the query? that applies limit(). Stack trace
will show this.Can't apply limit() to a textual query because the
text is already written.
On Thu, May 16, 2019 at 10:16 AM Xander Cage wrote:
>
> hi all.
>
>
enerated by query.update(). See
https://docs.sqlalchemy.org/en/13/orm/events.html?highlight=before_compile_update#sqlalchemy.orm.events.QueryEvents.before_compile_update.
Additional detail regarding .values will be up within 30 minutes.
>
>
> On Wednesday, May 15, 2019 at 2:38:19 PM UT
looks like the before_update event isn't triggered when doing
> bulk query updates, which we'd like to also update on. Is there a way to
> track those?
>
> On Wednesday, May 15, 2019 at 10:38:24 AM UTC-7, Mike Bayer wrote:
>>
>> you can inspect() the object and look at
&g
s looking at the history of the attribute state - is there a
> better way?
>
> On Wednesday, May 15, 2019 at 7:55:44 AM UTC-7, Mike Bayer wrote:
>>
>> On Mon, May 13, 2019 at 4:18 PM Tony Cao wrote:
>> >
>> > Hi all,
>> >
>> > Is there way to u
On Mon, May 13, 2019 at 4:18 PM Tony Cao wrote:
>
> Hi all,
>
> Is there way to use Column.onupdate conditionally? For example, say I have:
>
> class A(Base):
> foo = Column(String)
> bar = Column(String)
> foo_updated = Column(DateTime, onupdate=update_fn) # Should only update
>
On Wed, May 15, 2019 at 5:23 AM Diego Quintana wrote:
>
> Hello again!
>
> This worked, thanks!
>
> I noticed that if I use `bind.connection`, I do not need to call
> `engine.raw_connection` anymore. I wonder why is this. Is this a proxy to a
> raw connection or it was never necessary from the
On Wed, May 15, 2019 at 4:12 AM Marcel Zoll
wrote:
>>
>> Thank you, Mike, for having a look at my clumsy code (there were some
>> mistakes in the code, I only saw later) and making this effort.
>
>
> Firstly, I have done a bit more tinkering yesterday, and also got aware, that
> the Mapper or
Hi there -
I normally wouldn't do things this way, however in seeking to provide
an alternative architecture, the specific example you've given does
work when used with the correct constructs, so I can provide both
architectures. So you would need to illustrate specific scenarios
that aren't
atustype_id > 50)
>
> Le lun. 13 mai 2019 à 16:26, Mike Bayer a
> écrit :
>
>> Hi -
>>
>> I was hoping someone could jump in on this.
>>
>> do you know the SQL that you want to emit? E.g. plain SQL string. I
>> can help you do that part.
>
Hi -
I was hoping someone could jump in on this.
do you know the SQL that you want to emit? E.g. plain SQL string. I
can help you do that part.
On Mon, May 13, 2019 at 9:11 AM Scheck David wrote:
>
> I think I'm near but I can't finish :
>
> for all the structure : https://dpaste.de/fek5#L
On Fri, May 10, 2019 at 10:34 AM Diego Quintana wrote:
>
> Thanks for your answer. If I got this right, it makes sense to think of two
> different transactions happening, being the second one not able to "see" what
> the first has done (e.g. creating tables) until it has finished (i.e. when
>
On Fri, May 10, 2019 at 7:09 AM Diego Quintana wrote:
>
> Hello! I'm trying to seed my database using my first migration script, and I
> have trouble understanding what `op.get_bind()` returns, and mainly the
> difference between `Connection` and `engine.connection()`. Say I have a
> migration
is the general idea, one attribute that is merging two totally
different relationships? You'd just build a @property that creates a
view of the two relationships when accessed. Kind of like an
association proxy, but less flexible and read-only.
On Thu, May 9, 2019 at 6:38 AM Julien Cigar
query_str_with_hint = query_str[:sel_ind + 6] + hint_str +
>> query_str[sel_ind+6:]
>> query_stmt_with_hint = text(query_str_with_hint,
>> bindparams=query_binds)
>> query =
>> db.session.query(ProvenancePrototype).from_statement(query_stmt_with_hint)
>>
>
Update, please use prefix_with(), sorry I forgot this goes into the right place:
query.prefix_with("/*+ MAX_EXECUTION_TIME(3) */")
will add a note to the docs
On Wed, May 8, 2019 at 10:11 AM Mike Bayer wrote:
>
> Additionally, those hints seem to be a new
Additionally, those hints seem to be a new feature
(http://mysqlserverteam.com/whats-new-in-mysql-5-7-first-release-candidate/)
for a hint format that was previously not present in MySQL and don't
seem to be present in MariaDB either, and surprisingly enough they
look just like Oracle optimizer
Hi there-
I see you are using str() to get the string representation, which will
not give you a MySQL representation. DId you read
https://docs.sqlalchemy.org/en/13/faq/sqlexpressions.html#how-do-i-render-sql-expressions-as-strings-possibly-with-bound-parameters-inlined
?
On Wed, May 8, 2019
On Mon, May 6, 2019 at 5:12 PM Chris Stephens wrote:
>
> Is is possible to implement the following behavior in SQLAlchemy against an
> Oracle database? (Bulk inserts returning PK IDs generated by trigger/sequence
> on PK column in database)
The code you have already does what you need and is
On Mon, May 6, 2019 at 12:06 AM wrote:
>
> Suppose the following code:
>
> # We define a base for all DB objects, currently empty.
> class _Base:
> pass
>
> Base = declarative_base(cls=_Base, metadata=MetaData(naming_convention=…))
>
> # Then the objects.
> class User(Base):
>
still looks like DOUBLE should be dealing with Python floats.
DOUBLE_PRECISION in the Oracle dialect is also Float and doesn't
default to decimal coercion.
We can fix this problem, it's just one of those changes that you have
to warn users like crazy on and then just do the change on a major
es which I largely copied without deeply
considering it beyond the heavy thinking they did up front; the pycon
talk I did after several years of learning how the Session was
actually supposed to work which itself required that I redesigned half
the thing in version 0.5.
>
> -Lyla
>
&g
On Mon, Apr 29, 2019 at 1:13 PM mdob wrote:
>
> Just out of curiosity, why it was decided that MySQL DOUBLE, which is
> approximation, will be presented in ORM as Decimal by default instead of
> float?
>
> MySQL DOUBLE -
> https://dev.mysql.com/doc/refman/5.5/en/floating-point-types.html
>
gt; object just knows which TasselThreads are its own. That doesn't fit the
> common university model of the way foreign key only one-to-many relationships
> work, but I didn't think about it too hard. I was just thinking that "yes, of
> course you need to persist the head before pe
On Mon, Apr 29, 2019 at 7:22 AM Lyla Fischer wrote:
>
> If I can comment on what seems instinctive to someone who just recently read
> the documentation, and made assumptions based off of it: My understanding was
> that the relationship abstractions were supposed to be about making foreign
>
depending on the cascading to get
> everything into the database and linked up appropriately, andt I might need
> to spend some time studying exactly how cascading works in order to be able
> to reliably use the relationship feature in the future.
>
> -Lyla
>
> On Su
://github.com/sqlalchemy/sqlalchemy/issues/4647
On Sun, Apr 28, 2019 at 12:26 PM Mike Bayer wrote:
>
> Hi there,
>
> I appreciate everyone chiming in to look at this!
>
> However, it's something simple and has to do with one of the API
> quirks that we have to decide if we w
Hi there,
I appreciate everyone chiming in to look at this!
However, it's something simple and has to do with one of the API
quirks that we have to decide if we want to keep long term.
Background is at
https://docs.sqlalchemy.org/en/13/orm/cascades.html#backref-cascade.
Basically, when you do
d raise for this condition, e.g. pointing
it to itself.
On Thu, Apr 25, 2019 at 11:00 AM Mike Bayer wrote:
>
> On Thu, Apr 25, 2019 at 8:34 AM Jan Sakalos wrote:
> >
> > Hello,
> >
> > I have to association proxies in code one is working and other not. I went
>
On Thu, Apr 25, 2019 at 8:34 AM Jan Sakalos wrote:
>
> Hello,
>
> I have to association proxies in code one is working and other not. I went
> through it many times and wasnt able to identify issue.
> Also please can you give me advice how to debug such issues if there is any?
The error is that
On Wed, Apr 24, 2019 at 12:19 PM Markus Elfring wrote:
>
> > Why not report these problems to the cochinelle tool
> > which you are trying to integrate ?
>
> I suggest to take another look at corresponding information sources.
> https://systeme.lip6.fr/pipermail/cocci/2019-April/thread.html
>
901 - 1000 of 3784 matches
Mail list logo