salt.modules.sqlite3¶
Support for SQLite3
-
salt.modules.sqlite3.
fetch
(db=None, sql=None)¶ Retrieve data from an sqlite3 db (returns all rows, be careful!)
CLI Example:
salt '*' sqlite3.fetch /root/test.db 'SELECT * FROM test;'
-
salt.modules.sqlite3.
indexes
(db=None)¶ Show all indices in the database, for people with poor spelling skills
CLI Example:
salt '*' sqlite3.indexes /root/test.db
-
salt.modules.sqlite3.
indices
(db=None)¶ Show all indices in the database
CLI Example:
salt '*' sqlite3.indices /root/test.db
-
salt.modules.sqlite3.
modify
(db=None, sql=None)¶ Issue an SQL query to sqlite3 (with no return data), usually used to modify the database in some way (insert, delete, create, etc)
CLI Example:
salt '*' sqlite3.modify /root/test.db 'CREATE TABLE test(id INT, testdata TEXT);'
-
salt.modules.sqlite3.
sqlite_version
()¶ Return version of sqlite
CLI Example:
salt '*' sqlite3.sqlite_version
-
salt.modules.sqlite3.
tables
(db=None)¶ Show all tables in the database
CLI Example:
salt '*' sqlite3.tables /root/test.db
-
salt.modules.sqlite3.
version
()¶ Return version of pysqlite
CLI Example:
salt '*' sqlite3.version