return document_table.select(where, \
order_by=[sqlalchemy.desc(document_table.columns.last_viewed)])
How do I obtain either results one at a time, like an SQL cursor (looping through "Give me the first result I haven't seen")? The impression I got from the documentation was that there was an array-like syntax*, but Python was not responding positively to my treating it as an array:
Traceback (most recent call last):
File "/server1/users/jonathan/creations/inventions/software/insight/alchemy", line 5807, in ?
multitasking.start_oracle()
File "/server1/users/jonathan/creations/inventions/software/insight/alchemy", line 3474, in start_oracle
self.run_oracle()
File "/server1/users/jonathan/creations/inventions/software/insight/alchemy", line 3435, in run_oracle
self.handle_oracle_query(newsocket, address)
File "/server1/users/jonathan/creations/inventions/software/insight/alchemy", line 3382, in handle_oracle_query
generate_output()
File "/server1/users/jonathan/creations/inventions/software/insight/alchemy", line 5122, in generate_output
current_frame.display()
File "/server1/users/jonathan/creations/inventions/software/insight/alchemy", line 2776, in display
build_output_for_appropriate_search_results()
File "/server1/users/jonathan/creations/inventions/software/insight/alchemy", line 4635, in build_output_for_appropriate_search_results
current_result = search_results[index]
TypeError: unindexable object
* I was looking at, in the docs, the example for the Basic Data Mapping synopsis:
# class definition
class User(object ):
pass
# create a mapper
usermapper = mapper( User, users)
# select
sqluser = usermapper .select_by(user_name='fred' )[0]
# modify
user.user_name = 'fred jones'
# commit - saves everything that changed
sqlobjectstore.commit()
--
++ Jonathan Hayward, [EMAIL PROTECTED]
** To see an award-winning website with stories, essays, artwork,
** games, and a four-dimensional maze, why not visit my home page?
** All of this is waiting for you at http://JonathansCorner.com
** If you'd like a Google Mail (gmail.com) account, please tell me!