l.type
>
> its a tuple, lose the ','
>
> On Sep 30, 2010, at 6:42 PM, phasma wrote:
>
>
>
> > at:
> > ol.type = data['type'],
> > print type(data['type'])
>
> > returns str
>
> > print ol.__dict__
>
7;2',), u'has_minibank':
(False,), u'has_car_washer': (False,), u'gps_lng': ('2',), u'type':
('office',), u'_class': ('A',), u'has_beauty_salon': (False,)}
On Oct 1, 2:19 am, Michael Bayer wrote:
> d
If add to sqlalchemy/orm/mapper.py at 1699 line this code:
if isinstance(value, tuple):
value = value[0]
Insert works correctly.
On Sep 30, 9:31 pm, phasma wrote:
> Hi.
>
> I've got auto
Hi.
I've got autoloadable table:
---
class ObjectList(object):
pass
t_object_list = sa.Table('object_list', meta.metadata, autoload=True,
autoload_with=engine)
orm.mapper(ObjectList, t_object_list)
--
thers wrote:
> On 16/09/2010 11:49, phasma wrote:
>
> > session imported from Meta ? If use Meta.Session.execute it's returns
> > RowProxy, which has no lastrowid parameter.
>
> Try this:
>
> with meta.Session:
> result = meta.Session.execute("INSERT state
id = result.lastrowid
>
> http://www.sqlalchemy.org/docs/core/connections.html?highlight=result...
>
> On Sep 15, 2010, at 5:51 PM, phasma wrote:
>
>
>
> > Lastrowid return: "Could not locate column in row for column
> > 'lastrowid'". I try to use transacti
the ResultProxy for those DBAPIs which support it,
> so try using that. Perhaps you're getting "0" because the transaction is
> going away, in which case .lastrowid should solve that issue.
>
> On Sep 15, 2010, at 12:45 PM, phasma wrote:
>
>
>
> >
I've got database with auto increment column called `id` and INSERT
query, whom I need to execute without model declaration in project.
meta.Session.execute() returns ResultProxy, but last_inserted_ids()
doesn't work with execute() and "SELECT LAST_INSERT_ID()" statement
sometimes return 0. Is ther
On 12 янв, 04:07, jason kirtland <[EMAIL PROTECTED]> wrote:
> phasma wrote:
> >> What character set is the db-api driver using? Try:
>
> >> >>> engine.connect().connection.character_set_name()
>
> >> If it's not utf8, you can configure t
>
> What character set is the db-api driver using? Try:
>
> >>> engine.connect().connection.character_set_name()
>
> If it's not utf8, you can configure the driver by adding 'charset=utf8'
> to your database url.
I add charset='utf-8' to 'create_engine' function, but before send
data(from query
Hi!
I'm using mysql
*** 1. row ***
Variable_name: character_set_client
Value: utf8
*** 2. row ***
Variable_name: character_set_connection
Value: utf8
*** 3. row
Hi!
I'm trying create table in database, but 'default' option isn't using,
when executing 'paster setup-app development.ini' ...
__init.py__
from sqlalchemy import *
from sqlalchemy.databases.mysql import *
from sqlalchemy.ext.assignmapper import assign_mapper
from pylo
12 matches
Mail list logo