salt.modules.sqlite3
Support for SQLite3
-
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.fetch(db=None, sql=None)
-
Show all indices in the database, for people with poor spelling skills
CLI Example:
salt '*' sqlite3.indexes /root/test.db
salt.modules.sqlite3.indexes(db=None)
-
Show all indices in the database
CLI Example:
salt '*' sqlite3.indices /root/test.db
salt.modules.sqlite3.indices(db=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.modify(db=None, sql=None)
-
Return version of sqlite
CLI Example:
salt '*' sqlite3.sqlite_version
salt.modules.sqlite3.sqlite_version()
-
Show all tables in the database
CLI Example:
salt '*' sqlite3.tables /root/test.db
salt.modules.sqlite3.tables(db=None)
-
Return version of pysqlite
CLI Example:
salt '*' sqlite3.version
salt.modules.sqlite3.version()
© 2021 SaltStack.
Licensed under the Apache License, Version 2.0.
https://docs.saltproject.io/en/latest/ref/modules/all/salt.modules.sqlite3.html