import sys import readline # Imported for its side-effects import traceback from pprint import pprint from axiom._pysqlite2 import Connection con = Connection.fromDatabaseName(sys.argv[1]) cur = con.cursor() while True: try: cur.execute(raw_input("SQL> ")) results = list(cur) if results: pprint(results) except: traceback.print_exc()
import sys import readline # Imported for its side-effects import traceback from pprint import pprint from axiom._pysqlite2 import Connection con = Connection.fromDatabaseName(sys.argv[1]) cur = con.cursor() while True: try: cur.execute(input("SQL> ")) results = list(cur) if results: pprint(results) except: traceback.print_exc()
def createRealConnection(self): """ Create a memory-backed connection for integration testing. """ return Connection.fromDatabaseName(":memory:")
def createAxiomConnection(self, underlyingConnection, *a, **kw): return Connection(underlyingConnection, *a, **kw)
from axiom._pysqlite2 import Connection con = Connection.fromDatabaseName("test.sqlite") cur = con.cursor()