[sqlalchemy] Re: Empty Tables with engine.Table_Names()

2018-12-26 Thread Jonathan Rogers
On Monday, December 24, 2018 at 4:27:51 PM UTC-5, Brandon Arias wrote: > > I am new to SQLAlchemy. I believe I installed SQLAlchemy correctly since > just needed to install SQL. However once I tried creating an engine and > checking the tables under the most generic example, I kept getting empty

Re: [sqlalchemy] Re: Implementing historical tables

2018-01-31 Thread Jonathan Rogers
se haven't been widely implemented yet. -- Jonathan Rogers -- 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 f

[sqlalchemy] Re: Implementing historical tables

2018-01-31 Thread Jonathan Rogers
On Wednesday, January 31, 2018 at 12:27:12 PM UTC-5, Stanislav Lobanov wrote: > > Hello, i need to create a system, that can store historical versions of > objects. > > Example model looks like: > > class User(Base): >id=Column(Integer) # ForeignKey >start=Column(DateTime) >

Re: [sqlalchemy] Introspecting column constraints

2016-11-18 Thread Jonathan Rogers
operations.Operations > . > > > > > > On 11/18/2016 05:34 PM, Jonathan Rogers wrote: >> Yes, the constraints are defined in Python and have names explicitly >> defined. The CheckConstraint I need to use is defined in a >> @declared_attr method for the column in a ba

Re: [sqlalchemy] Introspecting column constraints

2016-11-18 Thread Jonathan Rogers
name in order to support ADD/DROP. > > Alembic's docs get into this a bit here: > http://alembic.zzzcomputing.com/en/latest/naming.html where it talks > about the "naming convention" feature of SQLAlchemy that may or may not > be of use here. > > > > > &

[sqlalchemy] Re: Selecting distinct entries based on max timestamp

2016-11-18 Thread Jonathan Rogers
On Friday, November 18, 2016 at 2:08:05 PM UTC-5, Paul Giralt wrote: > > I'm having trouble figuring out how to accomplish this task using > SQLAlchemy. Basically I have a table that maps a user's skill levels as > follows: > > class Skillmap(db.Model): > __tablename__ = 'skillmap' >

[sqlalchemy] Introspecting column constraints

2016-11-18 Thread Jonathan Rogers
I have a Declarative-instrumented class with several constraints, some defined at the table level and some on a column. AFAICT, all the constraints are configured correctly because they are rendered correctly by CreateTable() when called with the class's Table instance. In order to import some

Re: [sqlalchemy] LIKE operator and double percent signs

2016-06-15 Thread Jonathan Rogers
On 06/15/2016 01:37 PM, Mike Bayer wrote: > > > On 06/15/2016 01:34 PM, Mike Bayer wrote: >> >> >> On 06/15/2016 12:40 PM, Jonathan Rogers wrote: >>> On Friday, February 25, 2011 at 10:27:34 AM UTC-5, Michael Bayer wrote: >>> >>>

Re: [sqlalchemy] LIKE operator and double percent signs

2016-06-15 Thread Jonathan Rogers
On Friday, February 25, 2011 at 10:27:34 AM UTC-5, Michael Bayer wrote: > > > On Feb 25, 2011, at 10:20 AM, Jon Nelson wrote: > > > On Fri, Feb 25, 2011 at 9:15 AM, Michael Bayer > wrote: > >> % is significant in DBAPIs like postgresql and mysqldb where pyformat > and

[sqlalchemy] TypeDecorator and Query.get()

2016-02-25 Thread Jonathan Rogers
I'm using the Enum recipe from http://techspot.zzzeek.org/2011/01/14/the-enum-recipe/ I have a class mapped to table which has a single enum column as its primary key. Querying using EnumSymbol instances for the column values mostly works fine. However, If I use Query.get(pk_val) where

Re: [sqlalchemy] PostgreSQL domains

2016-01-14 Thread Jonathan Rogers
On Wednesday, January 13, 2016 at 10:54:04 AM UTC-5, Michael Bayer wrote: > > > > On 01/13/2016 12:37 AM, Jonathan Rogers wrote: > > I have several domains based on type TEXT to constrain values in > > specific ways, such as to disallow empty values or only allow valid &

[sqlalchemy] PostgreSQL domains

2016-01-12 Thread Jonathan Rogers
I have several domains based on type TEXT to constrain values in specific ways, such as to disallow empty values or only allow valid email addresses. When I reflect tables with columns of such a domain, SQLAlchemy simply considers their types to be TEXT. Is there any way to make the domains

Re: [sqlalchemy] using sqlalchemy to track changes in database

2015-07-18 Thread Jonathan Rogers
On Thursday, July 16, 2015 at 6:54:29 AM UTC-4, Ivan Ogasawara wrote: I think you can write a trigger in your DB for all tables and actions you want to analyze .. and your triggers you can put the changes in some log tables. Using sqlalchemy you can put this changes inside your db

[sqlalchemy] Re: How to view (get actual print-out) of the contents of db tables?

