OpenObject Query Parser
Project description
Parsers OpenObjectes queries like:
import pyscopg2
from oopgrade.oopgrade import get_foreign_keys
from ooquery import OOQuery
conn = psycopg2.connect("dbname=test user=postgres")
with conn.cursor() as cursor:
def fk_function(table):
return get_foreign_keys(cursor, table)
q = OOQuery('account_invoice', fk_function)
sql = q.select(['number', 'state']).where([
('state', '=', 'open'),
('partner_id.name', '=', 'Pepito')
])
cursor.execute(*sql)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
ooquery-0.5.0.tar.gz
(2.8 kB
view hashes)