Re: [sqlalchemy] Getting a triple of related id fields

2023-06-21 Thread Dan Stromberg
On Tue, Jun 20, 2023 at 3:47 PM Mike Bayer wrote: > > > step 1 is stop using that silly Flask extension that gives you > "Pipeline.query", I can't tell what it is you want to SELECT from either by > reading this query. Wow, that made things a lot easier. Is there any reason to avoid mixing Mod

[sqlalchemy] Getting a triple of related id fields

2023-06-20 Thread Dan Stromberg
I've been banging on this for hours, but I seem to be getting nowhere. I've tried more things that I can count, but here are two of my attempts: # result = ( #Pipeline.query # .select_from(Storage, NewProduct) # .join(Storage, pipeline_alias1.storage_id == Storage.id) # .join(

[sqlalchemy] Turning a complex query into a view for SQLAlchemy?

2023-06-16 Thread Dan Stromberg
Hi. In https://pajhome.org.uk/blog/10_reasons_to_love_sqlalchemy.html it says: When performing highly complex queries, it is possible to define these with SQLAlchemy syntax. However, I find there's a certain level of complexity where it becomes easier to write SQL directly. In that case, you can

[sqlalchemy] subquery relationships?

2023-05-31 Thread Dan Stromberg
Hi folks. I have a subquery that is selected from a table with 5 foreign keys, and joined with another table with 3 foreign keys. And then that subquery is used in a join with the table having the 3 foreign keys again. I don't know how to tell what column(s) that join is happening on. What goes

[sqlalchemy] Interpreting a SA traceback

2023-05-24 Thread Dan Stromberg
I know, python2 is long dead. We’re almost ready for Python3, but not quite. Anyway, here’s a traceback that I’m not sure what to make of. Is it saying that a transaction got so big that it couldn’t be fully flushed within the timeout window? I’ve elided a sensitive part from the very end of th

Re: [sqlalchemy] Test query seems to spuriously give sqlalchemy.exc.OperationalError: (MySQLdb.OperationalError) (1054, "Unknown column 'tb_br.id' in 'on clause'")

