its a bind parameter, no quoting is required.
On Mar 2, 2007, at 9:26 AM, metaperl wrote:
>
> Yes Mike, thanks for the link. Am I to understand that SA does not
> figure out whether to quote the placeholder based on the type of the
> data?
>
> I was hoping if the data supplied was a string, that it would quote
> the data.
>
>
> On Mar 1, 3:30 pm, "Michael Bayer" <[EMAIL PROTECTED]> wrote:
>> text("select * from usersearches where searchschedule=:dayno",
>> engine=myengine).execute(dayno=5) ?
>>
>> that would be here:
>>
>> http://www.sqlalchemy.org/docs/
>> sqlconstruction.myt#sql_textual_textua...
>>
>> On Mar 1, 10:20 am, "metaperl" <[EMAIL PROTECTED]> wrote:
>>
>>> This would seem to be an easy obvious task, but searching both this
>>> newsgroup and the SQLAlchemy.org website do not turn up any docs on
>>> the process.
>>
>>> I want to get a result proxy for executing this SQL, in the
>>> processing
>>> binding the variable dayno to searchSchedule:
>>
>>> def load(sa, dayno):
>>> """take SQLALCHEMY_OBJECT and a day_number and return
>>> a RESULT_PROXY consisting of all records satisfying query"""
>>
>>> sql = """
>>> SELECT
>>> *
>>> FROM
>>> UserSearches
>>> WHERE
>>> searchSchedule = ?
>>> """
>>
>>> === call to create my SA object ===
>>
>>> from sqlalchemy import *
>>
>>> class sa(object):
>>
>>> def __init__(self, ip="4.12.18.4", db="DATA", engine_echo=True):
>>
>>> url = 'mssql://perl2:[EMAIL PROTECTED]:1433/%s' % (ip, db)
>>> print "Connection url", url
>>> self.engine = create_engine(url)
>>> self.engine.echo=engine_echo
>>> self.metadata = BoundMetaData(self.engine)
>
>
> >
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"sqlalchemy" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---