Hi,
Does anyone have any experience, links to open source code or anything else
that shows the integration of PyQT5 with SQLAlchemy?
Thanks
Wayne
--
SQLAlchemy -
The Python SQL Toolkit and Object Relational Mapper
http://www.sqlalchemy.org/
To post example code, please provide an MCVE
or missing the obvious?
Thanks,
Wayne
Here is the SQL I hand crafted before I started building the expr
repr.
select id, name, sum(cnt) as total from
(
(select count(*) as cnt, groupname as name,
invgroups.groupid as id from invgroups
join invtypes
the result of the union of the count and
literal columns in the outer select.
Wayne
On Jul 2, 11:39 am, Michael Bayer mike...@zzzcomputing.com wrote:
Queb wrote:
On Jul 2, 10:39 am, Michael Bayer mike...@zzzcomputing.com wrote:
whats count() here, do you mean func.count('*') ?
Sorry, yes, count
For mySQL you could use unix_timestamp()
For Postgres you could use date_part('epoch',now())
I've always used DateTime personally and have only ever reflected
tables that used Integer timestamps. So I can't speak to the drawbacks
or potential impacts with any authority. There may also be a more
)
TT = s2.alias('TT')
u = union_all(s1, TT)
s = select([
u.c.id,
u.c.name,
func.sum(u.c.cnt).label('total')
]).group_by(TT.c.name, TT.c.id).order_by(TT.c.name)
print s
Wayne Witzel wrote:
Count needs to appear in the group by our be used in an aggregate
I assume I am over looking some simple thing, but I just can't seem to
find it. Thanks for the assist, I have palms open ready for face
planting.
Using a class and table with orm.mapper()
class Child(object):
pass
child_table = Table('child', meta.metadata,
Column('parent_id',
']), {})
Now all is well, sorry for the ML clutter. I am face palming in 3, 2,
1
On Apr 8, 4:49 pm, Wayne Witzel wwitz...@gmail.com wrote:
I assume I am over looking some simple thing, but I just can't seem to
find it. Thanks for the assist, I have palms open ready for face
planting.
Using
On Oct 15, 11:37 am, Heston James - Cold Beans
[EMAIL PROTECTED] wrote:
Quick question I hope guys.
If I have an object which contains a bunch of children and cascade is set on
the relationships. When I add the parent object to the session and commit
it, are the children saved as part of a
: '_BindParamClause' object is not iterable
is this possible or not ?
or sending a list/tuple/iterable as bindparam-value is not supported?
ciao
svil
Just wrap your bindparam with brackets.
Wayne
--~--~-~--~~~---~--~~
You received this message because you are subscribed
be x.in_([bindparam('somename')])
I have to turn off the caching proxy for this group, you reply too
fast.
Wayne
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
sqlalchemy group.
To post to this group, send email
I have the following code:
tags = [utag1, utag2]
tag_count = len(tags)
inner_q = select([shiptag_table.c.shipid])
inner_w = inner_q.where(
and_(shiptag_table.c.tagid == Tag.id,Tag.name.in_(tags))
On Oct 9, 10:20 am, Wayne Witzel [EMAIL PROTECTED] wrote:
I have the following code:
tags = [utag1, utag2]
tag_count = len(tags)
inner_q = select([shiptag_table.c.shipid])
inner_w = inner_q.where(
and_(shiptag_table.c.tagid == Tag.id
not really
clear what statement you're going for...).
Yeah, this was exactly what was happening,
I turned off the auto-correlation for the inner_q and got the desired
output SQL and results.
Thanks Michael
Thanks,
Wayne
--~--~-~--~~~---~--~~
You received this message
13 matches
Mail list logo