mirror of
https://github.com/clearlinux/official-images.git
synced 2026-08-29 01:15:40 +00:00
13 lines
361 B
Python
13 lines
361 B
Python
import sqlite3
|
|
|
|
ver = sqlite3.sqlite_version
|
|
|
|
con = sqlite3.connect(':memory:', 1, sqlite3.PARSE_DECLTYPES, None)
|
|
cur = con.cursor()
|
|
cur.execute('CREATE TABLE test (id INT, txt TEXT)')
|
|
cur.execute('INSERT INTO test VALUES (?, ?)', (42, 'wut'))
|
|
cur.execute('SELECT * FROM test')
|
|
assert(cur.fetchall() == [(42, 'wut')])
|
|
cur.execute('DROP TABLE test')
|
|
con.close()
|