All Samples(347) | Call(345) | Derive(0) | Import(2)
connect(database[, timeout, isolation_level, detect_types, factory]) Opens a connection to the SQLite database file *database*. You can use ":memory:" to open a database connection to a database that resides in RAM instead of on disk.
src/b/o/bots-HEAD/trunk/botsup/bots/botssqlite.py bots(Download)
def connect(database):
terug = sqlite.connect(database, factory=BotsConnection,detect_types=sqlite.PARSE_DECLTYPES, timeout=99.0, isolation_level='IMMEDIATE')
terug.execute('''PRAGMA synchronous=OFF''')
return terug
src/p/y/python-code-snippets-HEAD/CodeSnippets/PyDown/trunk/PyDown/database.py python-code-snippets(Download)
self.conn = WrappedConnection(
dbapi.connect(
host = host,
user = username,
passwd = password,
try:
self.conn = WrappedConnection(
dbapi.connect(self.databasename),
placeholder = self.placeholder,
prefix = self.tableprefix
src/p/y/pyspatialite-3.0.1/doc/includes/sqlite3/apsw_example.py pyspatialite(Download)
# Create pysqlite connection from APSW connection
con = sqlite3.connect(apsw_con)
result = con.execute("select times_two(15)").fetchone()[0]
assert result == 30
src/g/e/genropy-HEAD/gnrpy/gnr/sql/adapters/gnrsqlite.py genropy(Download)
def connect(self):
"""Return a new connection object: provides cursors accessible by col number or col name
@return: a new connection object"""
dbpath = self.dbroot.dbname
conn = pysqlite.connect(dbpath, detect_types=pysqlite.PARSE_DECLTYPES | pysqlite.PARSE_COLNAMES, timeout=20.0)
@param cursor: optional cursor object to use"""
if not os.path.isfile(filepath):
conn = pysqlite.connect(filepath)
conn.close()
if cursor:
@param encoding: database text encoding
"""
conn = pysqlite.connect(name)
conn.close()
src/w/i/winappdbg-1.4/examples/miscellaneous/memory_dump_example.py winappdbg(Download)
# Connect to the database and get a cursor
database = sqlite.connect(dbfile)
cursor = database.cursor()
src/e/u/EuroPython2006_PyQt4_Examples-1.0/Database Support/sqlcursorview.py EuroPython2006_PyQt4_Examples(Download)
view.setAlternatingRowColors(True)
conn = dbapi2.connect(":memory:")
query = conn.cursor()
query.execute("create table person(id int primary key, "
src/p/y/pyspatialite-3.0.1/doc/includes/sqlite3/converter_point.py pyspatialite(Download)
#########################
# 1) Using declared types
con = sqlite3.connect(":memory:", detect_types=sqlite3.PARSE_DECLTYPES)
cur = con.cursor()
cur.execute("create table test(p point)")
#######################
# 1) Using column names
con = sqlite3.connect(":memory:", detect_types=sqlite3.PARSE_COLNAMES)
cur = con.cursor()
cur.execute("create table test(p)")
src/g/a/gajim-HEAD/src/common/logger.py gajim(Download)
# before raise (hopefully should be enough) self.con = sqlite.connect(LOG_DB_FILE, timeout = 20.0, isolation_level = 'IMMEDIATE') os.chdir(back)
src/a/x/Axiom-0.6.0/axiom/_pysqlite2.py Axiom(Download)
def fromDatabaseName(cls, dbFilename, timeout=None, isolationLevel=None):
return cls(dbapi2.connect(dbFilename, timeout=0,
isolation_level=isolationLevel))
fromDatabaseName = classmethod(fromDatabaseName)
src/g/a/gajim-HEAD/src/history_manager.py gajim(Download)
self.AT_LEAST_ONE_DELETION_DONE = False self.con = sqlite.connect(LOG_DB_PATH, timeout = 20.0, isolation_level = 'IMMEDIATE') self.cur = self.con.cursor()
1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 Next