Exemple #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()
Exemple #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()
Exemple #3
0
 def createRealConnection(self):
     """
     Create a memory-backed connection for integration testing.
     """
     return Connection.fromDatabaseName(":memory:")
Exemple #4
0
 def createRealConnection(self):
     """
     Create a memory-backed connection for integration testing.
     """
     return Connection.fromDatabaseName(":memory:")
Exemple #5
0
from axiom._pysqlite2 import Connection

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