Re: [sqlalchemy] Text subquery column names in the results

2020-10-16 Thread Mike Bayer
On Fri, Oct 16, 2020, at 2:30 AM, Kotofos online wrote: > I'm working on raw SQL feature, and it has to support distinct and sort. > Instead of parsing and modifying user query, I'm wrapping it as subquery and > then do distinct and sort. > > ``` > user_query = 'select "FirstName", from "Custo

Re: [sqlalchemy] Text subquery column names in the results

2020-10-15 Thread Kotofos online
I'm working on raw SQL feature, and it has to support distinct and sort. Instead of parsing and modifying user query, I'm wrapping it as subquery and then do distinct and sort. ``` user_query = 'select "FirstName", from "Customer"' stmt = text(user_query) stmt = select('*').select_from(stmt.colu

Re: [sqlalchemy] Text subquery column names in the results

2020-10-15 Thread Mike Bayer
On Thu, Oct 15, 2020, at 2:52 AM, Kotofos online wrote: > > Hi, > Could you shed some light on what I might be doing incorrectly? I have this > text() SELECT * query on top of a one-column sub-query and in the result, I > am not getting that column name. > > ``` > stmt = text('select "FirstNa

[sqlalchemy] Text subquery column names in the results

2020-10-14 Thread Kotofos online
Hi, Could you shed some light on what I might be doing incorrectly? I have this text() SELECT * query on top of a one-column sub-query and in the result, I am not getting that column name. ``` stmt = text('select "FirstName", from "Customer"') stmt = select('*').select_from(stmt.columns().alias

Re: [sqlalchemy] Text column not populating on object correctly

2013-01-16 Thread jgruber
I complete ripped up my code.. Working back through an argument to __init__ the object which inherits from my data model.. DUH! Thanks.. found it. You were create =None killed it.. John On Wednesday, January 16, 2013 10:56:44 PM UTC-6, Michael Bayer wrote: > > > On Jan 16, 2013, at 11:42 PM,

Re: [sqlalchemy] Text column not populating on object correctly

2013-01-16 Thread Michael Bayer
On Jan 16, 2013, at 11:42 PM, jgruber wrote: > I'm using SQLAlchemy 7.8 with sqlite3. > > I have a Column setup in my schema of type Text, defined as follows: > > marker_data = Column(Text(length=None, convert_unicode=False, > assert_unicode=None), nullable=False, unique=True) > > I creat

[sqlalchemy] Text column not populating on object correctly

2013-01-16 Thread jgruber
I'm using SQLAlchemy 7.8 with sqlite3. I have a Column setup in my schema of type Text, defined as follows: marker_data = Column(Text(length=None, convert_unicode=False, assert_unicode=None), nullable=False, unique=True) I create my object and I see the SQL generated just fine. I have an

[sqlalchemy] Text vs. PGText possible bug

2009-09-24 Thread David Gardner
Ran across something that I suspect might be a bug. If I define my table like: asset_table = Table('asset', metadata, Column('path', Text, primary_key=True, server_default=FetchedValue(), server_onupdate=FetchedValue()), autol

[sqlalchemy] text binding for sql queries

2009-02-13 Thread Max Ischenko
I get an error when I'm trying tu run this: stmt = text("""select * from salary_data_new where codeword=:codeword union select * from salary_data_clean where codeword=:codeword """) # s is instance of Session() class factory

[sqlalchemy] text() TextClauses and like literals

2008-09-17 Thread Mark Mitchell
I'm having an issue I'm curious if anyone else has come across. When I use a like SQL expression within a text() clause, I receive the following exception: ... [my app code] ... File '/usr/lib/python2.5/site-packages/SQLAlchemy-0.5.0rc1-py2.5.egg/ sqlalchemy/engine/base.py', line 838 in scalar

[sqlalchemy] text() clause not selected

2008-07-08 Thread Julien Cigar
Hello, Any idea why with the following code http://pastebin.com/f6d20e657 when I do the q_specimen.join(q_measurements).select() at then end all the fields from specimen_fields are selected _except_ the text(specimen_url) column ? The SQLAlchemy generated SQL can be found on http://pastebin.com/

[sqlalchemy] text

2008-06-11 Thread jack2318
I tried very simple test: s = text("SELECT COUNT(*) FROM table WHERE field LIKE 'something'") count = conn.execute(s).fetchone() and this produced error Unexpected error: not enough arguments for format string not big deal there is few way around but just for completeness I believe it should w

[sqlalchemy] TEXT Column type

2007-08-30 Thread voltron
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