Could someone tell me how to simulate the rank() function? I am using
PostgreSQL which does not have this a s a native function.
Thanks
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"sqlalchemy" group.
To post to t
Thanks! I'll try that out Mike
On Dec 18, 3:55 pm, Michael Bayer <[EMAIL PROTECTED]> wrote:
> On Dec 18, 2007, at 9:49 AM, voltron wrote:
>
>
>
> > I am trying to retrieve unique users from a table using this:
>
> > results = sa_session.query(TempScore).gr
I have numerical values assigned to user in a table, I have query the
table, sort the table in a descending order and then return the value
of a certain user with his position/rank in the table.Could someone
give me a "leg" up?
Thanks
--~--~-~--~~~---~--~~
You rec
I am trying to retrieve unique users from a table using this:
results = sa_session.query(TempScore).group_by(TempScore.user_name)
This unfortunately causes the error below:
"There was a problem: (ProgrammingError) column "temp_scores.id" must
appear in the GROUP BY clause or be used in an aggre
Hi!
import Guard, as in the tutorial does not work. Any ideas?
Easy:installing was problematic, but installing( and python setup.py
install) from the download worked.
I' m using windows python 2.4
Thanks!
On Dec 2, 11:07 pm, Samuel <[EMAIL PROTECTED]> wrote:
> Introduction
>
> S
Thanks
On Oct 2, 3:54 pm, Ants Aasma <[EMAIL PROTECTED]> wrote:
> On Oct 2, 10:06 am, voltron <[EMAIL PROTECTED]> wrote:> How does one specify
> that the auto incrementing field should map to
> > big serial and not serial?
>
> Use the sqlalchemy.databases.postgr
How does one specify that the auto incrementing field should map to
big serial and not serial?
thanks
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"sqlalchemy" group.
To post to this group, send email to sqlalch
l it. im
> not sure what easy_install issue youre having (i only run py 2.4 here).
>
> On Sep 23, 2007, at 4:59 PM, voltron wrote:
>
>
>
> > I have to use PGArray fields, but I think this is only available using
> > SQlalchemy 0.4. Easy_install only installs 0.4 when i
I have to use PGArray fields, but I think this is only available using
SQlalchemy 0.4. Easy_install only installs 0.4 when it detects Python
2.5. Is there some sort of backport available?
Thanks
--~--~-~--~~~---~--~~
You received this message because you are sub
ot;, String(255),unique=True,
nullable=False),
Column("firstname", String(255)),
Column("lastname", String(255)),
Column("modifiedby_id", Integer, ForeignKey("users.id"))
Column("modifiedon",DateTime(timez
Excuse the newbie question, how does one declare a sef-referencing
key? I would like to have fields "modified_by" and "created_by" in my
users table, the field should refer back to the user id or user name
in the same table.
Thanks
--~--~-~--~~~---~--~~
You recei
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)
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 ar
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
Thanks!
On Jul 2, 10:14 pm, Benjamin Smedberg <[EMAIL PROTECTED]> wrote:
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> voltron wrote:
> > How does one declare Timestamp fields with timezones? The DateTime
> > maps to TimeStamp without.
>
>
How does one declare Timestamp fields with timezones? The DateTime
maps to TimeStamp without.
Thanks
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"sqlalchemy" group.
To post to this group, send email to sqlalche
Sorry if this sis obvious, can one cascade database dropping when
using metadata.drop_all()?
thanks
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"sqlalchemy" group.
To post to this group, send email to sqlalchem
I´m not sure if I should ask this here or the Pylons forum:
How does one wrap a query in a transaction when using SAContext? Could
someone post some example code?
Also, I read somewhere that SQL92 defined transactions eliminate the
need to lock tables, is that right?
Thanks
--~--~-~--
aha, this works
resultset = select([links] , links.c.lft.between(5,17),
order_by=links.c.lft).execute()
On Jun 29, 12:00 am, voltron <[EMAIL PROTECTED]> wrote:
> Thanks for your reply,now I dont have errors, but the results are
> unexpected, I have a list of booleans if I iterate
Jun 28, 11:41 pm, [EMAIL PROTECTED] wrote:
> between is a method of 2 args, min and max:
> table.c.between(x,y), in your case:
> select( links.c.lft.between(3,10) )
>
> On Thursday 28 June 2007 23:55:26 voltron wrote:
>
> > This does not work either :-(
>
> > result
This does not work either :-(
resultset = select([links.c.lft.between(links.c.lft >3,links.c.lft <
10) ]).execute()
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"sqlalchemy" group.
To post to this group, send em
How would would write a query with a BETWEEN?
This does not produce what I want
resultset = select([links, links.c.lft >3, links.c.lft <10]).execute()
I would like all the values "lft" in table links greater than 3 but
less than 10
I am using PostgreSQL
Thanks
--~--~-~--~~---
e\base.py 602
> > "SQLError: (ProgrammingError) column ""user.id"" must appear in the
> > GROUP BY clause or be used in an aggregate function
>
> > On Jun 27, 9:09 pm, Andreas Jung <[EMAIL PROTECTED]> wrote:
>
> >> --On 27. Juni 2007 1
<[EMAIL PROTECTED]> wrote:
> --On 27. Juni 2007 12:00:13 -0700 voltron <[EMAIL PROTECTED]> wrote:
>
>
>
> > I´m guessing a bit because I still could not find the group_by entry
> > in the docs
>
> > This works:
> > user.select(links.c.id> 3, order_
:07 pm, voltron <[EMAIL PROTECTED]> wrote:
> Thanks. I did not find this in the docs.
>
> http://www.sqlalchemy.org/docs/sqlconstruction.html
>
> On Jun 27, 4:01 pm, Andreas Jung <[EMAIL PROTECTED]> wrote:
>
> > --On 27. Juni 2007 06:47:37 -0700 voltron &l
Thanks. I did not find this in the docs.
http://www.sqlalchemy.org/docs/sqlconstruction.html
On Jun 27, 4:01 pm, Andreas Jung <[EMAIL PROTECTED]> wrote:
> --On 27. Juni 2007 06:47:37 -0700 voltron <[EMAIL PROTECTED]> wrote:
>
>
>
> > How can I construct t
How can I construct the clause "group by" using SQL construction?
Thanks
--~--~-~--~~~---~--~~
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 unsub
Thanks Mike, that clears up a few things
On Jun 27, 2:08 am, "Mike Orr" <[EMAIL PROTECTED]> wrote:
> On 6/26/07, voltron <[EMAIL PROTECTED]> wrote:
>
> > sess = create_session()
> > allusers = sess.query(User).select()
>
> > for user in allusers
objects, and then issue a session
> flush().
>
> This type of
> bulk operation is best done with the SQL generation portion of the library,
> like so (using an implicit bound connection here):
>
>users.update(users.c.group == contractor).execute({users.c.group =
> consu
would I have to do something like this?
sess = create_session()
allusers = sess.query(User).select()
for user in allusers:
user.group = "contractor"
print x.name
On Jun 26, 10:40 pm, voltron <[EMAIL PROTECTED]> wrote:
> Could someone tell me how I would execute
Could someone tell me how I would execute this SQL using data mapping?
# SQL
UPDATE users SET group=consultant WHERE group = contractor;
# Mapped object
user_mapper = mapper(User, users)
user = User()
Thanks
--~--~-~--~~~---~--~~
You received this message be
Thanks Arnar! I´ll prefer to take this off the list since it is only
slightly related to SQLAlchemy.
On Jun 26, 2:28 am, "Arnar Birgisson" <[EMAIL PROTECTED]> wrote:
> On 6/25/07, voltron <[EMAIL PROTECTED]> wrote:
>
>
>
> > Thank you very much for yo
Thank you very much for your feedback guys! I was very worried the
whole day. I did some research and found this:
http://www.evolt.org/article/Four_ways_to_work_with_hierarchical_data/17/4047/index.html
This shows different methods of storing hierarchical data, but I just
did not like the mind b
I apologize if this is the wrong place to ask this question.
I would like to store and retrieve JSON objects from a database, the
JSON object holds a list of menu items for my site. What would be the
best way to achieve this?
1. Convert the JSON object to Python code using simplejson, pickle the
Could someone point me to the documentation about declaring and using
Sequence fields in Sqlalchemy? If there are no docs, could someone
give a rundown? I can imagine how it could be used, but I´ll be
working in the "dark" without documentation.
Thanks
--~--~-~--~~~-
another thing, g does not work from websetup.py, which I would have
liked
thanks
--~--~-~--~~~---~--~~
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
I have found a solution which works, but what is the correct way
Michael? I created in base.py:
metadata = DynamicMetaData()
then in my websetup.py :
uri = conf['sqlalchemy.dburi']
engine = create_engine(uri)
metadata.connect(uri)
metadata.create_all()
this works, but you mentioned that I shou
almost there:
I put this in base.py
from sqlalchemy import *
metadata = MetaData()
so anywhere I need it I just import:
from gameolymp.lib.base import *
I have no errors, but no databases are created or dropped, this is
what I added to my websetup.py
from sqlalchemy import *
from myapp.lib.b
current_obj(), attr, value)
File "c:\python24\lib\site-packages\Paste-1.3-py2.4.egg\paste
\registry.py", li
ne 177, in _current_obj
raise TypeError(
TypeError: No object (name: G) has been registered for this thread
On Jun 13, 6:15 pm, Michael Bayer <[EMAIL PROTEC
s case?
thanks
On Jun 13, 3:11 pm, Michael Bayer <[EMAIL PROTECTED]> wrote:
> On Jun 13, 2007, at 7:54 AM, voltron wrote:
>
>
>
> > I have decided to use the global_metada to setup the tables in my app,
> > in one of the tables, users, I setup an admin account
>
I have decided to use the global_metada to setup the tables in my app,
in one of the tables, users, I setup an admin account
user = User("john doe", "[EMAIL PROTECTED]")
how do I flush the the above object? user.flush() does not work in
this context because the User object does not have the attr
actually, I am iterating through all the databases in the meta
ti = model.meta.table_iterator()
for t in ti:
print "create %s ?" % t
if raw_input("Choose [Y/n]").lower() in ['y','']:
t.create()
I want to be able to chose which database to create from a pool on
da
NCES rol
es (id)\n)\n\n' {}
D:\Projects\Pylons_projects\gameolymp>
On Jun 12, 3:50 pm, Michael Bayer <[EMAIL PROTECTED]> wrote:
> its very possible that if you just posted a complete stack trace, the
> issue may be apparent.
>
> On Jun 12, 4:39 am, voltron <[EMAIL PROTECTED
I have a set ob tables, access objects and mappers defined, on trying
to setup my pylons app, which ultimately calls table.create() I get a
" relation does not exist " error, but I know the relation exists in
the mapper that I defined. Several other tables are created without
problems
Is there so
44 matches
Mail list logo