6.1.1.1.1.9. thyrsis.database.sqlite module

class thyrsis.database.sqlite.DbCon(conn_info, comment='')

Bases : object

Wrapper for sqlite connection

close()

Close the connection

Renvoie

success state

Type renvoyé

bool

commit()

Commit changes :return: success state :rtype: bool

cursor()

Return cursor of the connection

Renvoie

cursor

Type renvoyé

sqlite3.Cursor

execute(query)

Execute the query

Paramètres

query – sql query

Type

string

Renvoie

success state

Type renvoyé

bool

rollback()

Cancel changes

Renvoie

success state

Type renvoyé

bool

thyrsis.database.sqlite.connect(conn_info, comment='')

Create a sqlite connection

Paramètres
  • conn_info (string) – information to establish connection, path of the database

  • comment – comment

Renvoie

sqlite connection

Type renvoyé

DbCon