-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Il 08/11/2012 00:32, Michael Bayer ha scritto:
>
> On Nov 7, 2012, at 6:18 PM, Manlio Perillo wrote:
>
>> -BEGIN PGP SIGNED MESSAGE-
>> Hash: SHA1
>
>> Hi.
>
>> When selecting against joined t
isouter=False):
...
When specified ``using`' take precedence over `onclause`.
Thanks Manlio Perillo
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAlCa7CwACgkQscQJ24LbaUQeyQCeIqMJyemQ
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Il 13/04/2012 18:59, Michael Bayer ha scritto:
>
> On Apr 13, 2012, at 12:08 PM, Manlio Perillo wrote:
>
>> -BEGIN PGP SIGNED MESSAGE-
>> Hash: SHA1
>
>> Hi.
>
>> What is the best practice to create
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Il 12/04/2012 20:45, Michael Bayer ha scritto:
> [...]
>> I have another question, about coding style.
>> Current SQLAlchemy code create the connection and transaction objects in
>> the Engine.begin method, and then return an instance of
>> Engine._tra
rn create_engine(url)
## end __init__.py
Thanks Manlio Perillo
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAk+IT48ACgkQscQJ24LbaUQYsQCfe9MSsb+/1yk+c+3HzdQUcxZz
xh0An2FU6CCQ3TJ8OsjN7GLGecRygnTq
=Gzwa
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Hi.
I looked at SQLAlchemy source code to see examples about `with`
statement support and found something that look suspicious to me.
class Engine:
def begin(self, close_with_result=False)
conn = self.contextual_connect(
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Il 15/04/2011 09:17, Yang Zhang ha scritto:
> Is it possible to execute a Postegresql COPY ... FROM STDIN statement
> via sqlalchemy, or do we have to drop down to psycopg2 for that
> (http://initd.org/psycopg/docs/usage.html#using-copy-to-and-copy-fro
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Michael Bayer ha scritto:
> [...]
>> A precisation.
>>
>> The reason I used the sa_only flag is because I assumed there was a
>> reason why test cases not derived from testing.TestBase must be ignored.
>>
>> If possible, the wantMethod should be someth
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Michael Bayer ha scritto:
> [...]
>> To clarify; Alembic supports branching, Migrate doesn't?
>> (and where can I find out exactly what is meant by branching?)
>
> it means if you have a branch of the repo, so say you start with source A
> with versi
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Michael Bayer ha scritto:
> [...]
>> Is is possible to modify the SQLAlchemy nose plugin in order to be more
>> cooperative?
>> As an example by adding an option that will change the wantClass method from
>>
>> if not issubclass(cls, testing.TestBase)
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Michael Bayer ha scritto:
> [...]
>>
>> Is is possible to modify the SQLAlchemy nose plugin in order to be more
>> cooperative?
>> As an example by adding an option that will change the wantClass method from
>>
>> if not issubclass(cls, testing.TestBa
Hi.
In a project using SQLAlchemy I decided to use the SQL nose plugin, in
order to avoid reinventing the wheel.
Unfortunately it seems the plugin is a bit too invasive and it will only
work with SQLAlchemy test suite.
The problem is with the wantClass method, that pratically will ignore
all nor
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Michael Bayer ha scritto:
> SQLAlchemy 0.6beta2 is now available.This beta may be the last before the
> 0.6.0 final release. We've hopefully gotten every largish change into the
> release as possible so that people can test. 0.6 is already ru
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
richard reitmeyer ha scritto:
> Hello, all.
>
> I'm trying to use compound fields with in_ to achieve something like
> this:
>
> update foo set svrid = NULL, asof=NULL
> where (svrid,asof)
> in (select svrid, asof from foo except se
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Gerry Reno ha scritto:
> Been doing great with SQLAlchemy 0.6beta1 for the past week after a
> couple snags migrating from 5.5.
>
> Today I hit a small problem with postgresql on DropTables:
>
> running this command:
> engine.execute(DropTabl
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Hi.
I have the following use case:
a table that contains the layout info of some elements in a web page.
The layout is fixed, that is, the number and the positions of the
elements that can be displayed is fixed.
This means that in order to change the
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Lele Gaifax ha scritto:
> Manlio Perillo writes:
>
>> Michael Bayer ha scritto:
>>> Similarly, the concept of a "version" as an integer number is not really
>>> flexible enough -
>> The idea was to keep
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Michael Bayer ha scritto:
> I'm pretty much -1 on this since I think migrations need to have absolute
> flexibility - the "listener" system within create_all() is not at all
> designed to be used to that degree.
Another solution is to add a complete
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Hi.
I would like to implement a minimal but working support to migrations in
SQLAlchemy.
I know there is already sqlalchemy-migration, but the code is not
integrated in SQLAlchemy, and it is less flexible.
A detailed description of the propose is he
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Hi.
Is it possible, in SQLAlchemy, to express this query?
CREATE TEMP TABLE foo (
x INTEGER,
y INTEGER
);
INSERT INTO foo VALUES (10, 11);
INSERT INTO foo VALUES (1, 2);
manlio=> SELECT * FROM foo WHERE (x, y) in (VALUES (1, 2), (3, 4));
x
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Hi.
I find this code (sqlalchemy.dialects.postgresql.base) suspicious:
class ENUM(sqltypes.Enum):
def create(self, bind=None, checkfirst=True):
if not checkfirst or not bind.dialect.has_type(bind, self.name,
schema=self.schema):
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Michael Bayer ha scritto:
> On Feb 28, 2010, at 4:32 PM, Manlio Perillo wrote:
>
>> By the way, I have also noted that in the SQLAlchemy source code there
>> are many extra whitespaces (lines with only whitespaces, or lines ending
&
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Michael Bayer ha scritto:
> Manlio Perillo wrote:
> Hi.
>
> What is the copyright policy on patches submitted on the SQLAlchemy bug
> tracker?
>
> I'm glad to release them under the MIT license (it is the licence I use
>
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Michael Bayer ha scritto:
> [...]
> I'm not sure, however, if `test_schema` method test should go in
> `test/engine/test_reflection.py`, since it is not directly related to
> reflection.
>
> With the old patch
> (http://www.sqlalchemy.org/trac/attachm
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Michael Bayer ha scritto:
> [...]
> I'm not sure, however, if `test_schema` method test should go in
> `test/engine/test_reflection.py`, since it is not directly related to
> reflection.
>
> With the old patch
> (http://www.sqlalchemy.org/trac/attachm
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Hi.
What is the copyright policy on patches submitted on the SQLAlchemy bug
tracker?
I'm glad to release them under the MIT license (it is the licence I use
for my own projects) but the "problem" is that the patch author des not
appear anywhere.
It
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Michael Bayer ha scritto:
> On Feb 28, 2010, at 8:12 PM, Manlio Perillo wrote:
>
> Michael Bayer ha scritto:
>>>> [...]
>>>> * I have noted that some database objects not directly attached to a
>>>> meta
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Michael Bayer ha scritto:
> On Feb 28, 2010, at 8:01 PM, Manlio Perillo wrote:
>
> Rami Chowdhury ha scritto:
>>>> On Feb 28, 2010, at 15:17 , Manlio Perillo wrote:
>>>>
>>>> Rami Chowdhury ha scritto
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Michael Bayer ha scritto:
> [...]
> * I have noted that some database objects not directly attached to a
> metadata, like a Sequence, can leave the database in an inconsistent
> state if the associated test suite fails.
>
> I have the same problem
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Michael Bayer ha scritto:
> On Feb 28, 2010, at 3:21 PM, Manlio Perillo wrote:
>
> When reading the code in the `sql.compiler` module, I noted this:
>
>def visit_drop_table(self, drop):
>ret = "\nDROP TABLE "
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Rami Chowdhury ha scritto:
> On Feb 28, 2010, at 15:17 , Manlio Perillo wrote:
>
> Rami Chowdhury ha scritto:
>>>> On Sunday 28 February 2010 13:32:40 Manlio Perillo wrote:
>>>> I have found that some tests fails:
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
I think that SQLAlchemy behaves incorrectly when there is a primary key
constraint on multiple columns and one of the columns is of type Integer.
##
from sqlalchemy import schema, types, create_engine
metadata = schema.MetaData()
test = schema.Table
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Michael Bayer ha scritto:
>
> Done, new patch attached.
> The is also a bug fix: I forgot to clear the notices list.
> The notices list is cleared *only* if messages are actually logged.
>
> I took the liberty to change the coding style, too.
>
> If
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Rami Chowdhury ha scritto:
> On Sunday 28 February 2010 13:32:40 Manlio Perillo wrote:
> I have found that some tests fails:
> http://paste.pocoo.org/show/184048/
>
>> Are you using the latest SVN?
I'm using the mercurial
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Hi.
I recently wrote my first big patch for SQLAlchemy:
http://www.sqlalchemy.org/trac/attachment/ticket/1679/schema.patch
and I have some questions about the source code.
* Why objects like Sequence have a `__visit_name__ = 'sequence'`, and
the `
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
I have found that some tests fails:
http://paste.pocoo.org/show/184048/
The problem is with the match operarator for fulltext search.
I'm using PostgreSQL 8.4.
By the way, I have also noted that in the SQLAlchemy source code there
are many extra wh
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
When reading the code in the `sql.compiler` module, I noted this:
def visit_drop_table(self, drop):
ret = "\nDROP TABLE " + self.preparer.format_table(drop.element)
if drop.cascade:
ret += " CASCADE CONSTRAINTS"
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Michael Bayer ha scritto:
> On Feb 28, 2010, at 11:21 AM, Manlio Perillo wrote:
>
> I would like to write a patch for ticket #877.
>
Sorry, I forgot to update the log level used in the patch (I was doing
some tests with the engine `ech
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Michael Bayer ha scritto:
> On Feb 28, 2010, at 11:21 AM, Manlio Perillo wrote:
>
> I would like to write a patch for ticket #877.
>
> What is the best method to implement the requested feature?
>
> The ExecutionContext class h
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
I would like to write a patch for ticket #877.
What is the best method to implement the requested feature?
The ExecutionContext class has a post_exec method, so the implementation
for the psycopg2 driver can override this method, check for the notice
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Michael Bayer ha scritto:
> we no longer make the assumption that the right side of an expression is the
> same type as that of the left (since it is not true in many cases). So you
> must coerce manually:
>
> literal('programming-lang', LabelTree)
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Hi.
It seems that changeset b89c179b0daf (from Mercurial repository) broke
user defined types handling.
Here is a program that reproduces the problem:
http://paste.pocoo.org/show/183084/
Here is the output of the program:
http://paste.pocoo.org/show/
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Michael Bayer ha scritto:
>
> On Feb 18, 2010, at 11:55 AM, Manlio Perillo wrote:
>
> Michael Bayer ha scritto:
>>>> [...]
>>>>> so what I had in mind is that, if its given a join as the left side,
>>>
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Ben De Luca ha scritto:
>
>> Ok, thanks.
>> I have never seen this pattern in use.
>> If the import is done inside a function, usually there are no problems
>> with circular module import.
>
> Its a performance gain as the second time you hit that fu
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Michael Bayer ha scritto:
> [...]
> Since we are speaking about _match_primaries, I'm curious to know why
> the implementation is:
>
> def _match_primaries(self, primary, secondary):
>global sql_util
>if not sql_util:
>from sqlalchemy.
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Michael Bayer ha scritto:
> [...]
>> so what I had in mind is that, if its given a join as the left side,
>> it just does the "natural" thing, i.e. joins to the right.
>> If the "natural" join isn't available, then it does its usual
>> search through
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Michael Bayer ha scritto:
>
> On Feb 18, 2010, at 10:18 AM, Michael Bayer wrote:
>
>>>
>>> Ok.
>>> My idea was to implement the equivalent of SQL '*' column.
>>> I can't use the literal '*' in the select column list, since it will
>>> disable (?) SQL
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Ning ha scritto:
> Hi all,
>
> Anyone have any ideal how to search a particular hour.
>
> usually we can use datepart function in sql.
>
> for example
>
> datepart(hour, datetime) in (7,8)
>
> But it is not really working in sqlalchemy
>
> I trie
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Michael Bayer ha scritto:
> On Feb 17, 2010, at 9:56 AM, Manlio Perillo wrote:
>
> Michael Bayer ha scritto:
>>>> [...]
>>>> By the way, I have found an incorrect behaviour in SQLAlchemy, when the
>>>>
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Michael Bayer ha scritto:
> On Feb 17, 2010, at 9:19 AM, Manlio Perillo wrote:
>
> Hi.
>
> I have found another limitation of SQLAlchemy, when handling joins.
> The code is here:
> http://paste.pocoo.org/sh
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Michael Bayer ha scritto:
> [...]
> By the way, I have found an incorrect behaviour in SQLAlchemy, when the
> select column list is empty.
>
> query = sql.select(
> None, contents.c.slug == 'python', from_obj=[join])
>
>
> SQLAlchemy generates an
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Hi.
I have found another limitation of SQLAlchemy, when handling joins.
The code is here:
http://paste.pocoo.org/show/179286/
I get:
sqlalchemy.exc.ArgumentError: Can't determine join between 'Join object
on Join object on content_types(159586732) an
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Michael Bayer ha scritto:
> On Feb 16, 2010, at 7:07 PM, Manlio Perillo wrote:
>
> Michael Bayer ha scritto:
>>>> [...]
>>>>> just so I can understand fully can you modify the paste I sent to
>>>>> i
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Michael Bayer ha scritto:
> [...]
>> just so I can understand fully can you modify the paste I sent to
>> illustrate exactly how the results are happening, as that can help me to
>> formulate the best version of this feature.
>
I have pasted a comple
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Michael Bayer ha scritto:
> Manlio Perillo wrote:
> Here is the code I have:
> http://paste.pocoo.org/show/178959/
>
> What each plugin do is:
> - add additional columns in the select list
> - add additional where clauses or ord
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Michael Bayer ha scritto:
> [...]
> Unfortunately, fold_equivalents is not a generic solution for me
> I have a generative query, where I later add the select_from object.
>
> The query is generative, since the tables involved are not know in
> advanc
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Michael Bayer ha scritto:
> Manlio Perillo wrote:
> [...]
> query = sql.join(x, y).select()
> r = engine.execute(query).fetchone()
> [...]
>
> This code will raise an:
> sqlalchemy.exc.InvalidRequestError: Ambiguous co
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Hi.
Here is a simple example of using joins in SQLAlchemy:
from sqlalchemy import schema, types, sql, create_engine
metadata = schema.MetaData()
x = schema.Table(
'x', metadata,
schema.Column('id', types.Integer, primary_key=True),
schem
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Michael Bayer ha scritto:
> Manlio Perillo wrote:
>> PoolListener is rather low level; if I use them I need to know in
>> advance the secondary databases to attach.
>
> What precisely is the use case for an application that wi
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Michael Bayer ha scritto:
> Manlio Perillo wrote:
>> When writing this code I found some problems with SQLAlchemy:
>>
>> 1) There is no support for SQL Schema at all.
>>
>>It is ok, for me, if there is no
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Michael Bayer ha scritto:
> Manlio Perillo wrote:
> Hi.
>
> I have written a module to implement support to SQL Schema in SQLALchemy.
>
> The code is available here:
> http://paste.pocoo.org/show/17/
>
> It
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Hi.
I have written a module to implement support to SQL Schema in SQLALchemy.
The code is available here:
http://paste.pocoo.org/show/17/
It requires this patch:
http://paste.pocoo.org/show/175556/
It currently supports PostgreSQL and SQLite.
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Michael Bayer ha scritto:
> Manlio Perillo wrote:
> Hi.
>
> I would like to use SQL schemas in my projects, however support in
> SQLAlchemy is quite poor.
>
> What I want to do is to create a custom MetaData object, that allow
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Hi.
I would like to have a function, that given an SQLAlchemy select query,
an urlencoded string and some other parameters, add the encoded query
parameters to the query, using the generative where method.
Something like what Django does.
I'm going
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Michael Bayer ha scritto:
> Manlio Perillo wrote:
> [...]
>>>> OK you mean SQL expression during compilation. This is ticket #1534
>>>> which is not yet implemented.
>>
>> After some tests I got something
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Michael Bayer ha scritto:
> [...]
> In SQL (tested with PostgreSQL and SQLite, at least) I can do:
> INSERT INTO test (text) values(to_tsvector('some text'));
>
> That is, it is possible to specify a scalar select statement for each
> value.
>
>
> I
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Hi.
I have written a small class in order to support PostgreSQL tsearch type:
class TextSearchVector(UserDefinedType):
"""Support for full-text search
See
http://www.postgresql.org/docs/8.4/static/datatype-textsearch.html
"""
de
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Michael Bayer ha scritto:
> On Feb 1, 2010, at 8:31 PM, Manlio Perillo wrote:
>
> Hi.
>
> I have defined a custom type for PostgreSQL ltree support.
>
> [...]
> This works, when I create the table and insert some values.
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Hi.
I have defined a custom type for PostgreSQL ltree support.
The code is very simple (I'm using version from trunk):
class LabelTree(UserDefinedType):
def bind_processor(self, dialect):
def process(value):
assert '_' not in
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Michael Bayer ha scritto:
> Manlio Perillo wrote:
> Hi.
>
> I'm experiencing a strange problem with a multi INSERT statement.
>
> Strange because I'm unable to reproduce it.
>
> Here are both SQLAlchemy
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Hi.
I would like to use SQL schemas in my projects, however support in
SQLAlchemy is quite poor.
What I want to do is to create a custom MetaData object, that allows me
to specify the default schema name to use.
All tables bound to that meta data, w
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Hi.
I'm experiencing a strange problem with a multi INSERT statement.
Strange because I'm unable to reproduce it.
Here are both SQLAlchemy (trunk) and PostgreSQL (8.3) logs:
sqlalchemy.exc.ProgrammingError: (ProgrammingError) syntax error at
positi
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
King Simon-NFHD78 ha scritto:
> [...]
>> params = [ {'x': 1}, {'x': 2, 'y': False} ]
>> engine.execute(test.insert(), params)
>> print engine.execute(test.select()).fetchall()
> [...]
>>
>> This should print:
>> [(1, True), (2, False)]
>>
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Hi.
I'm here again with a problem I don't know if it is a bug in SA or in my
code.
Here is the offending code:
from sqlalchemy import schema, types, sql, create_engine
metadata = schema.MetaData()
test = schema.Table(
'test', metadata,
sch
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Michael Bayer ha scritto:
> Manlio Perillo wrote:
>> However, now I'm not sure to understand the example here:
>> http://www.sqlalchemy.org/docs/reference/sqlalchemy/expressions.html?highlight=exists#sqlalchemy.sql.expression.exis
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Michael Bayer ha scritto:
> [...]
> from sqlalchemy import schema, types, sql, create_engine
>
> metadata = schema.MetaData()
> test = schema.Table(
> 'test', metadata,
> schema.Column('x', types.Integer, primary_key=True)
> )
>
> engine
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Hi.
It seems there is a bug with SQL CASE support in SQLAlchemy (I'm testing
using trunk).
Here is the original SQL statements:
CREATE TABLE test (
x INTEGER PRIMARY KEY
);
SELECT
CASE WHEN 'true'
THEN (SELECT EXISTS (SELECT x FROM test))
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Hi.
I'm updating some of my code to SQLALchemy 0.6, and I have noted a
problem with the sessionmaker function.
The problem is a compatibility one: old versions use the transactional
parameter, new ones the autocommit parameter.
Usually, to handle th
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Hi.
I have noted that SQLAlchemy supports PostgreSQL 8.3
INSERT/UPDATE...RETURNING, but not DELETE... RETURNING.
What is the reason?
Thanks Manlio Perillo
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Michael Bayer ha scritto:
>
> On Oct 11, 2009, at 12:59 PM, Manlio Perillo wrote:
>
>> -BEGIN PGP SIGNED MESSAGE-
>> Hash: SHA1
>>
>> Michael Bayer ha scritto:
>>> [...]
>>> BufferedCol
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Michael Bayer ha scritto:
> [...]
> BufferedColumnRow is also not picklable. The reference to the parent
> ResultProxy is still required which itself is not picklable.
> [...]
>
> In any case this feature request would only be for 0.6.
Ok, tha
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Michael Bayer ha scritto:
>
> On Oct 11, 2009, at 8:06 AM, Manlio Perillo wrote:
>
> Hi.
>
> I have noted a problem when a I try to pickle an instance of
> sqlalchemy.engine.base.RowProxy:
>
> <...>
> File &quo
_reg.py", line 76, in _reduce_ex
raise TypeError("a class that defines __slots__ without "
TypeError: a class that defines __slots__ without defining __getstate__
cannot be pickled
Is this limitation really necessary?
Thanks Manlio Perillo
-BEGIN PGP SIGNATURE-
Version: GnuP
query')])
However IMHO this should be done by SQLALchemy, and not by the programmer.
What do you think?
Thanks Manlio Perillo
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iEYEARECAAYFAkoByRkACgkQscQJ24LbaUQz
dbapi/test_dbapi.py
I would really appreciate comments about the code.
Thanks Manlio Perillo
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"sqlalchemy" group.
To post to this group, send emai
ddress, contacts_info
WHERE contacts_info.username = ?
['[EMAIL PROTECTED]']
COMMIT
BEGIN
UPDATE contacts_info SET full_name=?, telephone=?, fiscal_code=? WHERE
contacts_info.username = ?
['Manlio Perillo x', u'B', u'C', '[EMAIL PROTECTED]']
UPDATE contact
Michael Bayer ha scritto:
>
> On Jul 8, 2008, at 2:50 PM, Manlio Perillo wrote:
>
>> Michael Bayer ha scritto:
>>> [...]
>>>
>>> Current integration approaches focus on the scoped_session()
>>> construct
>>> as "home base&
r each transaction (if the
user does not like it, then it can use its how logic).
My problem is with contextual connections.
Thanks Manlio Perillo
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"sqlalch
is sized appropriately otherwise
> your whole app could freeze if an async request blocks on no
> connections available.
>
If no connections are available, then an exception should be raised.
Thanks Manlio Perillo
--~--~-~--~~~---~--~~
You recei
nup of the contextual connection at the end of the request.
My question is: will this suffice or should I implement something more
integrated with SQLAlchemy?
Another problem is with the ORM, but I'm still studing it since a lot
has changed sin
Hi.
Is it ok to do something like:
def helper(conn):
sess = orm.create_session(bind=conn)
t = Test()
t.x = 121
sess.save(t)
sess.flush()
sess.close()
db = create_engine(URL)
db.transaction(db, helper)
?
Thanks Manlio Perillo
Glauco ha scritto:
> Manlio Perillo ha scritto:
>> Hi.
>>
>> I'm having strange problems when I execute a SHOW command with PostgreSQL.
>>
>> from sqlalchemy import create_engine, sql, __version__
>>
>> print __version__
>>
>> URL =
hemy.exceptions.InterfaceError: (InterfaceError) cursor already
closed None None
What's the problem?
If I execute the query directly with psycopg2, there are no errors.
Thanks Manlio Perillo
--~--~-~--~~~---~--~~
You received this message because you are
Hi.
Does sqlalchemy supports the query in the subject?
Thanks Manlio Perillo
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"sqlalchemy" group.
To post to this group, send email to sqlalchemy@google
Michael Bayer ha scritto:
>
> On Jan 28, 2008, at 6:03 AM, Manlio Perillo wrote:
>
>> Hi.
>>
>> In this wiki page:
>> http://www.sqlite.org/cvstrac/wiki?p=ForeignKeyTriggers
>>
>> there is a recipe on how to add basic foreign key support to SQLi
27; in SQLAlchemy?
>
Unstable internal API.
> Kindest regards,
>
> Koen Bok
>
Manlio Perillo
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"sqlalchemy" group.
To post to this group, send
in SQLAlchemy (so that they can be automatically
created/dropped) but I have abandoned the project because the internals
of SQLAlchemy are unstable.
Thanks Manlio Perillo
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
es from SQLAlchemy internals; moreover the code is very simple
so it should be easy to fix any problems.
A possible problem can be with compiled query execution.
Regards Manlio Perillo
--~--~-~--~~~---~--~~
You received this message because you are subscr
Michael Bayer ha scritto:
>
> On Nov 20, 2007, at 4:35 AM, Manlio Perillo wrote:
>
>> I have asked on the psycopg2 list.
>>
>> psycopg2 connection has a notices attribute.
>>
>>
>> try:
>> conn = db.connect()
&g
Michael Bayer ha scritto:
>
> On Nov 16, 2007, at 1:54 PM, Manlio Perillo wrote:
>
>> There is an error in the schema, b.id is of type String instead of
>> type
>> Integer.
>>
>> Unfortunately PostgreSQL does not raises an error, but just a warning.
&g
1 - 100 of 182 matches
Mail list logo