As you know SQLAlchemy has to call setinputsizes. This is an event hook
that let's you change what it will do. You use event.listen along with
your create_engine call and that's it. The rest of that program is just an
example.
On Wed, Jun 27, 2018, 2:59 PM naor volkovich wrote:
> Thanks for
Thanks for adding this feature!
Since I don't know SQLAlchemy that good yet, can you explain exactly what's
going on?
Do I have to do all the Base related lines? What do they do?
If I add this event for an engine in one file/class, does it affect that
engine when passed around to other
the feature at https://gerrit.sqlalchemy.org/#/c/zzzeek/sqlalchemy/+/795/
will be part of SQLAlchemy 1.2.9 and will allow the following program
to work:
from sqlalchemy import *
from sqlalchemy.orm import *
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy import event
Adding to Mike's response...
I think you're using two sessions...
you select this:
user = Users.query.filter_by(username='foo').first()
and save this
db.session.add(user)
when you select, i think that's using some flask-sqlalchemy syntactic sugar
to select the session. a 'raw'
I apologize for my inpatient tone in my previous email. I would hope that
everyone in this mailing list feels welcome.
On Wed, Jun 27, 2018, 10:59 AM Mike Bayer wrote:
> this is a very simple issue to debug with basic programming
> techniques, first off, put echo='debug' in your create_engine
On Wed, Jun 27, 2018 at 3:22 AM, arjun k wrote:
> Hi
> i was trying to convert the below query to sqlalchemy
>
>
> SELECT
>addr_idn,
>(SELECT MAX(LastUpdateDate)
> FROM (VALUES (crt_dt),(upd_dt),) AS UpdateDate(LastUpdateDate))
>AS LastUpdateDate
> FROM (
> select a.
this is a very simple issue to debug with basic programming
techniques, first off, put echo='debug' in your create_engine so you
can see all SQL and results:
e = create_engine("postgresql://scott:tiger@localhost/test", echo='debug')
next, if you are running over to a SQL command line vs.
On Wed, Jun 27, 2018 at 5:14 AM, wrote:
> Hello,
>
> I'm hoping someone might have advice on how to track down this problem or
> what might be causing it. I don't have code that I can use to recreate the
> issue as I'm not able to recreate it outside of one instance of the same
> codebase (I've
Ok. I ran the script 10 times on a clean table.
Now I run raw sql:
SELECT *
FROM test_user
WHERE (last_receive_time + INTERVAL '1 second' * timeout) < NOW();
The result: 10 records.
Now I run script one more time. Still 0 records using from_statement.
amount records using NOW() = 0
As I
Hello,
I'm hoping someone might have advice on how to track down this problem or
what might be causing it. I don't have code that I can use to recreate the
issue as I'm not able to recreate it outside of one instance of the same
codebase (I've got a local development environment, and two test
Hi
i was trying to convert the below query to sqlalchemy
SELECT
addr_idn,
(SELECT MAX(LastUpdateDate)
FROM (VALUES (crt_dt),(upd_dt),) AS UpdateDate(LastUpdateDate))
AS LastUpdateDate
FROM (
select a. addr_idn,a.crt_dt crt_dt , b.upd_dt upd_dt
from emp_addr
where
11 matches
Mail list logo