2015-04-29 Thread Jonathan Rogers
On Tuesday, April 28, 2015 at 3:42:40 PM UTC-4, Ivan Evstegneev wrote: Greetings everyone!!! I have a little question. Is there some way (tool) to print the contents of the tables in sqlalchemy? The most straightforward way to see the contents of a table in any SQL database is to

Re: [sqlalchemy] Mysql issue with big composite primary keys

2014-11-09 Thread Jonathan Rogers
this is an issue with SQLAlchemy. -- Jonathan Rogers -- You received this message because you are subscribed to the Google Groups sqlalchemy group. To unsubscribe from this group and stop receiving emails from it, send an email to sqlalchemy+unsubscr...@googlegroups.com. To post to this group, send

[sqlalchemy] Re: How does latest sqlalchemy pickle a column?

2014-10-18 Thread Jonathan Rogers
On Thursday, October 16, 2014 11:52:39 PM UTC-4, Marc Van Olmen wrote: hi, We recently upgraded from SQLAlchemy to 0.4.8 to 0.9.3 also we upgrade psycopg2 etc and we are using postgresql 9.2 We run in a very strange problem that the unpickle of one of the columns is giving different

Re: [sqlalchemy] How does latest sqlalchemy pickle a column?

2014-10-18 Thread Jonathan Rogers
. -- Jonathan Rogers -- You received this message because you are subscribed to the Google Groups sqlalchemy group. To unsubscribe from this group and stop receiving emails from it, send an email to sqlalchemy+unsubscr...@googlegroups.com. To post to this group, send email to sqlalchemy@googlegroups.com

Re: [sqlalchemy] How can I use the transaction to make sure data is one by on?

2014-07-30 Thread Jonathan Rogers
documentation: URL:http://www.postgresql.org/docs/9.3/static/transaction-iso.html -- Jonathan Rogers -- You received this message because you are subscribed to the Google Groups sqlalchemy group. To unsubscribe from this group and stop receiving emails from it, send an email to sqlalchemy+unsubscr

Re: [sqlalchemy] subquery? outer join with 3 tables

2014-07-08 Thread Jonathan Rogers
of a ClientMachine instance and a privacyIDEATokenSerialnumber. -- Jonathan Rogers -- You received this message because you are subscribed to the Google Groups sqlalchemy group. To unsubscribe from this group and stop receiving emails from it, send an email to sqlalchemy+unsubscr...@googlegroups.com. To post

Re: [sqlalchemy] Advice for Method to consistently import XML into SQLAlchemy

2014-05-15 Thread Jonathan Rogers
-- Jonathan Rogers -- You received this message because you are subscribed to the Google Groups sqlalchemy group. To unsubscribe from this group and stop receiving emails from it, send an email to sqlalchemy+unsubscr...@googlegroups.com. To post to this group, send email to sqlalchemy@googlegroups.com

Re: [sqlalchemy] MySQL's sql_mode (ORM)

2014-02-05 Thread Jonathan Rogers
, but you can always execute arbitrary SQL using text(). -- Jonathan Rogers -- You received this message because you are subscribed to the Google Groups sqlalchemy group. To unsubscribe from this group and stop receiving emails from it, send an email to sqlalchemy+unsubscr...@googlegroups.com

[sqlalchemy] Automatically applying FromCache for specific mapped class

2014-01-25 Thread Jonathan Rogers
would allow me to determine this. Has anyone solved a similar problem or have any suggestions for where to start? -- Jonathan Rogers -- You received this message because you are subscribed to the Google Groups sqlalchemy group. To unsubscribe from this group and stop receiving emails from it, send

Re: [sqlalchemy] Automatically applying FromCache for specific mapped class

2014-01-25 Thread Jonathan Rogers
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Michael Bayer wrote: On Jan 25, 2014, at 11:48 AM, Jonathan Rogers jonathanrrog...@gmail.com wrote: I am experimenting with the caching example and have it working as described. I have a number of mapped classes for tables which are static

Re: [sqlalchemy] Sqlalchemy ORM operates on database not created from sqlalchemy

2014-01-22 Thread Jonathan Rogers
On Wednesday, January 22, 2014 6:34:59 PM UTC-5, Ni Wesley wrote: I mean sqlalchemy ORM, that is, use python class mapping to database table. I know sqlalchemy core expression does work, this guy doesn't care how database is created. SQLAlchemy certainly works fine regardless of how tables

Re: [sqlalchemy] Merge(load=False) woes

2013-12-09 Thread Jonathan Rogers
On Wednesday, August 25, 2010 11:02:19 AM UTC-4, Michael Bayer wrote: On Aug 25, 2010, at 10:47 AM, Michael Bayer wrote: On Aug 25, 2010, at 9:37 AM, Nikolaj wrote: Hello, I'm struggling to use the Beaker caching example in my project. Accessing any attribute on an instance

Re: [sqlalchemy] Merge(load=False) woes

2013-12-09 Thread Jonathan Rogers
Michael Bayer wrote: On Dec 9, 2013, at 11:20 PM, Jonathan Rogers jonathanrrog...@gmail.com mailto:jonathanrrog...@gmail.com wrote: I want to cache mapped objects from rows which will not change during the process lifetime of a web application, so I used the memory backend. Based