Hi there,
We are migrating our code from SqlAlchemy 1.4 to 2.0 (2.0.23 to be
specific).
We have had the following, which allowed some classes inheriting from
our Base to use an ABCMeta metaclass:
---
class DeclarativeABCMeta(DeclarativeMeta
t 20, 2023, at 10:46 AM, 'Tony Cosentini' via sqlalchemy wrote:
>
> Oh I see, thanks for clarifying.
>
> I'm trying to detect cases where we depend on the autoflush behavior. For
> example, in the sample above, when the query runs with no_autoflush, we
> won'
3, at 9:50 AM, 'Tony Cosentini' via sqlalchemy wrote:
>
> Weird, I did try that but I can't seem to trigger it.
>
> Here's a self-contained test:
> https://gist.github.com/tonycosentini/4dee3478695d032ca67707b5e26739b6
>
>
>
> the object was not affe
ke_not_on_goo...@zzzcomputing.com> wrote:
>
>
> On Fri, Oct 20, 2023, at 8:08 AM, 'Tony Cosentini' via sqlalchemy wrote:
>
> Hi,
>
> Is there any way to listen for an event for when a query result gets
> merged into a pre-existing object in the session?
>
>
> this
.all() query get merged back in with the
existing objects in the session.
Thanks,
Tony
--
SQLAlchemy -
The Python SQL Toolkit and Object Relational Mapper
http://www.sqlalchemy.org/
To post example code, please provide an MCVE: Minimal, Complete, and Verifiable
Example. See http://stackoverf
n the claimed method is not callable like
documented). This was the case in 1.4
(https://github.com/sqlalchemy/sqlalchemy/blob/rel_1_4/lib/sqlalchemy/sql/dml.py#L345)
already and also in 2.0
(https://github.com/sqlalchemy/sqlalchemy/blob/main/lib/sqlalchemy/sql/dml.py#L438).
However, trying to c
annot just
leave it as-is).
Unfortunately, this causes problems as SQLAlchemy attempts to handle the
new value:
Error Traceback (most recent call last): File
"/Users/lucadou/IdeaProjects/person-api/api/unit_tests/test_person_service.py",
line 601, in test_get_people_
tails to the
> concrete class you wish to persist and query, then you'd do the suggested
> "enable_typechecks=False". There is no attribute in SQLAlchemy named
> "meta" and no stack trace is given here so I dont know to what that refers.
>
> Overall
type polymorphically, or set enable_typechecks=False to allow
any subtype to be accepted for flush.
I did try setting enable_typechecks to False, but this results in a
different error when attempting to use getattr on the subclass:
AttributeError: 'Person' object has no attribute '
query. This seems to break the example code for dogpile
caching.
I was hoping to get some advice on how to implement the caching using the
new unified sa.select and Session.execute/Session.scalars interface, or
even whether dogpile cache supports this interface yet?
Thanks in advance,
Joe
Hi Pierre,
This isn't an official answer, I'm just a long time user of SQLAlchemy.
Either way should work fine. The association object is driven by the
columns on the association table being FKs, whether or not they're part of
a PK isn't relevant.
I've used both w
pper so that you can apply
> things after the fact, a good event for this would be "instrument_class":
> https://docs.sqlalchemy.org/en/20/orm/events.html#sqlalchemy.orm.MapperEvents.instrument_class
>
>
> On Wed, May 3, 2023, at 4:18 AM, 'Tony Cosentini' vi
he hood.
Any ideas on if it's possible to combine this into some kind of reusable
utility to DRY it up?
I'm not sure how important it is, but I'm still on 1.4.x, haven't made the
jump to 2.x yet.
Thanks!
Tony
--
SQLAlchemy -
The Python SQL Toolkit and Object Relationa
eliminate much of what the query is producing?
From: 'Dan Stromberg [External]' via sqlalchemy
Date: Tuesday, March 21, 2023 at 9:05 AM
To: sqlalchemy@googlegroups.com
Subject: Re: [sqlalchemy] Test query seems to spuriously give
sqlalchemy.exc.OperationalError: (MySQLdb.OperationalEr
mberg [External]' via sqlalchemy
Date: Tuesday, March 21, 2023 at 9:05 AM
To: sqlalchemy@googlegroups.com
Subject: Re: [sqlalchemy] Test query seems to spuriously give
sqlalchemy.exc.OperationalError: (MySQLdb.OperationalError) (1054, "Unknown
column 'tb_br.id' in 'on clau
ed to aggregate? Or perhaps change sql_mode?
Thanks!
From: sqlalchemy@googlegroups.com on behalf of
Mike Bayer
Date: Monday, March 20, 2023 at 5:33 PM
To: noreply-spamdigest via sqlalchemy
Subject: Re: [sqlalchemy] Test query seems to spuriously give
sqlalchemy.exc.OperationalError: (MySQLdb.Ope
Here’s the select, and most of the from clause:
select nv.id, min(bs.build_id) as min_build_id
from tb_v as v,
tb_nv as nv,
tb_bs as bs,
tb_br as br,
From: 'Dan Stromberg [External]' via sqlalchemy
Date: Monday, March 20, 2023 at 2:16 PM
To: sqlalchemy@googlegroups.com
S
I’m getting some pushback internally, from my team lead – he and I both think
it’s probably too much detail to share. It’s 43 lines of SQL with multiple
subqueries.
Would just the simplest parts of the from clause work?
From: sqlalchemy@googlegroups.com on behalf of
Mike Bayer
Date
ch_id))
)
…which also gave:
(1054, "Unknown column 'tb_br.id' in 'on clause'")
I’m guessing I’m missing something simple, but I have no idea what.
Any (further) suggestions?
From: sqlalchemy@googlegroups.com on behalf of
Mike Bayer
Date: Saturday, Mar
Sorry, I don’t know why Google Groups decided to aggregate a few lines into 2
large lines. Here’s that list of versions again. Hopefully GG will be
appeased this time.
I'm using:
$ python3 -m pip list -v | grep -i sqlalchemy
Flask-SQLAlchemy 2.5.1
/data/home/dstro
r database host
IDB Your initial database
"""
import os
import pprint
from sqlalchemy import create_engine, select
from sqlalchemy.orm import aliased, sessionmaker, declarative_base
from sqlalchemy.sql.expression import func
from flask_sqlalchemy import SQLAlchemy
db = SQLAlch
try adding
> session.expunge_all() before the query and see if that makes things look
> more expected.
>
> On Thu, Jan 5, 2023, at 1:27 AM, 'Tony Cosentini' via sqlalchemy wrote:
>
> Ok, I was able to at least create a script that easily reproduces what I'm
>
b
>>> property in the future, only specific columns are loaded in at first.
>>>
>>> I can do this if I just query for model_b via the foreign key instead of
>>> using the relationship property, but I'd like to avoid that if possible.
>>>
>>>
at first.
>>
>> I can do this if I just query for model_b via the foreign key instead of
>> using the relationship property, but I'd like to avoid that if possible.
>>
>> Sorry if this question is a bit weird/confusing, it's kind of a strange
>> use c
use
case.
Thanks,
Tony
--
SQLAlchemy -
The Python SQL Toolkit and Object Relational Mapper
http://www.sqlalchemy.org/
To post example code, please provide an MCVE: Minimal, Complete, and Verifiable
Example. See http://stackoverflow.com/help/mcve for a full description.
---
You received thi
uld be much appreciated! thanks
>>
>> https://www.sqlalchemy.org/blog/2022/11/12/sqlalchemy-1.4.44-released/
>>
>>
>>
>> On Fri, Nov 11, 2022, at 11:42 AM, Mike Bayer wrote:
>>
>> We've identified a significant source of memory over-use in the 1.
ing an exception:
*obj = MailingListView()obj.town = "town" # this raises an exception with
unavailable property*
How is it possible for a postgresql db (asyncpg) + async sqlalchemy to:
Synchronise the columns of a declarative model with its underlying table
after metadata reflection. Curr
ith your
> application and let me know if you see improvements in memory use for your
> memory-intensive case, that would be much appreciated! thanks
>
> https://www.sqlalchemy.org/blog/2022/11/12/sqlalchemy-1.4.44-released/
>
>
>
> On Fri, Nov 11, 2022, at 11:42 AM, Mike Bay
stems from. Is there anything I can do to support this?
Thanks in advance
--
SQLAlchemy -
The Python SQL Toolkit and Object Relational Mapper
http://www.sqlalchemy.org/
To post example code, please provide an MCVE: Minimal, Complete, and Verifiable
Example. See http://stackoverflow.com/help/
I'll report back if we see any changes.
>
> Thanks again for the fast reply (and for building such a useful + well
> documented library),
> Tony
> On Friday, October 21, 2022 at 12:20:07 PM UTC+8 Mike Bayer wrote:
>
>>
>>
>> On Fri, Oct 21, 2022, at 12:
AM, 'Tony Cosentini' via sqlalchemy wrote:
>
> Hi,
>
> We recently upgraded our application (a Flask web app) from SQLAlchemy
> 1.3.19 to 1.4.41.
>
> Overall things are stable, but we have noticed a very large increase in
> memory use:
> [image: Screen Shot 2022-10-
Hi,
We recently upgraded our application (a Flask web app) from SQLAlchemy
1.3.19 to 1.4.41.
Overall things are stable, but we have noticed a very large increase in
memory use:
[image: Screen Shot 2022-10-21 at 11.26.18 AM.png]
Is this from the new query caching feature? I'm planni
You should ask this in a Flask discussion group or stackoverflow. This is
a sqlalchemy group and most users here have no experience with Flask.
On Friday, August 19, 2022 at 4:13:50 PM UTC-4 nand...@gmail.com wrote:
> I am trying to fill up a field in a table database with contents of a t
ithin the "
> process_result_value" method of a TypeDecorator?
>
> For example, I want to decrypt the value but only if another value in the
> same model row is true/false.
>
> Regards,
> Justin
>
>
>
--
SQLAlchemy -
The Python SQL Toolkit and Object Relational Mapper
I think you misunderstand `exists()` in SQLAlchemy and SQL. `exists()` is
a convenience function to create a SQL `EXISTS` clause, which is an
operator used for filtering subqueries.
The 'from_exists' is just a subquery. It is supposed to be used within a
query which would then
27;t be passing ORM objects to threads, but rather
>> just passing IDs and then querying the full object in the thread function.
>> Does that hunch sound correct?
>>
>
--
SQLAlchemy -
The Python SQL Toolkit and Object Relational Mapper
http://www.sqlalchemy.org/
To post e
gt; I'm guessing we shouldn't be passing ORM objects to threads, but rather
> just passing IDs and then querying the full object in the thread function.
> Does that hunch sound correct?
>
--
SQLAlchemy -
The Python SQL Toolkit and Object Relational Mapper
http://www
property.
I'm guessing we shouldn't be passing ORM objects to threads, but rather
just passing IDs and then querying the full object in the thread function.
Does that hunch sound correct?
--
SQLAlchemy -
The Python SQL Toolkit and Object Relational Mapper
http://www.sqlalchemy.org/
To
andas (and SQLAlchemy's ORM) is a lot of
overhead - and that grows with the result size.
You can use memory and code profiling tools to explore this and see where
the issues are. The best approach is what Philip suggested above though,
and not use pandas, so you can see how Python/SqlAlche
('IM002', '[IM002]
>> [Microsoft][ODBC Driver Manager] Der Datenquellenname wurde nicht gefunden,
>> und es wurde kein Standardtreiber angegeben (0) (SQLDriverConnect)')
>> (Background on this error at: http://sqlalche.me/e/14/rvf5)
>>
>> i have i
The Sybase dialect was deprecated from first-party support by SQLAlchemy
and is currently unsupported.
Gord Thompson, who is a frequent contributor to the core SQLAlchemy
project, and has generously taken over responsibility for the original
dialect as a third-party dialect::
https
ABc";
CREATE DATABASE "ABC";
.. etc..
On Thursday, March 31, 2022 at 2:39:32 PM UTC-4 ois...@gmail.com wrote:
> Hi everyone, I have a question
>
> I use Postgresql
> Before creating a database, the name is uppercase and lowercase, and there
> is no problem.
>
I'm sorry you're getting bit by this messaging - but also glad that I'm not
the only one. This got me a while ago too.
SqlAlchemy just uses a bare field name when emitting the warning and
accepting the `overlaps` arguments. In more complex models with 3+ tables
that h
ationship(cls.__flaw_parent__, lazy='raise_on_sql'))
I realize I have an event ordering issue with the way this is setup. Just
not sure what the correct way is to solve it.
Thanks in advance for any help you can provide.
--
SQLAlchemy -
The Python SQL Toolkit and Object Relational
That worked brilliantly, thanks so much for your help!
Very much appreciated :)
On Tuesday, 14 December 2021 at 18:16:02 UTC Mike Bayer wrote:
>
>
> On Tue, Dec 14, 2021, at 12:26 PM, 'Daniel Grindrod' via sqlalchemy wrote:
>
> Hi Michael,
>
> Thanks for such a q
ete code I sent across).
Could you please advise on how to correctly structure this query?
Thanks again,
Dan
On Tuesday, 14 December 2021 at 13:31:12 UTC Mike Bayer wrote:
>
>
> On Tue, Dec 14, 2021, at 5:40 AM, 'Daniel Grindrod' via sqlalchemy wrote:
>
> Hi all,
>
&
Hi all,
I'm working on a REST API which is built using Flask-SQLAlchemy and
Connexion. I'm fairly new to SQLAlchemy, but it's been brilliant so far
:) This API uses SQLAlchemy 1.3.16, and connects to an Oracle Database (12c
12.1.0.1.0 64bit).
<https://stackoverflow.com/posts
g table data - the
structure, size, etc. Adding indexes on columns can often improve
performance a lot.
If you're really concerned on optimizing this, the typical approach is to
focus on generating the target SQL query that works within the performance
constraints you want, and then porting it t
any help is appreciated?
>
> I am working with sqlalchemy core and async engine. Column definition:
> *Column('test', DateTime(timezone=True), nullable=False)*
>
> Also tried with this, but no luck:
>
> *_connect_args = {'server_settings': {'
certain attributes null) and never commit them to the
> database (in before_flush).
>
> I realise this is a somewhat confusing question, sorry, and I can probably
> fix my code anyway. I am just looking for some peace of mind in
> understanding how on earth it ever worked.
>
> Than
The first two things I would look into:
1. Check the sqlite install/version that SqlAlchemy uses. It is often NOT
the same as the basic operating system install invoked in your terminal.
Sometimes that version does not have the functionality you need.
2. Check the transactional isolation
Info meant to be many-to-many? And likewise
> the relationship between Text and Info?
>
> Forgetting SQLAlchemy for a moment, what is the SQL that you want to
> produce?
>
>
> Does the script below do what you want?
>
>
> import sqlalchemy as sa
> import sqlalche
I am trying to figure out the correct join query setup within SQLAlchemy,
but I can't seem to get my head around it.
I have the following table setup (simplified, I left out the non-essential
fields):
[image: Unbenannt.png]
[image: Unbenannt2.png]
The facts are associated to info, in
I am trying to figure out the correct join query setup within SQLAlchemy,
but I can't seem to get my head around it.
I have the following table setup (simplified, I left out the non-essential
fields):
```pyhton
"facts_info", Base.metadata,
sqlColumn("fact_id", Int
I am trying to figure out the correct join query setup within SQLAlchemy,
but I can't seem to get my head around it.
I have the following table setup (simplified, I left out the non-essential
fields):
```pyhton
"facts_info", Base.metadata,
sqlColumn("fact_id", Int
; I am using sqlalchemy 1.4.22 and cx oracle 8.2.1 to connect to production
> and development environments that each host a similar copy of the same
> schema.
>
> The connection string that I use is the same for each excluding the
> password:
>
> oracle+cx_oracle://user:
:19:35 AM UTC-4 dcab...@gmail.com wrote:
> Hello everyone,
>
> I am working on a new project using SqlAlchemy Core 1.4 with Postgresql
> and wanted to implement the following pattern for my tests:
>
> - Before each test I would start a transaction (in a
> @pytest.fixture(autoru
>
> Hope that helps,
>
> Simon
>
> On Fri, Jul 30, 2021 at 5:10 PM 'Jonathan Vanasco' via sqlalchemy
> wrote:
> >
> > Mike, thanks for replying but go back to vacation.
> >
> > Anyone else: I am thinking more about an event that can be used to
//docs.sqlalchemy.org/en/14/core/custom_types.html#coercing-encoded-strings-to-unicode
>
>
>
> On Thu, Jul 29, 2021, at 5:17 PM, 'Jonathan Vanasco' via sqlalchemy wrote:
>
> I am finally at the tail end of migrating my largest (and hopefully last)
> Python2 applicatio
I am finally at the tail end of migrating my largest (and hopefully last)
Python2 application to Python3.
An issue that has popped up a lot during this transition, is when a py3
bytestring gets submitted into SqlAlchemy.
When that happens, it looks like SqlAlchemy just passes the value into
e problem today, found your post by searching for "sqlacodegen table
> class."
>
> Something in this semi-unrelated post
> <https://groups.google.com/d/msg/sqlalchemy/uQ7MijlHW1Y/3xaA7vJ6BwAJ> by
> Mike Bayer prompted me to check to see what was different about the
> If not I wonder why messages aren't arriving in my INBOX.
Check your settings for this group. If you do not see the option on the
menu, try visiting https://groups.google.com/g/sqlalchemy/membership
Google sometimes has a product change de-selects the email delivery
option. Sometim
BUG:sqlalchemy.engine.base.Engine:Col ('id',)
DEBUG:sqlalchemy.engine.base.Engine:Row (19,)
INFO:sqlalchemy.engine.base.Engine:COMMIT
Should I be seeing something in the logs about an invalidated connection?
Or am I not forcing an invalid connection correctly?
Thanks for the feedback!
-m
parameters are of my particular failure.
Pre ping doesn't seem like it allows for any sort of length of time before
failing.
I don't know if this offers any more clarity to what I'm experiencing and
what I'm trying to code around.
Thanks again for the help and dialogue!
-m
ns mid
transaction) and because I felt I could control the number of retries and
put in an exponential backoff.
Do you suggest I use the custom pessimistic ping code:
https://docs.sqlalchemy.org/en/14/core/pooling.html#custom-legacy-pessimistic-ping
to add in exponential backoff or add addit
Greetings SQLAlchemy folks,
I am following the guide at [0] for recovering from a database error in my
SQLAlchemy code.
I normally use sessions for my SA work and am wondering if sessions will
work with the aforementioned SA example. My initial attempt to combine the
example at [0] with sessions
On Tue, Apr 20, 2021 at 1:14 PM Mike Bayer wrote:
>
>
> On Tue, Apr 20, 2021, at 1:52 PM, 'Matt Zagrabelny' via sqlalchemy wrote:
>
> Greetings SQLAlchemy,
>
> I'm attempting to use the next_value function to get the (next) value from
> a sequence:
>
>
Greetings SQLAlchemy,
I'm attempting to use the next_value function to get the (next) value from
a sequence:
cycle_counter = next_value(Sequence('cycle_seq'))
print(cycle_counter)
However, the print statement yields:
Does anyone know the correct way to get
t;: ChildClass.TypID(),
}
And as I said: Thanks a lot!
SirAnn
-- Originalnachricht --
Von: "Simon King"
An: sqlalchemy@googlegroups.com
Gesendet: 12.04.2021 20:26:48
Betreff: Re: Re[2]: [sqlalchemy] Invertinace mapped type_id to fix value
for each child class
Here&
_mapper_args__ = {
'polymorphic_identity': 7,
}
leads to:
venv\lib\site-packages\sqlalchemy\orm\mapper.py", line 1542, in
_configure_polymorphic_setter
self.polymorphic_on = self._props[self.polymorphic_on]
KeyError: 'typ_id'
raise exception
sqlalchem
fact that type_id ha a foreign key ...
right know I get an error:
c = ChildClass()
db.session.add(c)
db.session.commit()
c.typ -> UnmappedColumnError('No column objekt.typ_id is configured on
mapper mapped class ChildClass1->child_class1...')
SirAnn
--
SQLAlchemy -
The Python SQL To
ekt.id'),
primary_key=True)
text = db.Column(db.String(255 ), default='')
__mapper_args__ = {
'polymorphic_identity':'child_class1',
}
any ideas where to look? I though on polymorphic_on, but I think that
does not work because of the fact th
#sqlalchemy.create_engine.params.label_length
I don't have Oracle, so I am not sure if this fixes your exact problem or
just related ones.
`label_length` will limit the length of aliases that sqlalchemy generates.
so you would see something like this:
- SELECT very_long_table_name_i_mean_it_is_long.
Going beyond what Simon did..
I typically make make a table like `user_transaction`, which has all of the
relevant information for the transaction:
* User ID
* Timestamp
* Remote IP
Using the sqlalchemy hooks, I'll then do something like:
* update the object table with the user_transacti
27;Jonathan Vanasco' via sqlalchemy wrote:
>
> I have a project that, in a few rare situations, may run on a version of
> sqlite that does not support function indexes, and "need" to run a unique
> index on `lower(name)`. For simplicity, I'll just use a normal i
ay to implement this.
1. in terms of sqlite3, what is the best way to access the version
Sqlalchemy is using? the import is in a classmethod, and could either be
pysqlite2 or sqlite3? i seriously doubt anyone would deploy with
pysqlite2, but I feel like I should do things the right way.
2. Wha
version, and there are critical features/bugfixes in the
newer branch.
You're likely to get a good chunk of time out of 1.4, but I would not
target 1.3 at this point.
On Monday, March 1, 2021 at 9:45:55 AM UTC-5 aa@gmail.com wrote:
> yes so, SQLAlchemy 2.0's approach is frankly
ery row.
On Friday, February 12, 2021 at 2:06:55 PM UTC-5 christia...@gmail.com
wrote:
> Hi Vineet, Mike,
>
> @Vineet, thank you for the interesting blog post on bulk insert with
> SQLAlchemy ORM:
> https://benchling.engineering/sqlalchemy-batch-inserts-a-module-for-when-y
This is, IMHO, one of the most complex parts of SQLAlchemy.
In this public project, i have a handful of secondary/secondaryjoin
examples that may help you
https://github.com/aptise/peter_sslers/blob/main/peter_sslers/model/objects.py#L3778-L4714
There is a section in the docs that should help
he "twophase" flag which I
> think we needed for some of our more elaborate tests. At the moment,
> create_xid() emits a deprecation warning. I've been in contact with Oracle
> devs and it looks like we should be supporting 2pc as I can get help from
> them now
Ok. I'll generate a docs PR for sqlalchemy and pyramid. this comes up so
much.
On Wednesday, January 27, 2021 at 2:25:29 PM UTC-5 Mike Bayer wrote:
>
>
> On Wed, Jan 27, 2021, at 1:12 PM, 'Jonathan Vanasco' via sqlalchemy wrote:
>
> I've been working with
I've been working with a handful of SQLAlchemy and Pyramid based projects
recently, and two situations have repeatedly come up:
1. Given a SQLAlchemy Object, access the SQLAlchemy Session
2. Given a SQLAlchemy Object or Session, access the Pyramid Request object
The general solutions I
2021 at 8:32:34 AM UTC-5 tfl...@gmail.com wrote:
> Hi,
> I'm actually using SQLAlchemy with Pyramid and zope.sqlalchemy packages.
> My main database connection is a ZODB connection and, when required, I
> create an SQLAlchemy session which is joined to main transaction using this
Glaser, wrote:
> Hi all, we've been working towards building Role-Based Access Control
> (RBAC) features into our libraries at oso. We had released a preview of
> those features in our sqlalchemy-oso package, and since then have polished
> those features up, written some
Ah. I see. Thus this was a newbie question. Thanks again!
Mike Bayer schrieb am Fr. 18. Dez. 2020 um 19:44:
> hey there -
>
> you can assign the "id" but that doesn't give SQLAlchemy any clue that you
> are working with the "daughter" relationship so it does
This example fails. Instead of assigning an objekt, I assign just the
daughters id ...
But I think that's "correct"?
from sqlalchemy import Column
from sqlalchemy import create_engine
from sqlalchemy import ForeignKey
from sqlalchemy import Integer
from sqlalchemy.ext.dec
Hi Mike
Thanks for looking at my code. Next time I'll post an testcase like you.
Sorry for that one. And I cannot believe it. But it works now.
I also updated SQLAlchemy, flast-RESTful, flask-migrate and so on, to
their newest version.
And now it seems to work. And problem befor
.session.commit()
m1.daughter = d2
db.session.commit()
everything is correct EXCEPT:
*m2.daughter! *it still points on d2 instead of None. And the table
contains still the daughter_id of d2.
Thus, what foreign key did I miss?
All the best and stay healthy!
SirAnn
--
SQLAl
This was not clear enough in Mike's post: `Foo.__table__` is the same type
of object as `_foo = table(...)`. SQLAlchemy ORM is built on top of
SQLAlchemy's Core, so the ORM's `.__table__` attribute is the Core's
`table()` object.
Since they're the same, the two will
-associate objects that belonged to the first session
> with a newly opened one? What’s the recommended approach here, does SQLA
> have any magic in store to help me with very long-lived ORM objects across
> db sessions? Or should I manage that data independently of their respective
>
Your new code is exactly what I have been running on several production
systems, so it looks good to me!
Long story short, `zope.sqlalchemy` had been using the `sqlalchemy`
"extensions", which were deprecated in 2012 and are set to be removed (if
they haven't been alread
I used to find MS Access to be a very useful tool in the right hands. I've
been doing some python script coding in LibreOffice Base and started
looking at sqlalchemy it looks as if it wouldnt be too much of a job to add
the components necessary to turn LO Base front end into something no
the Unit of Work, as mike said, you need
to delete and add (and also update it would seem).
--
SQLAlchemy -
The Python SQL Toolkit and Object Relational Mapper
http://www.sqlalchemy.org/
To post example code, please provide an MCVE: Minimal, Complete, and Verifiable
Example. See http://s
g using
> executemany_mode='values'.
>
> My idea is to call nextval() on the sequence before insert and fill in the
> values client side, before inserting.
>
> select nextval('mysql') FROM generate_series(1,...)
>
> Everything looks good, except for the
ype and then remove..
>
> so for example. if lesson_id matches 107 and the same entry includes
> device_type_id = 7 i want to remove this whole entry
>
> --
> SQLAlchemy -
> The Python SQL Toolkit and Object Relational Mapper
>
> http://www.sqlalchemy.org/
>
> To
> i have this litte flask-admin game running, now out of nowwhere
sqlalchemy has begun to add strange "_1" suffixes to the column names. i
know sqlalchemy does this to keep names unique, but in my case the queries
are failing
SQLAlchemy does do this, for those reasons, and t
generates a
> different string each encryption for the same string.
>
What are you using for your encryption key? The key should be persistent,
and should always generate the same output for a given input. In the
example from Michael Bayer, a random uuid is used as a placeholder.
--
SQLA
ly
take a few ms to get all that into a python datastructure that is used to
generate your csv
--
SQLAlchemy -
The Python SQL Toolkit and Object Relational Mapper
http://www.sqlalchemy.org/
To post example code, please provide an MCVE: Minimal, Complete, and Verifiable
Example. See http:
On Monday, July 6, 2020 at 2:14:33 PM UTC-4, Saylee M. wrote:
> So, when I passed the query to MySQL directly, it took very less time
> (around 0.016 seconds) but when I passed the same
> query through SQLAlchemy connector, it took around 600 seconds
>
"query ... MySQL
On Monday, June 29, 2020 at 8:00:40 PM UTC-4, gbr wrote:
>
>
> I'm using SQLAlchemy's Core to interface a postgres database (via
> psycopg2) component alongside Flask-SQLAlchemy in a Flask app. Everything
> was working fine until I recently discovered what seems to be
1 - 100 of 209 matches
Mail list logo