diff options
author | michele.simionato <devnull@localhost> | 2008-11-10 14:10:47 +0000 |
---|---|---|
committer | michele.simionato <devnull@localhost> | 2008-11-10 14:10:47 +0000 |
commit | fe9e812c0f014b0160e58b5313ec17c367f008d6 (patch) | |
tree | 43f909756e047a2e28afa3154e93470296e99579 /sqlplain/tests/sqlplain_ex.py | |
parent | d50dc19e5cd137dc71c831e9440abe32c48d10a7 (diff) | |
download | micheles-fe9e812c0f014b0160e58b5313ec17c367f008d6.tar.gz |
Added support to generic qmark style for all drivers
Diffstat (limited to 'sqlplain/tests/sqlplain_ex.py')
-rw-r--r-- | sqlplain/tests/sqlplain_ex.py | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/sqlplain/tests/sqlplain_ex.py b/sqlplain/tests/sqlplain_ex.py new file mode 100644 index 0000000..ea76b0e --- /dev/null +++ b/sqlplain/tests/sqlplain_ex.py @@ -0,0 +1,24 @@ +from sqlplain import DB + +def test(autocommit): + db = DB('mssql://python:p1tone@192.168.0.129/srsdevbak', autocommit) + print db + print db.execute('select * from client') + print db.execute("update client set client='pippo' where 1=2") + + + db = DB('postgres://python:p1tone@localhost/rcare', autocommit) + print db + print db.execute('select * from customer') + print db.execute("update customer set client_id='pippo' where 1=2") + + db = DB('sqlite:///:memory:', autocommit) + print db + print db._raw_execute('create table prova (i integer)', (), None) + print db.execute("insert into prova values (1)") + print db.execute("select * from prova") + +if __name__ == '__main__': + test(autocommit=False) + test(autocommit=True) + |