On 8/30/07, Travis Kriplean <[EMAIL PROTECTED]> wrote:
> I'd like to use SQLAlchemy to connect to a db server, create a
> database, and then start using it. However, it appears that the
> SQLAlchemy api assumes the existence of a database to connect to. I'm
> able to connect to the server without
Hi all,
I'd like to use SQLAlchemy to connect to a db server, create a
database, and then start using it. However, it appears that the
SQLAlchemy api assumes the existence of a database to connect to. I'm
able to connect to the server without a database specified:
>>> con = 'postgres://postgres:
On 8/30/07, Moshe C. <[EMAIL PROTECTED]> wrote:
>
> I was hoping there was something more elegant than just trying and
> catching a possible exception.
> The motivation is just simpler and more readable code like
> if not connection.is_valid():
>get another one
The issue is that in a packet-b
I was hoping there was something more elegant than just trying and
catching a possible exception.
The motivation is just simpler and more readable code like
if not connection.is_valid():
get another one
On Aug 30, 5:25 pm, "Paul Johnston" <[EMAIL PROTECTED]> wrote:
> How about, conn.execute(
Thanks!
On Aug 30, 10:13 pm, jason kirtland <[EMAIL PROTECTED]> wrote:
> voltron wrote:
>
> > Hi all
>
> > What do I have to import to be able to use the column type TEXT?
>
> from sqlalchemy import Column, TEXT
> Column('mytext', TEXT)
>
> or use 'String' without a length qualifier:
>
> fr
voltron wrote:
>
> Hi all
>
> What do I have to import to be able to use the column type TEXT?
from sqlalchemy import Column, TEXT
Column('mytext', TEXT)
or use 'String' without a length qualifier:
from sqlalchemy import Column, String
Column('mytext', String)
--~--~-~--~~
is this correct?
import sqlalchemy.types as types
On Aug 30, 10:07 pm, voltron <[EMAIL PROTECTED]> wrote:
> Hi all
>
> What do I have to import to be able to use the column type TEXT?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to
Hi all
What do I have to import to be able to use the column type TEXT?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"sqlalchemy" group.
To post to this group, send email to sqlalchemy@googlegroups.com
To unsubs
> session.execute(statement) ?
Perfect. Thanks so much.
Randall
Michael Bayer wrote:
>
> On Aug 30, 2007, at 2:46 PM, Randall Smith wrote:
>
>> After some testing, the example I gave did not work properly. queries
>> executed with con did not reflect changes made in a session
>> transact
On Aug 30, 2007, at 2:46 PM, Randall Smith wrote:
>
> After some testing, the example I gave did not work properly. queries
> executed with con did not reflect changes made in a session
> transaction.
> This does seem to work:
>
> sess = object_session(self)
> con = sess.c
After some testing, the example I gave did not work properly. queries
executed with con did not reflect changes made in a session transaction.
This does seem to work:
sess = object_session(self)
con = sess.connection(self.mapper)
Seems messy. self.mapper only exists becau
use sess.connection(self.__class__). that will return whatever
connection is specific to that class' mapper within any current
transactions.
On Aug 30, 2007, at 2:20 PM, Randall Smith wrote:
>
> I'm wondering what is the best way for a mapped object to acquire a
> connection for a non-ORM s
Typo in untested example. session should be sess.
Randall
Randall Smith wrote:
> I'm wondering what is the best way for a mapped object to acquire a
> connection for a non-ORM style query while staying within the context
> (reuse connection or transaction) of its own session. For example, he
I'm wondering what is the best way for a mapped object to acquire a
connection for a non-ORM style query while staying within the context
(reuse connection or transaction) of its own session. For example, here
is a method of a mapped object.
@property
def analysis_count(self):
On Aug 27, 2007, at 1:16 PM, mc wrote:
>
> Hi,
> I have the following two tables (in MySql):
>
> CREATE TABLE `A` (
> `xkey` varchar(200) NOT NULL,
> `yval` int(11) default NULL,
> PRIMARY KEY (`xkey`)
> ) ENGINE=InnoDB;
>
> and
>
> CREATE TABLE `B` (
> `xkey` varchar(200) NOT NULL defa
On Aug 30, 2007, at 8:20 AM, marq wrote:
>
> Hello,
>
> apologies if I'm the obvious or important things in the documentation
> - and I'm obviously very new to SQLAlchemy...
>
> I'd like to create my own types which are aware of different database
> dialects. For example, I need a type 'Double'
On Aug 30, 2007, at 2:17 AM, Marco De Felice wrote:
>
> Michael Bayer ha scritto:
>> its most likely uncompiled mappers. the "c" attribute on the class
>> is deprecated; use Table.attribute instead.
>> ...
>
> Thanks, but it seems the Table.c.attribute has a .op() method that I
> can't find on
How about, conn.execute('select 1')
On 8/30/07, Moshe C. <[EMAIL PROTECTED]> wrote:
>
>
> How can I test whether a connection object is valid and hasn't, for
> example, been time outed by the server?
>
>
> >
>
--~--~-~--~~~---~--~~
You received this message because
Raising this after 3 days, still hoping for help :-)
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"sqlalchemy" group.
To post to this group, send email to sqlalchemy@googlegroups.com
To unsubscribe from this grou
How can I test whether a connection object is valid and hasn't, for
example, been time outed by the server?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"sqlalchemy" group.
To post to this group, send email to sq
IMO current way as of src (sorry i havent read docs at user level),
u'll need two-side implementaion - one abstract SA, and one
dialect-dependent. In each dialect, there are 2 mappings: one
abstractSAtype->specificDialectType (look for something named
colspecs), and another one used for reflec
Hello,
apologies if I'm the obvious or important things in the documentation
- and I'm obviously very new to SQLAlchemy...
I'd like to create my own types which are aware of different database
dialects. For example, I need a type 'Double' which holds a
representation of a double precision floati
I have found the answer:
table.update(values={table.c.id:myNewSequenceNumber}).execute()
On Aug 29, 4:33 pm, "alex.schenkman" <[EMAIL PROTECTED]> wrote:
> Hi:
>
> I'm new to SQL.
> I have to execute the following SQL line, which updates a sequence
> number. The table zseq_document_types_lookup
23 matches
Mail list logo