From Porcupine wiki

Developers: HowToExecuteAnOQLQueryOnTheServerSide

The following code snippet demonstrates how to execute an OQL command on the server side, inside the "execute" method of a HTTPServlet?:

from porcupine.oql.command import OqlCommand
oCmd = OqlCommand()
sOql = "select id, displayName, icon from 'apps' order by displayName asc"
apps = oCmd.execute(sOql)
for app in apps:
	self.response.write('App Name: ' + app['displayName'] + '<br>')
	self.response.write('App icon: ' + app['icon'] + '<br>)
Retrieved from
Page last modified on November 28, 2005, at 10:45 PM