Hi Everyone,
SQLAlchemy nicely reflects tables and builds model using automap. When
providing the parameter shema to reflect, tables from that schema are
discovered. I've noticed that tables from other schemas will also be
included if there is a foreign key to the other schema.
It's all
Hi everyone,
There's IMO unusual behavior in Oracle when using bound parameters on NCHAR
column.
from sqlalchemy import create_engine
from sqlalchemy.sql import text
e = create_engine('oracle://chinook:p4ssw0rd@localhost/xe')
result = e.execute(
text("select * from nchartable where id
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
SQLAlchemy DOUBLE -
Hi,
Is it correct behavior that parameter placeholders *in quotes* e.g. SELECT *
FROM Artist WHERE Name LIKE "%:pattern%" are recognized as valid parameters?
from sqlalchemy.sql import text
from sqlalchemy.dialects import sqlite
from sqlalchemy import create_engine
engine =
Hi,
I was looking into create_engine options enocding and convert_unicode and
it seems it works for ORM but not for executing raw sql.
Is that intentional or I'm missing something?
from sqlalchemy import create_engine
from sqlalchemy.orm import Session
from sqlalchemy.ext.automap import
Hi,
I've upgraded SQLAlchemy from 1.0.18 to latest 1.2.8 and I get errors that
_exec_default() received wrong number of parameters. I've pinpointed that
problem appears since version 1.2.0b3.
Looks like inside method get_insert_default
Hi SQLAlchemy Group,
I've been experimenting with automap (in SQLAlchemy 1.0.20) a bit and I
wonder how safe is to automap multiple databases in threads because I run
into random errors of classes not being mapped:
One or more mappers failed to initialize - can't proceed with
initialization
Just curious. Let's say we have a complex primary key of user_id (integer),
project_id (integer) and date (timestamp). After adding and committing we
don't have the PK and we won't be able to update it. Is that right?
If it was auto-increment integer then it would probably be fine. PK would
be
Me again.
Just wanted to say that
engine = create_engine(connstr, implicit_returning=False, use_scope_identity
=True, echo=True)
actually works as expected. I was able to add new objects without select
permission on table :)
On Wednesday, August 10, 2016 at 5:33:30 PM UTC+2, mdob wrote
Hi Everyone,
How to save new objects to database without SELECT permission on the table?
I tried using implicit_returning and use_scope_identity in create_engine.
engine = create_engine(connstr, implicit_returning=False, use_scope_identity
=False, echo=True)
db_session = sessionmaker(engine)()
, you can set this default up automatically using the
> column_reflect event:
>
>
> http://docs.sqlalchemy.org/en/rel_0_9/core/events.html?highlight=column_reflect#sqlalchemy.events.DDLEvents.column_reflect
>
> as you receive events here, look at the “type” to see if its T
11, 2015 at 7:12:31 PM UTC+1, mdob wrote:
>
>
> @event.listens_for(Table, 'column_reflect')
> def receive_column_reflect(inspector, table, column_info):
> if isinstance(column_info['type'], TIMESTAMP):
> column_info['default'] = FetchedValue()
>
>
>
> tabl
metadata = MetaData()
metadata.reflect(engine)
Base = automap_base(metadata=metadata)
Base.prepare()
That did a real nice job but I wanted to skip some columns from being
mapped (binary types actually at the moment)
I see metadata.tables['TableName'].columns to be ImmutableColumnCollection
so
which takes empty
tuple as default
https://github.com/zzzeek/sqlalchemy/blob/master/lib/sqlalchemy/sql/schema.py#L484
On Thursday, December 10, 2015 at 10:57:03 AM UTC+1, mdob wrote:
>
> metadata = MetaData()
> metadata.reflect(engine)
>
> Base = automap_base(metadata=metadata)
output of insp.reflecttable it would be a way
to ease that.
Zzzeek, what do you think about it? Does it make sense?
On Thursday, December 10, 2015 at 10:57:03 AM UTC+1, mdob wrote:
>
> metadata = MetaData()
> metadata.reflect(engine)
>
> Base = automap_base(metadata=metadata)
Hi,
It seems I have different result when filtering sqlite database on datetime
column.
I don't get any results when filtering declarative way
Invoice.InvoiceDate == datetime.datetime(2007, 01, 01)
same when hen executing raw query with engine.execute
'select * from Invoice where InvoiceDate
far no luck but is it right approach for that problem?
Thanks,
Mike
On Thursday, June 4, 2015 at 1:50:58 PM UTC-4, Michael Bayer wrote:
On 6/4/15 11:57 AM, mdob wrote:
Hi,
It seems I have different result when filtering sqlite database on
datetime column.
I don't get any
Hi,
It's been some time since this topic was created. Has anything changed on
that matter or manually setting column.server_default=FetchedValue() is
still the best way to do it?
Kind regards,
Michał
On Thursday, September 15, 2011 7:58:49 AM UTC+2, Matt Bodman wrote:
Hi,
I am
Hi,
I was trying to use SQLAlchemy with Pandas - CALCHIPAN.
Installed sqlalchemy, numpy and pandas from pip, then calchipan from
source.
SQLAlchemy==0.9.8
argparse==1.2.1
calchipan==0.1.0dev
ipython==2.3.0
numpy==1.9.0
pandas==0.15.0
python-dateutil==2.2
pytz==2014.7
six==1.8.0
wsgiref==0.1.2
Hi,
I got into an interesting issue where I receive duplicated tables if I use
capital letters schema in reflect method.
Ubuntu 12.04 with packages
oracle-instantclient11.2-basiclite-11.2.0.3.0-1.i386.rpm,
oracle-instantclient11.2-devel-11.2.0.3.0-1.i386.rpm,
Consider a simple model like this:
Library 1---* Shelf 1---* Book
Accordingly our model has the following relationships declared:
{tu wkelj kod z relationship wlaczajac backrefy)
We will write a query with a join to get all three objects at once
SELECT *
FROM Library
JOIN Shelf ON Library.id
21 matches
Mail list logo