10 at 6:46 PM, Shawn Church wrote:
> I'm trying to refactor an existing cherypy/pyamf application and am running
> into the following problem. The code:
>
> @RemoteClass(alias="common.model.vo.OrderVO")
> class OrderVO(object): pass
>
> cla
I'm trying to refactor an existing cherypy/pyamf application and am running
into the following problem. The code:
@RemoteClass(alias="common.model.vo.OrderVO")
class OrderVO(object): pass
class Orders(Service):
""" Query and modify model.application.Order """
klass = model.Order
@s
e = column_property(
select([O.payments - O.total]).label("change_due"))
del O, L, P, N, total
Thanks once again for your assistance.
Shawn
On Sun, Mar 22, 2009 at 1:14 PM, Shawn Church wrote:
>
>
> On Sun, Mar 22, 2009 at 12:39 PM, Michael Bayer
> wrote:
>
>>
On Sun, Mar 22, 2009 at 12:39 PM, Michael Bayer wrote:
>
>
> On Mar 22, 2009, at 3:00 PM, Shawn Church wrote:
>
> >
> > This isn't really the same thing because the float would be rounded
> > after the sum not line by line. I think I could also use sum(...
>
Could cast be defined to allow string values (i.e. cast(...,
"Numeric(14,2)")? This would fix my problem. Guess I will check the code
and see.
On Sun, Mar 22, 2009 at 12:00 PM, Shawn Church
wrote:
>
>
> On Sun, Mar 22, 2009 at 8:17 AM, Michael Bayer
> wrote:
>
>
cast(select([func.sum(IF(L.taxable, L.quantity * L.price, 0))],
L.order_id == id).as_scalar(),
Numeric(14.2)).label("taxable"))
This isn't really the same thing because the float would be rounded after
the sum not line by line. I think I could also use su
I'm trying to define a column_property including a cast expression, but am
running into the following error:
>>> import sqlalchemy
>>> sqlalchemy.__version__
'0.5.2'
>>> from sqlalchemy import *
>>> from sqlalchemy.orm import relation, column_property, sessionmaker
>>> f
On Tue, Mar 10, 2009 at 8:52 AM, phrrn...@googlemail.com <
phrrn...@googlemail.com> wrote:
>
> The quality of the support in this group is remarkable. The answers
> are starting to remind me of Guy Harris in terms of quality and
> clarity! (If the name is not familiar to you then check out the Use
On Fri, Mar 6, 2009 at 4:36 PM, Michael Bayer wrote:
>
> uh yeah it is. the sync of the primary key to the foreign key happens
> after the parent object is updated. but the child is also the parent, so
> the flush completes without ever getting to the "child". if you set
> post_update=True t
On Fri, Mar 6, 2009 at 3:43 PM, Michael Bayer wrote:
>
>
> On Mar 6, 2009, at 6:14 PM, Shawn Church wrote:
>
> >
> > But setting the User.modified_by relation does not work:
> >
> >>>> user.modified_by = user
>
> the key here is that you're
I'm trying to convert some classes from Elixir to declarative and am
running into a problem defining a simple self-referencing definition.
I've searched the archives and have tried several things but seem to
be missing something:
>>> import sqlalchemy
>>> sqlalchemy.__version__
'0.5.2'
>>> from
For performance reasons I am converting some operations from ORM to SQL
Expression syntax. In other words instead of session.query(...) I'm now
using select(...).execute(). This has led to a couple of questions:
1) I was relying on thread local sessions to handle all the ugly details for
me whe
On Sun, Nov 16, 2008 at 1:24 AM, Werner F. Bruhin <[EMAIL PROTECTED]>wrote:
>
> But after I had installed rc3 I easy_installed from svn
> (http://svn.sqlalchemy.org/sqlalchemy/trunk) and then when rc4 came out
> and I wanted to do the upgrade I got again a dev version
> (sqlalchemy-0.5.0rc4dev_r0)
On Sat, Nov 15, 2008 at 7:55 AM, Michael Bayer <[EMAIL PROTECTED]>wrote:
>
> easy_install remains a mystery to me in general. Try easy_install
> sqlalchemy==0.5.0rc4 , or otherwise yeah delete out your dev versions.
>
> I use "easy_install --upgrade sqlalchemy":
[EMAIL PROTECTED]:~/$ sudo easy_i
On Thu, Sep 25, 2008 at 6:47 AM, Michael Bayer <[EMAIL PROTECTED]>wrote:
> Converting *all* strings to unicode would then lead to havoc as soon
> as someone adds a Binary column to their schema. Another solution,
> which we have support for, would be for ResultProxy to attempt to
> match TypeEng
On Wed, Sep 24, 2008 at 11:04 PM, jason kirtland <[EMAIL PROTECTED]>wrote:
>
> Shawn Church wrote:
> >
> >
> > On Wed, Sep 24, 2008 at 10:45 PM, jason kirtland <[EMAIL PROTECTED]
> > <mailto:[EMAIL PROTECTED]>> wrote:
> >
> >
> >
On Wed, Sep 24, 2008 at 10:45 PM, jason kirtland <[EMAIL PROTECTED]>wrote:
> Adding ?charset=utf8&use_unicode=1 to your MySQL connection URL is a
> much easier way to get Unicode back from all DB access.
>
Ok, that works. I thought that "create_engine(uri, encoding = "latin1",
convert_unicode =
On Wed, Sep 24, 2008 at 7:37 PM, Michael Bayer <[EMAIL PROTECTED]>wrote:
> we can of course add more functions to the list of "known" functions
> such as ifnull() (it would be best if ifnull() is a SQL standard
> function, I'm not sure if it is).
>
>
Not sure this will work for IFNULL since it's t
I am trying to construct a select query in mysql (version
5.0.51a-3ubuntu5.3-log) using SQL functions. Once I set the convert_unicode
flag = True on my engine some function results are returned as type str and
some results are returned as type unicode (I want, and expected, all
unicode). Althou
Hope the above helps.
Shawn Church
I/S Consultant
shawn at SChurchComputers.com
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"sqlalchemy" group.
To post to this group, send email to sqlalchemy@googlegroup
, I WANT to explicitly issue the .commit's, so I hope I am
understanding this correctly. I just need some clarification. I cannot
find much recent information on SqlSoup by searching this list. Is it
supported? Is it used? Can it be used in a production environment?
Thanks,
Shawn Churc
21 matches
Mail list logo