[sqlalchemy] Re: Parameters not handled correctly with adodbapi

2007-02-15 Thread Arnar Birgisson
Thanks Rick, The SA table definitions were using Unicode so I changed those to String. I also make sure that the parameter in question is being sent as a str object and not unicode. Same result in both cases, SQL Server is only receiving the first character and the type is still detected as

[sqlalchemy] Re: Help get Wikipedia entry through review

2007-02-15 Thread Paul Johnston
Hi, Well, more than improving the quality of the article, we need to make a case for it being notable. The main criteria for this is: Software is notable if it has been the subject of multiple non-trivial published works whose source is independent of the software's author(s). So, can we pick

[sqlalchemy] Re: Help get Wikipedia entry through review

2007-02-15 Thread lele
On Thu, 15 Feb 2007 10:59:31 +, Paul Johnston [EMAIL PROTECTED] wrote: Can someone think of a second? Mailman? ciao, lele. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups sqlalchemy group. To post to

[sqlalchemy] Re: Help get Wikipedia entry through review

2007-02-15 Thread Marco Mariani
Paul Johnston wrote: Hi, Well, more than improving the quality of the article, we need to make a case for it being notable. The main criteria for this is: Software is notable if it has been the subject of multiple non-trivial published works whose source is independent of the software's

[sqlalchemy] Re: Help get Wikipedia entry through review

2007-02-15 Thread Paul Johnston
Ok, I have put a justification of notability on the talk page and contacted the person who added the tag. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups sqlalchemy group. To post to this group, send email to

[sqlalchemy] Re: query on table-inheritance, self-referencing mappers

2007-02-15 Thread svilen
can i make the mapper.someproperty.get_join() to return aliased version somehow? maybe copy the mapper? taking a look, i think what you should do is use an alias of the table_Employee in your queries. since the engineer mapper is using joined table inheritance, the default table_Employee is

[sqlalchemy] Re: query on table-inheritance, self-referencing mappers

2007-02-15 Thread svilen
and, how u make the (3) or (4) work? aliasing the table.column in the comparison does not help.. it should be aliased somehow inside the join also.. Here a simpler case, without the inheritance. 3 and 4 do not work here too - one does exception, other return nothing. maybe express the query

[sqlalchemy] sqlalchemy and securtiy

2007-02-15 Thread dischdennis
Hi there, I am currently writing my thesis and using sqlalchemy as mapper. I did not find anything security related in the docu. Maybe can you give me some examples how sql alchemy supports security? For example I think it prevents SQLInjection. Dennis

[sqlalchemy] Re: sqlalchemy and securtiy

