html#sqlalchemy.events.PoolEvents.checkin>
>
>
> @event.listens_for(engine, "checkin")
> def receive_checkin(dbapi_connection, connection_record):
> cursor = dbapi_connection.cursor()
> cursor.execute("RESET ROLE")
> cursor.clo
Hi List,
I have no Google-fu. This is especially obvious when trying to search for
something like I’m asking about.
Does anyone have any info or links to docs, blog posts, etc. that covers how to
use connection pools with individual PostgreSQL user logins for a backend REST
API?
The reason I
Hello,
I am moving an Oracle Database to SQL Server.
I go through the table columns and create a dictionary of columnName:
sqlalchemy.types. and then push them to SQL Server using df.to_sql.
Most tables work fine except when I have a large VARCHAR2 from Oracle of
8000+ I need it to become a
Hello,
I am trying to transfer an Oracle Database(12) to an SQL database(2016)
table by table.
I read it from the Oracle database using:
*ocon = cx_Oracle.connect(username,password,dsn,encoding='UTF-8') df =
pd.read_sql("SELECT * FROM TABLE",con=ocon) *
I then try to write the dataframe to the
Hello:
I am new to sqlalchemy and i want to know that how i can map my json keys
with database table columns to insert the json key values.
Below is my data.
{'sampleTimestamp': '2018-05-31T13:52:00.000Z', 'waterHeight': '0.0',
'fuelHeight': '31.02', 'temperature01': '60.00', 'temperature00':
I had to use
__tablename__ = 'some_name'
__table_args__ = (PrimaryKeyConstraint('id'), )
in my declarative models to get the same result.
Thanks Mike, that clears it all up.
On Mon, Jan 25, 2016 at 6:12 PM, Mike Bayer
wrote:
>
>
> On 01/25/2016 02:51 PM, Gastón
That clears it all up. I used __table_args__ and ForeignKeyConstrait.
Alembic handled it perfectly.
Thanks Mike for your help and for creating these libraries.
On Thu, Oct 29, 2015 at 8:34 PM, Mike Bayer
wrote:
>
>
> On 10/29/15 4:26 PM, Gastón Avila wrote:
> > Hi
class User(Base):
__tablename__ = 'users'
id = Column(Integer, primary_key=True)
# id = Column(Integer, ForeignKey('cart.id'))
name = Column(Unicode(255), unique=True, nullable=False)
password = Column(Unicode(255), nullable=False)
last_logged = Column(DateTime,
.commitEverything()
item2 = project2.getItem(8)
item2.value = another test
project2.commitEverything()
The problem i'm facing is how to create the engine, metadata, mapper,
session, and the orm classes for each AppProject instance.
I'm not sure if this is supported or even a good idea.
Thanks,
Julian J
.
Julian.
On Thu, Jun 16, 2011 at 13:54, King Simon-NFHD78
simon.k...@motorolasolutions.com wrote:
-Original Message-
From: sqlalchemy@googlegroups.com [mailto:sqlalchemy@googlegroups.com]
On Behalf Of Julian J. M.
Sent: 16 June 2011 11:43
To: sqlalchemy
Subject: [sqlalchemy] Accessing
...@zzzcomputing.com wrote:
On Nov 17, 2010, at 4:23 AM, J wrote:
so i'm using sqlsoup to support a legacy db, and am thoroughly
enjoying it. it was awesome setting up relationships and all that
even though the underlying db schema didn't have any foreign key
defines!
however, i'm at a point where
mike...@zzzcomputing.com wrote:
On Nov 17, 2010, at 4:05 PM, J wrote:
hmm... but i was thinking of having specialized methods for every
table/object. am i missing something from your suggestion?
No, SqlSoup only offers the base class for all objects as an option. Here's
a patch you can
I'm trying to create a custom geometry type for MySQL, but I'm running
up against my limited knowledge of SQLAlchemy.
My goal is to be able to pass in a geos.Point object on INSERT and
UPDATE, convert it to WKT representation ('POINT (1.
2.)'), and pass that to
On Tue, 2009-04-07 at 06:28 -0700, Scripper wrote:
Hello everyone,
I have a concrete question about using declarative mapper in my
project.
When i there appeared some errors. I wonder whether declarative mapper
supports two relation in a single class. Thanks!
Well, so far, that's an
Hi,
I'm new to SQLAlchemy. I am trying to use Pylons to expose an existing
database in a browser. All the introductory material assumes I am
going to create the database from python object definitions, but I
want to create the python object definitions from the database. Am I
on my own, or is
On Thu, 2009-03-05 at 01:03 -0800, jarrod.ches...@gmail.com wrote:
Hi All
I'm writing a metadata based schema migration tool.
As SQLAlchemy doesn't support much schema modification. I will
implement a complete set of schema migration functions one way or
another for several of the
Within a contextual session, multiple queries all seem to return the same data
even though with SQL logging I can see the data has been changed by another
thread and a SELECT has been issued by the query.
I realize that I need to close or remove the session when I am finished, but
shouldn't a
Is there a way to do executemany() semantic updates? Suppose I have a list
of employee id's and I want to do something like:
ids = [1, 2, 3, 4, 5, 6]
session.execute( tbl_employees.update(tbl_employees.c.id == ids),
tbl_employees.c.status=you're fired )
Just us the in_ syntax
Is there a way to do executemany() semantic updates? Suppose I have a list of
employee id's and I want to do something like:
ids = [1, 2, 3, 4, 5, 6]
session.execute( tbl_employees.update(tbl_employees.c.id == ids),
tbl_employees.c.status=you're fired )
Not knowing your specific requirements, can you use a separate session?
Just instantiate it for the manual-flushing section, and then close it
out, and go back to using your old session.
Cheers,
Cliff
On Tue, 2008-07-08 at 05:57 -0700, Moshe C. wrote:
Hi,
I have an autoflush session and I
In the following code, I am using django templates to render data from a
SQLAlchemy-mapped database. I subclass django.template.Context, so that
I can pass it a unique ID, from which it determines what to pull from
the DB. But when it comes time to render the template (that is: when I
actually
I'm trying to implement polymorphic inheritance using the
sqlalchemy.ext.declarative, but the field that I want to use for the
polymorphic_on is not in my polymorphic base table, but at the other end
of a many-to-one relationship. We have items of many types, and in the
item table, we have a
On Thu, 2008-05-15 at 11:24 -0400, J. Cliff Dyer wrote:
I'm trying to implement polymorphic inheritance using the
sqlalchemy.ext.declarative, but the field that I want to use for the
polymorphic_on is not in my polymorphic base table, but at the other end
of a many-to-one relationship. We
On Thu, 2008-05-15 at 11:30 -0400, J. Cliff Dyer wrote:
On Thu, 2008-05-15 at 11:24 -0400, J. Cliff Dyer wrote:
I'm trying to implement polymorphic inheritance using the
sqlalchemy.ext.declarative, but the field that I want to use for the
polymorphic_on is not in my polymorphic base table
On Thu, 2008-05-15 at 12:27 -0400, Michael Bayer wrote:
On May 15, 2008, at 12:12 PM, J. Cliff Dyer wrote:
How can I use this field for polymorphism? Is it possible?
polymorphic discriminators are currently table-local scalar columns.
So if you had a many-to-one
It makes me twitch when I see the following:
Base = declarative_base(metadata=metadata)
class Spam(Base):
...
Base is a singularly undescriptive name to use for the base class of a
declarative table class. People are doing this because it's in the
documentation. If it were changed there,
At 09:45 AM 3/28/2008 -0400, Michael Bayer wrote:
On Mar 28, 2008, at 12:55 AM, Phillip J. Eby wrote:
Sadly, about the only way for me to implement that without code
duplication will be to temporarily change the item's __class__ to a
subclass with an empty __init__ method. Unless there's
So you're still disagreeing with Jason, who's quite explicitly saying
that SA's __init__ will blow up if it gets called. Which of you is right? :)
At 11:38 AM 3/28/2008 -0400, Michael Bayer wrote:
On Mar 28, 2008, at 10:58 AM, Phillip J. Eby wrote:
Sorry, I should have included more
I just noticed that in the latest version of the branch, there's a
new_instance() call that is using a class' __new__ method in order to
create a new instance, rather than using 'class()'. What I'd like to
find out is how to get around this, because Trellis objects will not
be properly
At 02:26 PM 3/27/2008 -0700, jason kirtland wrote:
new_instance creates an instance without invoking __init__. The ORM
uses it to recreate instances when loading from the database.
new_instance can be added to InstrumentationManager as an extension
method... The ORM doesn't care how
At 02:04 PM 3/3/2008 -0500, Michael Bayer wrote:
the bug is that unregister_attribute() is not working, which the test
suite is using to remove and re-register new instrumentation:
class Foo(object):
pass
attributes.register_attribute(Foo, collection,
At 04:04 PM 2/27/2008 -0500, Michael Bayer wrote:
do you have any interest in committing changes to the branch
yourself ? as long as the unit tests keep running whatever you'd want
is most likely fine with meotherwise I will at least experiment
with doing away with __mro__ searching and
I believe that I may have found an error in dynamic relation backrefences.
When the dynamic query is executed, it appears to fetch all of the rows in
the referenced table instead of only the ones linked to the object from which
the dynamic relation was obtained. The following test script
On Friday 14 December 2007 7:41 am, Michael Bayer wrote:
seems to work in SVN trunk, have you tried there ?
Sorry - I forgot to mention that I ran this test against 0.4.1. I have not
tried pulling from the trunk.
--~--~-~--~~~---~--~~
You received this message
?
--
Fernando J. Zunino
Zauber S.A.
http://www.zauber.com.ar/
signature.asc
Description: OpenPGP digital signature
35 matches
Mail list logo