Hi
I cannot connect to SQL Server 2005 (Express) from my linux box using
the suggested SA method. I can connect to SQL Server using sqsh which
indicates that freetds and unixodbc are correctly set up.
I can also connect using pyodbc. Although, only with the DSN method or
with DRIVER={}. For
Hi there.
I have just mirgated to 0.3.8 from 0.3.6 and got the followin error in
my app:
class 'sqlalchemy.exceptions.NoSuchColumnError'
Investigation shows, that queries generated in 0.3.6 and 0.3.8 are
differ:
(diff, i changed all spaces to line breaks before):
--- 1 2007-06-06
MSSQL has a history of confusion about what is owner and what is schema,
and there has been shifting back and forth over the years as they tried to
decide if they wanted to be like Oracle, or like Sybase.
Recently the 2005 version added real schemas as well, so a table
identifier can I believe
on a side note, here or for the query(), once i add .order_by() and
similar, will be a possibility to remove/cancel them?
e.g. .order_by(None) - similar to .join(None)?
or should i keep a copy at the point before adding .order_by()?
e.g.
i want:
q1 = query.filter( ...).order_by(z)#the
svilen ha scritto:
on a side note, here or for the query(), once i add .order_by() and
similar, will be a possibility to remove/cancel them?
e.g. .order_by(None) - similar to .join(None)?
or should i keep a copy at the point before adding .order_by()?
e.g.
i want:
q1 = query.filter(
svilen ha scritto:
on a side note, here or for the query(), once i add .order_by()
and similar, will be a possibility to remove/cancel them?
e.g. .order_by(None) - similar to .join(None)?
or should i keep a copy at the point before adding .order_by()?
e.g.
i want:
q1 =
svilen ha scritto:
because q1 with the order is _the_ query, made at point A somewhen,
and stored there as a construct; much later at some point B i need to
use that query but without the ordering - now i have to keep 2 copies
of the query, w/ and w/out order. And this strip-the-ordering
Beyond the API littering, there may be instances where it is difficult or
impossible to remove a query attribute, because adding the attribute caused
a join calculation or reordered parenthesis, or whatever.
The second pattern is better, e.g. save a copy, rather than mucking things
up with
it's not about littering API / namespaces or not, but if u percieve it
just as such... nevermind.
i admit that undoing some change can be difficult or just impossible
in certain cases. So i'll do a sort of command pattern then, keeping
intermediate queries.
Forget that i asked.
Beyond the
conn = session.context.get_current().connection(SomeMappedClass)
conn.execute(...)
Thanks! It is exactly what I needed.
BTW, the session transaction is stored in
cherrypy.request.sa_transaction. Does this help simplify the
statements?
thanks again,
Sanjay
On Jun 6, 12:37 am, Mike Orr [EMAIL PROTECTED] wrote:
On 6/5/07, Techniq [EMAIL PROTECTED] wrote:
I'm going through the wiki cookbook
http://docs.pythonweb.org/display/pylonscookbook/SQLAlchemy+for+peopl...
and I'm discovering that even though 'model.class.c.column_name.like'
is
can you send me full Table/Mapper/class constructs, running against
sqlite://, so i can run this example, thanks.
On Jun 6, 2007, at 8:30 AM, [EMAIL PROTECTED] wrote:
To be more precise,
the code:
j = outerjoin( task_t, message_t, task_t.c.id==message_t.c.task_id)
jj = select([
On Jun 5, 2007, at 10:30 PM, Mike Orr wrote:
I do think .append_whereclause should be changed to .append_to_where.
A SQL statement can have only one WHERE clause; what you're actually
appending is an AND operand. .append_to_where seems to get that
across better than .append_whereclause or
For reference:
http://www.mail-archive.com/[EMAIL PROTECTED]/msg02239.html
I found the above discussion when googling a ProgrammingError i've
been getting with a polymorphic_union:
quote
sqlalchemy.exceptions.SQLError: (ProgrammingError) UNION types numeric
and character varying cannot be
On Jun 6, 8:32 am, Michael Bayer [EMAIL PROTECTED] wrote:
On Jun 5, 2007, at 10:30 PM, Mike Orr wrote:
I do think .append_whereclause should be changed to .append_to_where.
A SQL statement can have only one WHERE clause; what you're actually
appending is an AND operand. .append_to_where
Yeah, I'm +1 on .where() as well.
On 6/6/07, Michael Bayer [EMAIL PROTECTED] wrote:
On Jun 5, 2007, at 10:30 PM, Mike Orr wrote:
I do think .append_whereclause should be changed to .append_to_where.
A SQL statement can have only one WHERE clause; what you're actually
appending is an
On Jun 6, 2007, at 11:32 AM, Eric Ongerth wrote:
So, skis are working fine but skiboots aren't. If I either comment
out the 'size' column in the skiboots table:
# Column('size', types.Numeric(3,1)),
- or - comment out the 'skiboots' line in the item_join:
#
just to note, I am leaning towards very simple generative method
names for all the things we need, where(), having(), order_by(),
group_by(), distinct(), etc. I am going to have it do copy on
generate by default.
the copy operation itself will be pretty quick, working the way I
have it
.where() is OK.
On 6/6/07, svilen [EMAIL PROTECTED] wrote:
q2 = q1.order_by(None)#used sometimes e.g. for count
This would be useful. If a second .order_by can replace the ordering
(as opposed to appending to it), I don't see why it would be difficult
to delete it. .order_by shouldn't
So then I thought: maybe I just need to reflect the skiboots table
and override the size column to the desired type? That would make
sense... so I tried it, using the same script as above but adding the
line autoload=True as the final clause in each Table definition.
Now i'm getting a
oops, sorry -- I was adding my reply while you were still writing
yours.
--~--~-~--~~~---~--~~
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
On 6/6/07, Michael Bayer [EMAIL PROTECTED] wrote:
just to note, I am leaning towards very simple generative method
names for all the things we need, where(), having(), order_by(),
group_by(), distinct(), etc. I am going to have it do copy on
generate by default.
If a generative default can
On Jun 6, 8:47 am, Michael Bayer [EMAIL PROTECTED] wrote:
your size column differs in type. you cant create a UNION with
differing types in the unioned queries. so it can either be both
string, both numeric, or use distinct columns.
Ah! Ok, if i was more experienced with unions/joins I
While those who prefer the latter can do that, and if you really
need a copy:
q = q.clone().order_by(...)
explicit is better than implicit is one rule that may apply here.
Not that i enslave myself with those rules but they do make sense in
most cases in the long-run.
Michael, u hold
Hi Paul
Thanks for the advice. I have checked out the subversion SQLAlchemy,
made the change to mssql.py, and run the unit tests.
648c648
connectors = [Driver={SQL Server}]
---
connectors = [DRIVER={}]
src/sqlalchemy$ python test/alltests.py --dburi='mssql://
ryant:[EMAIL
Sanjay ha scritto:
BTW, the session transaction is stored in
cherrypy.request.sa_transaction.
Yes, but it's been added recently.
Does this help simplify the statements?
Transaction instances have a connection() property.
So, cherrypy.request.sa_transaction.connection should work.
I'm interested in the results too, as well as the ODBC config. I'm still in
the process of setting up a buildbot slave on Ubuntu that's going to be
running pyodbc as well. I normally use pymssql, and it'll be my first
serious go with pyodbc.
If it's OK with the list, maybe you can post the
Hi,
src/sqlalchemy$ python test/alltests.py --dburi='mssql://
ryant:[EMAIL PROTECTED]/testdb' --verbose --coverage | tee -a sqlaut.log
Try this command line:
python test/alltests.py
--dburi='mssql://ryant:[EMAIL PROTECTED]/testdb?text_as_varchar=1'
sqlaut.log 21
If you could mail the
Yeah. My problem has been solved by altering the tables...
skiboots.c.size is now skiboots.c.skiboot_size, and skis.c.size is now
skis.c.ski_size.
Is there a way I could avoid that, making use of the use_labels=True
parameter on select()? I've been trying to work out how to rewrite my
I have just submitted the ticket #523, there is a minimalistic code
snippet, wich reproduces the error.
I am sorry that I did not sent the working example right in ticket
#592, but I could not reproduce it.
But not I did (see below, or ticket #523):
The problem appears when mapper, relations
I'm bringing this old thread up because I'm still having the same
issue with 0.3.8. In order to use mssql I have to add
def max_identifier_length(self):
return 30
to the pymssql dialect.
I also find that I need to set has_sane_rowcount=False (as I have had
to with every
Hi Graham,
There's a good chance that only you and I are using pymssql, and I don't
have have the long identifiers problem, so it kind of dropped throught the
cracks, sorry.
I've checked in the 30-character thing, but I've left off the sane_rowcount
for now. I had run into issues with that back
On Jun 6, 2007, at 11:58 AM, Eric Ongerth wrote:
So then I thought: maybe I just need to reflect the skiboots table
and override the size column to the desired type? That would make
sense... so I tried it, using the same script as above but adding the
line autoload=True as the final
do me several huge favors:
- do not redefine j three times, ss and tsk_count_join two
times, etc. Particuilarly i have no idea which j join you actually
would like to use. define the individual clauses youd like to use
once, then use that same instance. to SQLAlchemy, two identical
Hi Paul
src/sqlalchemy$ python test/alltests.py --dburi='mssql://
ryant:[EMAIL PROTECTED]/testdb' --verbose --coverage | tee -a sqlaut.log
Try this command line:
python test/alltests.py
--dburi='mssql://ryant:[EMAIL PROTECTED]/testdb?text_as_varchar=1'
sqlaut.log 21
If you could mail
Well,
Sorry, I just copy-pasted it from real code, trying to get minimal
example. I was in rush.
I do not really use clear_mapper, just put it there to demostrate how
it fails.
Here the more clean code (or you may download it from
http://dzuikov2.firstvds.ru/qqq.py)
#!/usr/bin/env python
Hi,
What kind of overhead is associated with using the autoload flag?
Quite high, although not a problem if a long running app only does it at
startup.
Is there a way to dump the structure of a database to a file and
import this as a kind of module?
There is, although it's very basic
Hi,
What kind of overhead is associated with using the autoload flag?
Quite high, although not a problem if a long running app only does it at
startup.
Is there a way to dump the structure of a database to a file and
import this as a kind of module?
There is, although it's very basic
Hi,
I am trying to reuse my column list in my group by clause but some of my
columns use label() which is causing a sql syntax error because of the
column as label in the group by clause. Is it possible to get the
group_by to only use the label side of a column .
eg. (This doesn't work
the queries generated in 0.3.6 and 0.3.8 are identical except for an
anonymous alias name. they are also both incorrect, and its only
because 0.3.6 is less accurate about targeting Column objects in
result sets that it works. the task_id column which youve
labeled inside of jj does not
On Jun 6, 2007, at 12:49 PM, Eric Ongerth wrote:
Yeah. My problem has been solved by altering the tables...
skiboots.c.size is now skiboots.c.skiboot_size, and skis.c.size is now
skis.c.ski_size.
Is there a way I could avoid that, making use of the use_labels=True
parameter on select()?
Any reason why I can auth with psql and not the sqlachemy.dburi in
Pylons? I can see that the user, password, host, port are all passed
correctly. These are the same parameters I use with psql to connect.
I'm connecting from the same machine in both cases.
psql -U username -h ip address
Thanks for your responses, Mike.
--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to
43 matches
Mail list logo