2007-02-15 Thread Paul Johnston
Hi, An ORM does not have many security responsibilities - most of these are either in the application on top, or the underlying database. You rightly point out that sqlalchemy does effectively prevent SQL injection - by using bind parameters internally. Paul On 2/15/07, dischdennis [EMAIL

[sqlalchemy] Re: query on table-inheritance, self-referencing mappers

2007-02-15 Thread Michael Bayer
havent pored through any of these, but keep in mind you dont need to use the query building feature at all. you can send your own full- blown SQL if you have a better idea of what query should be used for a particular case (using either query.instances() or by sending a full select() construct

[sqlalchemy] Re: sqlalchemy and securtiy

2007-02-15 Thread Michael Bayer
pretty much. we use bind parameters for everything literal. also we dont spit out the DB passwords in error messages. not sure if you turn on connection pool logging if some of the DBAPIs put the passwords in the __repr__ for their connection objects, thats something that could be tested. On

[sqlalchemy] Re: Help get Wikipedia entry through review

2007-02-15 Thread Michael Bayer
yah we're in the mailman trunk :). also in use on some production websites like Foxmarks. On Feb 15, 7:06 am, Paul Johnston [EMAIL PROTECTED] wrote: Ok, I have put a justification of notability on the talk page and contacted the person who added the tag.

[sqlalchemy] Re: Adding a BLOB column to my Oracle database breaks my app

2007-02-15 Thread shday
This fixed the problem. I guess the 4k limit on the BLOB size will still force me to store my files outside the database for now. I need to store mostly Word and Excel files... which tend to be a tad longer than 4k, even when they're empty! Steve On Feb 15, 10:17 am, Michael Bayer [EMAIL

[sqlalchemy] Re: query on table-inheritance, self-referencing mappers

2007-02-15 Thread Michael Bayer
On Feb 15, 2007, at 10:41 AM, svilen wrote: heh, i don't have a vague idea what it should be. because you dont want to learn SQL. but if youre really trying to write a one-person system on the scale of complexity of SAP, which usually have...i dunno, several hundred developers for many

[sqlalchemy] Re: query on table-inheritance, self-referencing mappers

2007-02-15 Thread svilen
heh, i don't have a vague idea what it should be. because you dont want to learn SQL. but if youre really trying to write a one-person system on the scale of complexity of SAP, which usually have...i dunno, several hundred developers for many years ? i think youre gonna have to. learning

[sqlalchemy] Re: query on table-inheritance, self-referencing mappers

2007-02-15 Thread svilen
no, wrong, there's more to it; each level's parent.table should be the previous level's aliased table... i think i managed to construct a proper thing, changing PropertyLoader.get_join(), and made my own join_via(): --~--~-~--~~~---~--~~ You received this

[sqlalchemy] Re: query on table-inheritance, self-referencing mappers

2007-02-15 Thread svilen
Here, no need to touch Property.get_join(), only a new join_via(): def join_via( keys, mapper): clause = None c = None self_select_table = None for key in keys: prop = mapper.props[key] try: c = prop.get_join() #SA rev2285 except

[sqlalchemy] MS-SQL - default schema for engine does not generate useable SQL for SELECT

2007-02-15 Thread metaperl
Ok, the following lines of SA/Python: # the constructor sets # sa.engine.dialect.set_default_schema_name('DataTables') # full code below sa = data.config.db.sqlalchemy(schema=DataTables, echo=True) # leaving off schema='DataTables' generates invalid SQL ke_contracts = Table('KEContracts',

[sqlalchemy] Re: Adding a BLOB column to my Oracle database breaks my app

2007-02-15 Thread shday
With rev. 2321 of oracle.py I'm getting the error below when I do the following: sr = session.query(StudyRequest).selectfirst(study_request_table.c.study_request_id == request_id) With 3.4 I don't get and error. Note that I'm only using oracle.py from the trunk, everything else is 3.4

[sqlalchemy] Re: MS-SQL - default schema for engine does not generate useable SQL for SELECT

2007-02-15 Thread Rick Morrison
Are you using svn trunk? There were some updates to schema support in MSSQL recently. Rick On 2/15/07, metaperl [EMAIL PROTECTED] wrote: Ok, the following lines of SA/Python: # the constructor sets # sa.engine.dialect.set_default_schema_name('DataTables') # full code below sa =

[sqlalchemy] Re: MS-SQL - default schema for engine does not generate useable SQL for SELECT

2007-02-15 Thread Paul Johnston
Hi, That looks like a bug to me. As Rick suggested, first try with the latest svn version. If it's still broken (I expect it will be), create a minimal test case and file a bug on the tracker. You've got an obvious workaround of specifying the schema on your tables. Actually, I'm not quite

[sqlalchemy] MS-SQL column of bit datatype... what to provide?

2007-02-15 Thread metaperl
In my MS SQL 2005 database schema, the field RRates is a bit field. I have tried to supply False, both as a string and a Python boolean and neither seems to create an acceptable SQL insert statement. dat = dict( RRates= 0, # 0, 0, False, False all dont work )

[sqlalchemy] Re: query on table-inheritance, self-referencing mappers

2007-02-15 Thread sdobrev
final, ok for indirect recursion too . ## import sqlalchemy def join_via( keys, mapper): '''Query.join_via, input root mapper, return last mapper/table; alias and link properly recursive /self-referential joins ''' clause = None c = None self_table = None

[sqlalchemy] Re: PostGreSQL Referential Integrity with composed primary key

2007-02-15 Thread dischdennis
Sorry, I placed the testcase here: http://groups.google.de/group/sqlalchemy/web/testcase_dischdennis_Postgre.py I could not find a way to upload it with the message directly. Dennis --~--~-~--~~~---~--~~ You received this message because you are subscribed to

[sqlalchemy] Re: MS-SQL column of bit datatype... what to provide?

2007-02-15 Thread Rick Morrison
Bit == Boolean for MS-SQL, so use True/False. I have tested bit fields with pymssql inserts/updates/deletes and they work fine. If you're using adodbapi, perhaps someone else on the list can try a quick test, as I don't have a working adodbapi setup right now. Rick On 2/15/07, metaperl [EMAIL

[sqlalchemy] Re: Adding a BLOB column to my Oracle database breaks my app

2007-02-15 Thread Michael Bayer
On Feb 15, 2007, at 12:21 PM, shday wrote: With rev. 2321 of oracle.py I'm getting the error below when I do the following: sr = session.query(StudyRequest).selectfirst (study_request_table.c.study_request_id == request_id) With 3.4 I don't get and error. Note that I'm only using

[sqlalchemy] Re: PostGreSQL Referential Integrity with composed primary key

2007-02-15 Thread Gary Bernhardt
The pr_PurchaseRequisition_has_CELLS_budget_has_CELLS_costCenter table is the one that's causing your problem. It has a foreign key to CELLS_budget_has_CELLS_costCenter.CELLS_budget_ID (and another to CELLS_costCenter_ID on the same table). Neither of those two columns are unique. If you add

[sqlalchemy] MS-SQL - generated UPDATE sql yields The multi-part identifier KEContracts.refnum could not be bound.

2007-02-15 Thread metaperl
It's that MS-SQL weenie metaperl back at ya with another problem with the latest svn SA: The multi-part identifier KEContracts.refnum could not be bound. Bottom line is that there WHERE part of the SQL looks like this: WHERE [KEContracts].refnum = %(KEContracts_refnum)s and it is a fact that

[sqlalchemy] Re: PostGreSQL Referential Integrity with composed primary key

2007-02-15 Thread Gary Bernhardt
On 2/15/07, dischdennis [EMAIL PROTECTED] wrote: Thats the problem. I know that it is possible to add unique = True for each column. But then it is not possible to assign combinations of budget / cost centers like (1,1)(1,2)(1,3)...etc... So I would like to define both primary keys, the

[sqlalchemy] Re: Announcing Elixir!

2007-02-15 Thread Jonathan LaCour
Jonathan Ellis wrote: Is there a what's new and improved in Elixir document anywhere? Well, its pretty much entirely new and improved over TurboEntity and ActiveMapper, in that it provides a totally different way of doing things. The extensive documentation and examples on the website will

[sqlalchemy] Re: query on table-inheritance, self-referencing mappers

2007-02-15 Thread Michael Bayer
yeah...this is totally fine for you to use, but i dont want to change SA to this, particularly becuase it forces a change to the return signature of join_via...it makes an arbitrary alias, and returns three objects back to you which now you have to use in the criterion, trust me nobody's

[sqlalchemy] Re: Announcing Elixir!

2007-02-15 Thread Michael Bayer
i hear if you mix Elixir in your SQLSoup it explodes. On Feb 15, 2007, at 3:28 PM, Jonathan LaCour wrote: Jonathan Ellis wrote: Is there a what's new and improved in Elixir document anywhere? Well, its pretty much entirely new and improved over TurboEntity and ActiveMapper, in that it

[sqlalchemy] Re: Announcing Elixir!

2007-02-15 Thread Jonathan Ellis
For instance, I remember reading somewhere that AM wasn't very good at playing well with the rest of SA when AM wasn't enough, so I never bothered looking at AM very hard. I don't see anything on the elixir site about this issue, but maybe I am looking in the wrong place. On 2/15/07, Jonathan

[sqlalchemy] Re: Announcing Elixir!

2007-02-15 Thread Jonathan LaCour
Jonathan Ellis wrote: For instance, I remember reading somewhere that AM wasn't very good at playing well with the rest of SA when AM wasn't enough, so I never bothered looking at AM very hard. I don't see anything on the elixir site about this issue, but maybe I am looking in the wrong

[sqlalchemy] Re: Announcing Elixir!

2007-02-15 Thread Karl Guertin
On 2/15/07, Jonathan Ellis [EMAIL PROTECTED] wrote: For instance, I remember reading somewhere that AM wasn't very good at playing well with the rest of SA when AM wasn't enough, so I never bothered looking at AM very hard. I don't see anything on the elixir site about this issue, but maybe