On 04/09/2017 10:52 AM, SG wrote:
> I have two databases with one session for each of them.
> I would like to move objects contained in one of them to the other.
> I tried to get an object from the first with something like:
>
> |
> obj =sessionA.query(MyClass).filter(MyClass.name=='some name')
>
On Thu, 21 Feb 2013 12:52:42 -0800 (PST), Victor Ng vicng...@gmail.com
wrote:
I do a lot of processing on large amount of data.
The common pattern we follow is:
1. Iterate through a large data set
2. Do some sort of processing (i.e. NLP processing like tokenization,
capitalization,
On Sep 20, 2012, at 11:49 AM, David McKeone wrote:
I've googled around can't seem to find an answer to this, so hopefully
someone knows how to do it here.
I'm using PostgreSQL and I have a PL/PGSQL function that filters and modifies
a particular table based on a number of conditions and
On Jun 9, 2012, at 10:41 PM, Michael Bayer wrote:
it looks great.
This is in the queue as http://www.sqlalchemy.org/trac/ticket/2502.
1765text += MATCH %s % constraint.match
SQL injection? Shouldn't the argument be one of three constants?
I suspect there needs to be
On May 27, 2012, at 1:07 AM, Jeff wrote:
I have multiple processes accessing a table. All of these processes
want to read a set of rows from the table, and if the rows are not
present they will make a calculation and insert the rows themselves.
The issue comes where process A does a query
On Mar 15, 2012, at 5:54 AM, Eduardo wrote:
Hi,
Is it possible to set this option to off by using sqlalchemy?
Thanks
Ed
connection.execute(SET enable_seqscan TO off;)
But if you use that in production, you're nuts.
Cheers,
M
--
You received this message because you are subscribed to
On Mar 1, 2012, at 9:41 AM, Michael Bayer wrote:
Right.. So what should I do about oracle CONNECT BY, which is what they have
instead of WITH RECURSIVE... Consider that to be a different construct and
ignore it for now? Or should there be some approach that approximates
between WITH
On Feb 19, 2012, at 5:24 AM, Andrey Popp wrote:
Regarding rationale let me describe where I can find this feature useful:
* You have a part of you tables read-only, so you only query data from them.
SQLAlchemy doesn't have to track changes on objects of classes mapped to
these
On Jan 24, 2012, at 11:08 AM, Julien Cigar wrote:
Hello,
I upgraded to 0.7.4 together with PostgreSQL 9.0.5.
I have a database with several schemas, and it looks like the handle of
schemas changed in 0.7.4
I altered the default database search_path with:
{{{
xxx=# alter DATABASE
On Jun 10, 2011, at 2:25 PM, Cody Django wrote:
Hi all -- I'm new on pylons, coming from a django background. I'm
working on a mapfish project.
I'd like to autoload a model based on a db table, but in doing so I
get the error could not assemble any primary key columns for mapped
table.
On Jun 7, 2011, at 7:17 AM, Vlad K. wrote:
Hi all!
I have a daily stats table with the date as primary key. Currently the date
is string in the MMDD format, but I'll probably port it to a Date type
for easier statistical analysis. Other cols are various counters that get
On Jun 1, 2011, at 12:56 AM, thatsanicehatyouh...@mac.com wrote:
Hi,
I'm working on a script using SQLAlchemy against a PostgreSQL database and
using Python's multiprocessing. The pattern is for each thread to:
- start a transaction (session.begin())
- retrieve the next row in table X
On Mar 4, 2011, at 4:50 PM, thatsanicehatyouh...@mac.com wrote:
Hi,
I'd like to write a script that creates an in-memory SQLite database via
SQLAlchemy, but when I've finished with it I'd like to upload it as a file to
a server, preferably without ever creating a temporary file on the
Hello,
I am using autoload to load some of my application metadata for views, however,
since some information cannot be extracted from the view (such as the primary
key) and because one UserDefinedType I am using cannot be recognized using
reflection, I am passing certain column information
On Feb 2, 2011, at 4:50 PM, A.M. wrote:
Hello,
I am using autoload to load some of my application metadata for views,
however, since some information cannot be extracted from the view (such as
the primary key) and because one UserDefinedType I am using cannot be
recognized using
On Jan 28, 2011, at 8:07 AM, slothy Rulez a lot wrote:
Hi, []
I'm trying to create tables in SQLITE, with a composite PK (id, eid), I want
the id have the auto increment.
I've read this,
http://www.sqlalchemy.org/docs/dialects/sqlite.html#auto-incrementing-behavior,
and following your
On Jan 26, 2011, at 7:47 PM, Michael Bayer wrote:
On Jan 26, 2011, at 6:32 PM, A.M. wrote:
Well, I spoke too soon :( What is the mistake in the following sample code
which causes the COMMITs to be emitted? Setting autocommit to either True or
False emits the same SQL. I think
Hello,
While working on a database test with nose, I dug into sqlalchemy 0.6.6 until I
found these lines:
class DDLElement(expression.Executable, expression.ClauseElement):
Base class for DDL expression constructs.
_execution_options = expression.Executable.\
On Jan 26, 2011, at 5:45 PM, Michael Bayer wrote:
From this it follows that if you'd like to emit several DDL statements in a
transaction, the usage is no different for DDL expressions than for any other
kind of DML statement (i.e insert/update/delete). Use
Well, I spoke too soon :( What is the mistake in the following sample code
which causes the COMMITs to be emitted? Setting autocommit to either True or
False emits the same SQL. I think this is a case of staring at the same code
too long causing brain damage- thanks for your patience and help!
On Jan 21, 2011, at 12:29 PM, Hector Blanco wrote:
Hello list!
I have a couple of classes. One of the behaves as the container of the other:
class ContainerOfSamples(declarativeBase):
__tablename__ = containers
_id = Column(id, Integer, primary_key=True)
_samples =
Hello,
I would like SQLAlchemy to generate views much in the same way it can generate
tables- perhaps like this:
View('bob',select([...]))
Is the SQLAlchemy code modular enough to support a user-defined SchemaItem or
does that require changes to SQLAlchemy itself?
The reason I would very
On Jan 21, 2011, at 1:36 PM, Michael Bayer wrote:
On Jan 21, 2011, at 12:56 PM, A.M. wrote:
Hello,
I would like SQLAlchemy to generate views much in the same way it can
generate tables- perhaps like this:
View('bob',select([...]))
Is the SQLAlchemy code modular enough to support
On Jan 19, 2011, at 12:52 PM, AgentOrange wrote:
Hi Folks,
I have been scratching my head over this one all day, so any advice
would be greatly appreciated!
I have a pretty simple join table setup like this:
foo foo_bar bar
On Jan 19, 2011, at 1:29 PM, AgentOrange wrote:
Hi ho,
Thanks for the swift reply!
Did you use uselist=False on foo.bar and the associationproxy? It would nice
if you could show some
code.http://www.sqlalchemy.org/docs/orm/extensions/associationproxy.html?h...
Yes I did. The code
On Jan 14, 2011, at 3:26 PM, A.M. wrote:
I suspect I have to implement special converter methods with psycopg2
register_adapter/new_type. That is what I am experimenting with now.
It looks like SQLAlchemy's array type support doesn't support anything beyond
basic built-in types that accept
Hello,
I have created an SQLAlchemy type which represents a postgresql aclitem (which
represents postgresql access control lists). I am able to load and save
newly-created ACLItems from the database, however, modifying the values of an
instance of the type does not dirty it for flushing. Is
On Sep 14, 2010, at 5:03 PM, A.M. wrote:
Hello,
I have a schema like this:
Image
*id
*name
Metadatakey
*id
*exifkey
*name
Metadata
*id
*image_id - Image
*metadatakey_id - Metadatakey
*value
Thanks to Michael Bayer, I was able to put together the image metadata model I
On Nov 22, 2010, at 9:30 AM, Dan Ellis wrote:
I'd like to find some way to implement access controls on mapped
objects, with the following features:
* Example: given a BlogPost object, only the owner, or a superuser,
would be allowed to set fields such as title and body.
* Example:
On Nov 16, 2010, at 11:43 AM, Michael Bayer wrote:
On Nov 16, 2010, at 11:14 AM, A.M. wrote:
Hello,
To generate json from our SQLAlchemy model objects, we are using
iterate_properties to determine how to dictify the object. One of our
objects uses association_proxy which we would
On Nov 8, 2010, at 1:16 PM, Adrian wrote:
Hi all,
This is a topic that has been discussed before, but I haven't been
able to successfully implement any of the proposed solutions in my own
code. I've created a few Views in my postgres database, and I'm
looking for a way to simply query
On Sep 30, 2010, at 10:02 AM, Michael Bayer wrote:
On Sep 30, 2010, at 4:43 AM, Warwick Prince wrote:
Hi All
I would like some advice / best practice on the following basic problem
please. I'm new to SQL so am groping with some things that used to be
basic. :-(
I've looked
Hello,
I am using this PostgreSQL exclusion constraint:
CONSTRAINT only_one_valid EXCLUDE USING (synthetic_id WITH
=,COALESCE(obsoleteby,'') WITH =),
How can I represent this using SQLAlchemy Table metadata so that I can create
the table from the metadata?
Cheers,
M
--
You received this
On Sep 20, 2010, at 11:00 PM, Russell Warren wrote:
Is there a way in the standard SQLA dialect support to set the
starting value of an autoincrement field in the SQLA table definition?
I can't see anything in the docs or code, but something like this is
what I'm thinking:
empnum =
On Sep 17, 2010, at 11:12 AM, Michael Bayer wrote:
On Sep 17, 2010, at 10:58 AM, Michael Bayer wrote:
On Sep 17, 2010, at 9:14 AM, Michael Hipp wrote:
On 9/14/2010 2:23 PM, Michael Hipp wrote:
Is it possible to use a regexp in a like() clause? Or some other way to
achieve
35 matches
Mail list logo