Conor,
On 07/27/2011 05:54 PM, Conor wrote:
On 07/27/2011 10:42 AM, werner wrote:
I like to use a stored procure which needs a input parameter in
something like this:
seltest = db.sa.select([id,
name]).select_from(db.sa.func.someStoredProc(2)).alias()
seltestm = db.sao.mapper(ATest,
Am 28.07.2011 00:41 schrieb Michael Bayer:
order_by() is accepting SQL expressions, not values, so it is
consistent that values should be coerced to SQL first in this case
literal_column(1), etc.
My thought was that if order_by automatically coerces strings, i.e.
order_by('1') works, then it
Hello.
I'm using Microsoft Sql Server 2008, sqlalchemy 0.7.1.
When I'm trying to create table using metadata.create_all method with
checkfirst=True, an axception is raised.
I set option convert_unicode=True in engine initialization. Here is the
backtrace:
...
File ..., line 32, in
On Jul 28, 2011, at 10:34 AM, Michael Kvyatkovskiy wrote:
Hello.
I'm using Microsoft Sql Server 2008, sqlalchemy 0.7.1.
When I'm trying to create table using metadata.create_all method with
checkfirst=True, an axception is raised.
I set option convert_unicode=True in engine
On Wed, Jul 27, 2011 at 2:48 PM, Michael Bayer mike...@zzzcomputing.com wrote:
On Jul 27, 2011, at 3:21 PM, Kent Tenney wrote:
Howdy,
I'm aggregating data from several Sqlite files into a Postgres db.
The sqlite files are storage for several apps I use: Shotwell,
Firefox, Zotero, Banshee
On Jul 28, 2011, at 11:47 AM, Kent Tenney wrote:
It offers choices in that you can A. use core only or B. the ORM, as well
as choices in that it works with whatever kind of schema you'd like,
I'll be studying doc for a better idea of the A/B distinction, as
well as what kinds of schemas
Dear all,
I have 2 queries:
1)
query1=session.query(func.max(datab.columns['counter']).label('t1')).group_by(datab.columns['site'])
query2=session.query(tab.columns['name'],tab.columns['id'],tab.columns['counter']).filter(datab.columns['visits']==15)
Now I would like to get all pairs
On Wednesday 15 Jun 2011 11:44:32 AM Bala wrote:
def write(self, params):
if 'id' in params:
ticket = self.dao.FindByID(Ticket, params['id'][0])
ticket.modified = datetime.datetime.now()
else:
Thank you for the response!
On 28 июл, 19:07, Michael Bayer mike...@zzzcomputing.com wrote:
On Jul 28, 2011, at 10:34 AM, Michael Kvyatkovskiy wrote:
the test case you'd like to try is
(seehttp://code.google.com/p/pyodbc/wiki/ConnectionStringsfor connect
strings) :
import pyodbc
conn =
Hi folks,
I'm working on a project which uses SQLAlchemy as ORM layer and I have a
question about @validates decorator.
How can I get a list of functions (in each entity of my model) that are
decorated using sqlalchemy.orm.validates decorator?
Regards,
Stefano.
--
You received this
Il 28/07/11 01.15, Aviv Giladi ha scritto:
Hi,
I am actually using both MySQL and SQLite (one on the dev machine, one
on the server).
Does that make a difference?
ONDELETE and ONUPDATE don't work on SQLite and MySQL MyISAM.
You must change your database to test them.
In MySQL you can create
h well there's not a public API for that. Right now (and with no
immediate plans to change it) the function should have an attribute called
__sa_validators__ which is a list of attribute names.Ultimately there are
attribute events assigned though the event API doesn't have a
I need a Single Table Inheritance where the `type` column already
exists and is a foreign key - `id_type` - to `types` table.
My concern is I only need to map to two different classes:
- Foo for `polymorphic_identity=FOO_ID_TYPE`
- Bar for all other `id_type`s
Is there a way I can accomplish
On Jul 28, 2011, at 4:23 PM, neurino wrote:
I need a Single Table Inheritance where the `type` column already
exists and is a foreign key - `id_type` - to `types` table.
My concern is I only need to map to two different classes:
- Foo for `polymorphic_identity=FOO_ID_TYPE`
- Bar for all
Thanks Michael,
my need is quite easy, no need of complex querying.
Simply my class represents a Layer and, while quite all layer types
(concrete, wood, bricks, etc.) act the same, only one (air) acts in a
completely different way.
With act I refer to performing calculations on float
On Jul 28, 2011, at 6:08 PM, neurino wrote:
Thanks Michael,
my need is quite easy, no need of complex querying.
Simply my class represents a Layer and, while quite all layer types
(concrete, wood, bricks, etc.) act the same, only one (air) acts in a
completely different way.
With
I tried create_instance event and it fires, now having:
def see_what_type(mapper, context, row, class_):
if **is_air**:
return Air()
else:
return EXT_CONTINUE
def initialize_sql(engine):
...
layer_mapper = mapper(Layer, layers)
mapper(Air,
Thanks for your answer Michael.
I experimented with column_property and generally it works, however
now I have 2 separate attributes - one for setting a value and
another, read-only one, for reading the modified value.
class User(Base):
...
email = sa.Column(String)
Anyone know of another sqlalchemy + beaker example I can look it?
On Jul 27, 2:05 pm, espresso maker espressso.ma...@gmail.com wrote:
Hi there,
I am trying to follow the setup in this
examplehttp://www.sqlalchemy.org/trac/browser/examples/beaker_cachingto
enable beaker caching in
19 matches
Mail list logo