2023-03-21 Thread 'Dan Stromberg [External]' via sqlalchemy
eliminate much of what the query is producing? From: 'Dan Stromberg [External]' via sqlalchemy Date: Tuesday, March 21, 2023 at 9:05 AM To: sqlalchemy@googlegroups.com Subject: Re: [sqlalchemy] Test query seems to spuriously give sqlalchemy.exc.OperationalError: (MySQLdb.OperationalEr

Re: [sqlalchemy] Test query seems to spuriously give sqlalchemy.exc.OperationalError: (MySQLdb.OperationalError) (1054, "Unknown column 'tb_br.id' in 'on clause'")

2023-03-21 Thread 'Dan Stromberg [External]' via sqlalchemy
Hoping to save an iteration: the SQL currently looks like: [SQL: SELECT tb_nv.id, min(bs_3.build_id) AS min_1 FROM tb_nv, tb_brst AS bs_3, tb_brst AS bs INNER JOIN tb_vers AS v_2 ON bs.version_id = v_2.id, tb_brst AS bs_2 INNER JOIN tb_br ON tb_br.id = bs_2.branch_id] From: 'Dan Stro

Re: [sqlalchemy] Test query seems to spuriously give sqlalchemy.exc.OperationalError: (MySQLdb.OperationalError) (1054, "Unknown column 'tb_br.id' in 'on clause'")

2023-03-21 Thread 'Dan Stromberg [External]' via sqlalchemy
:/docs.sqlalchemy.org/en/20/tutorial/data_select.html*explicit-from-clauses-and-joins__;Iw!!Ci6f514n9QsL8ck!gsSZYRslnIShc80D5SJP9hQv7FJkNL5Bzfvc8dkqobmEg8-ctkAcRyR1sZuv3pRL4eCzLvlJC-VDSf5sXXQNtX0d4POMpzTQh3-QUw$> On Mon, Mar 20, 2023, at 5:16 PM, 'Dan Stromberg [External]' via sqlalchemy

Re: [sqlalchemy] Test query seems to spuriously give sqlalchemy.exc.OperationalError: (MySQLdb.OperationalError) (1054, "Unknown column 'tb_br.id' in 'on clause'")

2023-03-20 Thread 'Dan Stromberg [External]' via sqlalchemy
Here’s the select, and most of the from clause: select nv.id, min(bs.build_id) as min_build_id from tb_v as v, tb_nv as nv, tb_bs as bs, tb_br as br, From: 'Dan Stromberg [External]' via sqlalchemy Date: Monday, March 20, 2023 at 2:16 PM To: sqlalchemy@googlegroups.com S

Re: [sqlalchemy] Test query seems to spuriously give sqlalchemy.exc.OperationalError: (MySQLdb.OperationalError) (1054, "Unknown column 'tb_br.id' in 'on clause'")

2023-03-20 Thread 'Dan Stromberg [External]' via sqlalchemy
? start with that. On Mon, Mar 20, 2023, at 10: 33 AM, 'Dan Stromberg [External]' via sqlalchemy wrote: That makes sense, but…. I’m afraid I don’t know how to add tb_br to the select. I tried: query = ( select(NV. id, what SQL are you going for ? start with that. On Mon, Mar 20, 202

Re: [sqlalchemy] Test query seems to spuriously give sqlalchemy.exc.OperationalError: (MySQLdb.OperationalError) (1054, "Unknown column 'tb_br.id' in 'on clause'")

2023-03-20 Thread 'Dan Stromberg [External]' via sqlalchemy
tb_br.id = bs_2.branch_id so you'd need to alter your query to include some indication how tb_br is part of what's being joined. On Fri, Mar 17, 2023, at 7:52 PM, 'Dan Stromberg' via sqlalchemy wrote: Hi people. I'm having trouble with a test query. As the subje

Re: [sqlalchemy] Test query seems to spuriously give sqlalchemy.exc.OperationalError: (MySQLdb.OperationalError) (1054, "Unknown column 'tb_br.id' in 'on clause'")

2023-03-17 Thread 'Dan Stromberg [External]' via sqlalchemy
Sorry, I don’t know why Google Groups decided to aggregate a few lines into 2 large lines. Here’s that list of versions again. Hopefully GG will be appeased this time. I'm using: $ python3 -m pip list -v | grep -i sqlalchemy Flask-SQLAlchemy 2.5.1 /data/home/dstromberg/.local

[sqlalchemy] Test query seems to spuriously give sqlalchemy.exc.OperationalError: (MySQLdb.OperationalError) (1054, "Unknown column 'tb_br.id' in 'on clause'")

2023-03-17 Thread 'Dan Stromberg' via sqlalchemy
Hi people. I'm having trouble with a test query. As the subject line says, I'm getting: sqlalchemy.exc.OperationalError: (MySQLdb.OperationalError) (1054, "Unknown column 'tb_br.id' in 'on clause'") But it seems like tb_br exists, and has an id column - tb_br being an empty table, but still,

[sqlalchemy] 'unique' exception not translated by sqlalchemy

2019-03-25 Thread dan . bar . dov
I'm trying to use UNIQUE on a column in a table, catching exception in order to determine conflict. Problem is that the exception I'm getting is sqlite3.IntegrityError. This is not a SqlAlchemy exception, and its a problem since sqlite is temporary. I expected to get a ORM/SA exception, that wil

[sqlalchemy] Re: How can I get the field names from an object?

2019-01-29 Thread dan . bar . dov
This is almost but not quite what I want. In your example, if the dictionary includes keys that do not map to object fields, it will throw. I want to try and 'cherry-pick' fields of the object from the dictionary. With the introspect you gave me I can do that. Thanks, Dan On Monday,

[sqlalchemy] Re: How can I get the field names from an object?

2019-01-29 Thread dan . bar . dov
) > > d1 = {'alias' : 'kitti'} > but load(Cat, d1) > is equivalent to cat = Cat(alias = 'kitti) > > Load will pick field names that exist in the passed Object, and have a > value in dict > > Thanks, > Dan > > -- SQLAlchemy - The Python

[sqlalchemy] How can I get the field names from an object?

2019-01-28 Thread dan . bar . dov
;) d1 = {'alias' : 'kitti'} but load(Cat, d1) is equivalent to cat = Cat(alias = 'kitti) Load will pick field names that exist in the passed Object, and have a value in dict Thanks, Dan -- SQLAlchemy - The Python SQL Toolkit and Object Relational Mapper htt

Re: [sqlalchemy] Error streaming results of query with 0 rowcount from Redshift

2017-09-06 Thread dan
It happens implicitly when iterating over the cursor to get the results. Here's an example using fetchmany: import psycopg2 from datetime import datetime conn_str = 'host=redshift_host port=redshift_port username=username password=password' query = 'SELECT * FROM test WHERE timestamp > %s' para

Re: [sqlalchemy] Error streaming results of query with 0 rowcount from Redshift

2017-09-06 Thread dan
Yes, it is a select query. I tried to re-create this just using psycopg2 and named cursors and didn't get an error so I thought it had to be somewhere in sqlalchemy import psycopg2 from datetime import datetime conn_str = 'host=redshift_host port=redshift_port username=username password=passwo

[sqlalchemy] Re: Error streaming results of query with 0 rowcount from Redshift

2017-09-06 Thread dan
Sorry, that code sample contained a typo. It should be: from sqlalchemy import create_engine engine = create_engine('postgres+psycopg2://username:password@ redshifthost:port/db_name') with engine.connect().execution_options(stream_results=True) as conn: results = conn.execute(query) data

[sqlalchemy] Error streaming results of query with 0 rowcount from Redshift

2017-09-06 Thread dan
I've run into an issue with Redshift and I thought I would post it here before logging a bug. If I run a query against a Redshift database table that happens to return 0 rows I get an error when I try to iterate over the result set. I run a pretty simple script that is looking for rows where a

Re: [sqlalchemy] Querying from MS SQL Server functions

2013-12-30 Thread Dan
ws up an error. a = alias(function_call, 'test') results = DBSession.query(Widget).join(a, Widget.id== a.c.widget_id).all() My code is pretty rough but it works. Thanks again Michael. --Dan On Monday, December 30, 2013 7:36:40 PM UTC-5, Michael Bayer wrote: > > > O

[sqlalchemy] Re: Querying from MS SQL Server functions

2013-12-30 Thread Dan
Nevermind about question 2. I really thought I was using parameters that would return something. Apparently not. However, question 2 still remains. --Dan On Monday, December 30, 2013 7:12:04 PM UTC-5, Dan wrote: > > Hello, > > I have been trying to find the appropriate syntax to

[sqlalchemy] Querying from MS SQL Server functions

2013-12-30 Thread Dan
the possiblity that the issue is within pyodbc I tried the following cnxn = pyodbc.connect('DRIVER={SQL Server};SERVER=10.0.0.555;DATABASE=yup;UID=user;PWD=pass') cursor = cnxn.cursor() cursor.execute("select * from some_user_defined_function('2013-12-29', NULL, '3

Re: [sqlalchemy] Re: problems with filter_by()

2013-06-15 Thread Dan Andreescu
http://docs.sqlalchemy.org/en/rel_0_8/orm/query.html#sqlalchemy.orm.query.Query.filter_by Docs are good but for the very lazy :) filter_by(name = 'Dan') or filter(User.name == 'Dan') > -- You received this message because you are subscribed to the Google Groups "sqlal

Re: [sqlalchemy] Extending SQL Alchemy core (0.7.x) with new Select type statement

2013-05-11 Thread Dan Farmer
**kw): # Generate the actual SQL expression Is there anything that needs to be done to actually tie those things together so that the query actually gets run when I use Unpivot or is that somehow "automagic?" Thanks for pointing me in the right direction, Dan -- You received this me

[sqlalchemy] Extending SQL Alchemy core (0.7.x) with new Select type statement

2013-05-10 Thread Dan Farmer
_0_7/core/compiler.html) Anyone have some tips on how to make the above do-able? An explanation for how to produce any kind of custom select statement (that could then be selected from) would be fine. Or if this isn't possible currently please let me know. Thanks, Dan -- You received this

Re: [sqlalchemy] Many to Many and Unique Object question

2013-04-24 Thread dan
Cool, that's what I wanted to know. I didn't want to miss some function that did this for me if it was there. Thanks alot for the help! Dan On Wednesday, April 24, 2013 1:42:39 PM UTC-4, Michael Bayer wrote: > > > On Apr 24, 2013, at 1:38 PM, dan > > wrote: > >

Re: [sqlalchemy] Many to Many and Unique Object question

2013-04-24 Thread dan
; but the expectation is that rows in this table will be unique. if you are > appending duplicate entries to "pestList" or "pesticide" you may want to > use collection_class=set to maintain uniqueness in the collection. > > > On Apr 24, 2013, at 12:51 PM, dan &g

[sqlalchemy] Many to Many and Unique Object question

2013-04-24 Thread dan
est to the pesticide done. I've looked at the Unique Object wiki, however I am not sure that solves my issue. Is there a way that SQLAlchemy can handle this, or do I need to manually build the entries in the PestToPesticide association table? Thanks! Dan PestToPesticide = Table(&#x

[sqlalchemy] SQLAlchemy Consultant needed

2012-08-30 Thread Dan Cardamore
...@qnx.com. Will welcome remote workers. Thanks, Dan -- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To view this discussion on the web visit https://groups.google.com/d/msg/sqlalchemy/-/4NPzACxaypsJ. To post to this group, send email to

[sqlalchemy] turn filtered query with subquery into relationship

2012-04-30 Thread dan
Dear List, Hoping for help with following unanswered stackoverflow question. If the approach is not the best, that feedback is good as well. In the case below is it better to just not use relationships and just use the method with the query? Thanks --

[sqlalchemy] Appending to an expired relationship list

2012-04-30 Thread Dan Callaghan
given that the list has been discarded? Could SQLAlchemy expire the relationship list without actually replacing the list instance? Then we wouldn't need to worry about whether we are accidentally holding onto references to expired lists which have been replaced out from underneath us.

[sqlalchemy] Single Table Inheritance with same Column Name

2011-05-27 Thread Dan Getelman
ot;. In this case, self.name is an sqlalchemy.orm.attributes.InstrumentedAttribute object. If I cast it to a string, getattr returns the data that I wanted. Is there a better way to do what I'm trying to do, or is this a bug in the code? Thanks, Dan -- You received this message because you are s

[sqlalchemy] Re: Exists/Correlate newbie question

2011-03-29 Thread dan
d also shouldn't be required at all since auto-correlation is > sufficient here. > > On Mar 28, 2011, at 12:23 PM, dan wrote: > > > Thanks for the feedback. I found an example in google groups that got > > me on the right track. > > > Fo

[sqlalchemy] Re: Exists/Correlate newbie question

2011-03-28 Thread dan
Thanks for the feedback. I found an example in google groups that got me on the right track. For those interested, my sqlalchemy looks like: multi_obs2 = aliased(multi_obs) subQ = qaqc.db.session.query(multi_obs2).\ filter(multi_obs2.m_date >=

[sqlalchemy] Exists/Correlate newbie question

2011-03-26 Thread dan
ensorId).\ filter(multi_obs.d_top_of_hour == 1).\ filter(exists(matchDatesQ)).\ order_by(multi_obs.m_date.asc()).all() however, I get errors in the matchesDateQ query about the "mo" not being defined. I understand why that is, I

[sqlalchemy] Re: Implementing fine-grained access control

2010-11-22 Thread Dan Ellis
Thanks for those tips. InstrumentationManager sounded like the best thing, so I've gone with that idea. Here's the basic structure of it for anyone who's interested: http://pastie.textmate.org/1318179 Thanks again, Michael. -- You received this message because you are subscribed to the Google Gr

[sqlalchemy] Re: Implementing fine-grained access control

2010-11-22 Thread Dan Ellis
On Nov 22, 11:15 am, Michael Bayer wrote: > I'm assuming the reason for "proxy objects" is so that usage would continue > to look like: >         blogpost.body = "new body" Right, exactly. > So for that kind of thing, if you want certain operations to proceed under > the "umbrella" of some co

[sqlalchemy] Implementing fine-grained access control

2010-11-22 Thread Dan Ellis
I'd like to find some way to implement access controls on mapped objects, with the following features: * Example: given a BlogPost object, only the owner, or a superuser, would be allowed to set fields such as title and body. * Example: reading the body field would check the privacy field as well

[sqlalchemy] Secialists question: how to do implement stock-management

2010-10-29 Thread Dan @ Austria
guess there is a lot of data comming in ... Thanks in advance, Dan -- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to sqlalch...@googlegroups.com. To unsubscribe from this group, send email to sqlalchem

[sqlalchemy] using funcs within a primary join

2010-09-30 Thread Dan
(credits.c.billing_code, 3, 25) == Reseller.resellerid) Any suggestions to make this happen? --Dan -- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to sqlalch...@googlegroups.com. To unsubscribe from this group,

[sqlalchemy] Re: Custom type does not seem to honour is_mutable

2010-08-13 Thread Dan
The issue appeared to be removing the session instance (session.remove()) - I was trying to get a clean session for testing. Anyway, works fine now - thanks for your help and sorry for wasting your time. On Aug 13, 4:21 pm, Dan wrote: > > that code snippet is not complete (doesn'

[sqlalchemy] Re: Custom type does not seem to honour is_mutable

2010-08-13 Thread Dan
> that code snippet is not complete (doesn't create a Session, doesn't add Post > to it, doesn't commit() or flush() the session but then removes it so I guess > maybe its a scoped_session, don't know) so I don't actually know what you're > doing.   The test case below adds your assertion, uses

[sqlalchemy] Re: Custom type does not seem to honour is_mutable

2010-08-13 Thread Dan
Unfortunately still getting the same result: http://paste.pocoo.org/show/249801/ The test snippet shows that the modified set is not actually saved to the database. On Aug 13, 3:29 pm, Michael Bayer wrote: > On Aug 13, 2010, at 10:24 AM, Dan wrote: > > > > > > > On

[sqlalchemy] Re: Custom type does not seem to honour is_mutable

2010-08-13 Thread Dan
On Aug 13, 3:17 pm, Michael Bayer wrote: > On Aug 13, 2010, at 10:01 AM, Dan wrote: > > > I have created a custom type in order to store denormalized PKs in a > > TEXT field. The idea is that the text is converted back and forth from > > a set of integers: > >

[sqlalchemy] Custom type does not seem to honour is_mutable

2010-08-13 Thread Dan
I have created a custom type in order to store denormalized PKs in a TEXT field. The idea is that the text is converted back and forth from a set of integers: http://paste.pocoo.org/show/249784/ This seems to work OK, however if you make a change to the set it's not picked up by SQLAlchemy on com

[sqlalchemy] SQL Alchemy for bigger enterprise application

2010-06-29 Thread Dan @ Austria
there any drawbacks to sqlalchemy? Are there any other big orm projects for python, which one should have a look at? Sorry for asking this kind of "general questions". But im looking for some decission hints ... Dan -- You received this message because you are subscribed to the Goo

[sqlalchemy] Re: Acting on creation of model instances

2010-05-27 Thread Dan Ellis
Thanks for your help. I'm not exactly sure what happened, so I'll have to carefully look over this area again, but part of it was definitely to do with needing the distinct session. Here's the minimal example I extracted: http://pastie.textmate.org/private/lpgkq7gkaypmgkphknr2w Frustratingly, the i

[sqlalchemy] Re: Acting on creation of model instances

2010-05-27 Thread Dan Ellis
On May 26, 2:17 pm, Michael Bayer wrote: > its in the identity map after the flush succeeds, which is well before > after_commit() is called.   That sounds reasonable, but I have debug output from after_attach, before_flush, after_flush, before_commit and after_commit, all of which show a sessi

[sqlalchemy] Re: Acting on creation of model instances

2010-05-26 Thread Dan Ellis
On May 26, 9:43 am, Michael Bayer wrote: > You can expire the attribute manually ahead of time if you want it to reload > its value (should be fine within after_commit). No, it seems that in after_commit the newly added instance is not yet in session.identity_map, so session.expire throws an exc

[sqlalchemy] Re: Acting on creation of model instances

2010-05-26 Thread Dan Ellis
On May 26, 9:43 am, Michael Bayer wrote: > but if after_commit() is called and after_flush() is not called, that means > nothing was flushed.   Right. So, for example, for a request that only does SELECTs, nothing will be flushed, but after the request, I still do session.commit(), because hasn

[sqlalchemy] Acting on creation of model instances

2010-05-26 Thread Dan Ellis
I've only found partial answers to this problem so far, so I'd like to expand on it here. I have a site in which users post stories, and their friends are notified. In order to decouple different parts of the business logic, I would like to use a publish/subscribe mechanism that raises an event fo

Re: [sqlalchemy] default value in multiple insert

2010-05-19 Thread Dan Kuebrich
Michael--thanks for your help. As you probably guessed, I'm still running 0.5. DEFAULT is, in fact, a valid MySQL keyword, though I didn't know about it before looking into this problem. On Wed, May 19, 2010 at 10:09 AM, Michael Bayer wrote: > > On May 18, 2010, at 10:06 PM, Da

Re: [sqlalchemy] default value in multiple insert

2010-05-18 Thread Dan Kuebrich
My apologies; I expressed my question rather incoherently. if the question is, I want to multiple insert like [{'a':1, 'b':2, 'c':3}, > {'a':2}, {'a':3, 'b':4}], etc. only some dictionaries are missing different > keys, that is not allowed. The structure of the SQL statement as parsed by > MySQL

[sqlalchemy] default value in multiple insert

2010-05-18 Thread Dan K
I found a similar thread from about a year ago (http:// groups.google.com/group/sqlalchemy/browse_thread/thread/ 66ef04fd10fd2be/ec7784b70abedabe), but it never seemed to answer the most burning question: is there a way in sqlalchemy to do a multiple insert with default values for unspecified colum

[sqlalchemy] Re: SQL Server 2008 geography type

2010-01-26 Thread dan
That fixed it :) and thank you Michael for your quick response to my questions. -- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to sqlalch...@googlegroups.com. To unsubscribe from this group, send email to sqlalc

[sqlalchemy] Re: SQL Server 2008 geography type

2010-01-26 Thread dan
I am having some problems using this approach. How should I use the class STAsText in the GisElement.wkt property (example below)? My current attempts are not working... it seems that the correct statement is generated "SELECT :param_1.STAsText()", but the Geography instance is not being passed as

[sqlalchemy] Re: SQL Server 2008 geography type

2010-01-24 Thread dan
Thank you Michael, that really helped a lot. -- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to sqlalch...@googlegroups.com. To unsubscribe from this group, send email to sqlalchemy+unsubscr...@googlegroups.com.

[sqlalchemy] Re: Tutorial program 'selectdemo.py'

2009-09-09 Thread Dan Presley
Thanks much! I couldn't find where that module is buried inside the documentation, hence my question. Best Regards, Dan Presley --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "sqlalchemy" group.

[sqlalchemy] Re: Why has "sum" been removed from sqlalchemy.orm.query.Query ?

2009-06-23 Thread Dan Jacob
That worked great, thanks for your help. 2009/6/23 Michael Bayer : > > Dan wrote: >> >> Using sqlalchemy version 0.5.2, I've noticed that the "sum" method >> seems to have been removed from Query : >> >> session.query(MyClass).sum(MyClas

[sqlalchemy] Why has "sum" been removed from sqlalchemy.orm.query.Query ?

2009-06-23 Thread Dan
Using sqlalchemy version 0.5.2, I've noticed that the "sum" method seems to have been removed from Query : session.query(MyClass).sum(MyClass.price) 'Query' object has no attribute 'sum' I can't find this change documented anywhere : it was present in 0.4 as I recall. Any reason for this ? --

[sqlalchemy] Re: How does query.get() work?

2009-03-31 Thread Dan F
hash so access > should be some constant factor. Then you can use the normal > query.get() to retrieve the ones that failed from the database. > > > This is really something I would advise against though. > > What exactly are you querying for? Why don't you just keep

[sqlalchemy] Re: How does query.get() work?

2009-03-25 Thread Dan F
not sure how get() works on databases that don't need primary > keys.  I'm guessing it won't.  Maybe it's in the docs. > > Hope that cleared things up. > > Regards, > Christian > > 2009/3/23 Dan F : > > > > > Hi, > > > Is there a d

[sqlalchemy] How does query.get() work?

2009-03-23 Thread Dan F
Hi, Is there a difference between using query.get(ident) and using query.filter(MyClass.id.in_())? Specifically with regard to how the mapper is used? If I'm right in my assumption, get() uses the map to avoid extra lookups, but I question whether the filter method is doing the same. If I'm co

[sqlalchemy] Re: any effort getting sqlalchemy to work on ironpython is going on ?

2008-09-13 Thread Dan Eloff
pretty sure it's an internal error in IronPython, but beats me as to where it's happening. You should try running it under the debugger. -Dan --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "sq

[sqlalchemy] Re: Result Set From An Oracle Function

2008-05-09 Thread Dan
Not sure how to do it otherwise. This is how its been coded -- what is the alternative? On May 9, 8:34 am, Michael Bayer <[EMAIL PROTECTED]> wrote: > On May 9, 2008, at 4:26 AM, Dan wrote: > > > > > > > Using cx_Oracle, the following does the trick (note t

[sqlalchemy] Re: Result Set From An Oracle Function

2008-05-09 Thread Dan
the cx_Orcale layer and call the above function passing in a raw_connection(); however, I get the following error: NotSupportedError: Variable_TypeByValue(): unhandled data type _CursorFairy Thx, Dan On May 8, 9:26 pm, Michael Bayer <[EMAIL PROTECTED]> wrote: > whats the raw SQL wh

[sqlalchemy] Result Set From An Oracle Function

2008-05-08 Thread Dan
procedure, function, package, or type is not allowed here 'SELECT * FROM aaa_test' {} How can I rework this? Dan --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To pos

[sqlalchemy] Re: Quoted Column Name Problem

2008-05-08 Thread Dan
That worked! Thank you for the quick response. On May 8, 5:25 pm, Michael Bayer <[EMAIL PROTECTED]> wrote: > On May 8, 2008, at 5:13 PM, Dan wrote: > > > > > > > I have an Oracle schema that has a column name labeled as > > 'when' (without the

[sqlalchemy] Quoted Column Name Problem

2008-05-08 Thread Dan
ove but it does not affect what is being sent to the database -- still a doubled quoted column name. Any ideas how to work around this without changing the underlying table definition in Oracle? Thanks, Dan --~--~-~--~~~---~--~~ You received this message because yo

[sqlalchemy] Re: ConcurrentModificationError without concurrent modification?

2007-10-01 Thread Dan Eloff
On 10/1/07, Michael Bayer <[EMAIL PROTECTED]> wrote: > > most likely too many association rows are present in the m2m table. > Do you mean there were redundant associations? How can I check if that's the cause of the pr

[sqlalchemy] ConcurrentModificationError without concurrent modification?

2007-10-01 Thread Dan Eloff
modification? Using sqlalchemy 0.4 beta 5, python 2.5, sqllite. dl has a many-to-many relationship associated with it. Any ideas why this is happening? Thanks, -Dan --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

[sqlalchemy] Re: 0.4 and server-side cursors

2007-09-27 Thread Dan Watson
d above, but it would probably require some significant work, since you'd have to transform SELECT statements into FETCH statements. anyway, thanks for the fix! On Sep 26, 8:01 pm, Michael Bayer <[EMAIL PROTECTED]> wrote: > On Sep 26, 2007, at 5:31 PM, Dan Watson wrote: > > >

[sqlalchemy] Re: 0.4 and server-side cursors

2007-09-26 Thread Dan Watson
sor.description available, and leave the SS cursor positioned before the first row. On Sep 26, 4:34 pm, Michael Bayer <[EMAIL PROTECTED]> wrote: > On Sep 26, 2007, at 3:52 PM, Dan Watson wrote: > > > > > > > It seems that something changed in 0.4 that causes server-si

[sqlalchemy] 0.4 and server-side cursors

2007-09-26 Thread Dan Watson
TCH FORWARD 64 FROM test_cur" ) for row in res: print row This results in a "InterfaceError: cursor already closed" exception when iterating over the resultproxy. Any ideas? Dan --~--~-~--~~~---~--~~ You received this message because you are s

[sqlalchemy] Re: backref relation is None instead of list?

2007-09-10 Thread Dan Eloff
like that, but when I got the errors I assumed it must not. Sorry for the false alarm, -Dan --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to sqlalchemy@g

[sqlalchemy] backref relation is None instead of list?

2007-09-09 Thread Dan Eloff
n sethasparent AttributeError: 'list' object has no attribute '_state' I want to be able to create the tree of Category() objects from the top down and set relations via _parent, but how can I do this? Thanks, -Dan --~--~-~--~~~---~--~~ You recei

[sqlalchemy] TypeError with 0.4 and python 2.3

2007-08-01 Thread Dan Watson
Right now, importing sqlalchemy on python 2.3 is broken. __name__ is readonly in 2.3, so the import fails: >>> from sqlalchemy import * Traceback (most recent call last): File "", line 1, in ? File "/home/watsond/python_packages/sqlalchemy/__init__.py", line 9, in ? from sqlalchemy.schema

[sqlalchemy] Re: sa newbie

2007-03-07 Thread Dan Trevino
thanks! On 3/6/07, Jonathan Ellis <[EMAIL PROTECTED]> wrote: > > > try > > db.books.select(db.books.c.book_skus.like('abcd%')) > > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to th

[sqlalchemy] sa newbie

2007-03-05 Thread dan
('abcd%')) but I'm getting an error, so obviously not. Pointers? tia, dan --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to sqlalchem