示例#1
0
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()
示例#2
0
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()
示例#3
0
 def createRealConnection(self):
     """
     Create a memory-backed connection for integration testing.
     """
     return Connection.fromDatabaseName(":memory:")
示例#4
0
 def createAxiomConnection(self, underlyingConnection, *a, **kw):
     return Connection(underlyingConnection, *a, **kw)
示例#5
0
 def createRealConnection(self):
     """
     Create a memory-backed connection for integration testing.
     """
     return Connection.fromDatabaseName(":memory:")
示例#6
0
from axiom._pysqlite2 import Connection

con = Connection.fromDatabaseName("test.sqlite")
cur = con.cursor()