salt.modules.inspectlib.fsdb#
- codeauthor:
Bo Maryniuk <bo@suse.de>
- class salt.modules.inspectlib.fsdb.CsvDB(path)#
File-based CSV database. This database is in-memory operating relatively small plain text csv files.
- close()#
Close the database.
- Returns:
- create_table_from_object(obj)#
Create a table from the object. NOTE: This method doesn't stores anything.
- Parameters:
obj --
- Returns:
- delete(obj, matches=None, mt=None, lt=None, eq=None)#
Delete object from the database.
- Parameters:
obj --
matches --
mt --
lt --
eq --
- Returns:
- flush(table)#
Flush table.
- Parameters:
table --
- Returns:
- get(obj, matches=None, mt=None, lt=None, eq=None)#
Get objects from the table.
- Parameters:
table_name --
matches -- Regexp.
mt -- More than.
lt -- Less than.
eq -- Equals.
- Returns:
- is_closed()#
Return if the database is closed.
- Returns:
- list()#
List all the databases on the given path.
- Returns:
- list_tables()#
Load existing tables and their descriptions.
- Returns:
- new()#
Create a new database and opens it.
- Returns:
- open(dbname=None)#
Open database from the path with the name or latest. If there are no yet databases, create a new implicitly.
- Returns:
- purge(dbid)#
Purge the database.
- Parameters:
dbid --
- Returns:
- store(obj, distinct=False)#
Store an object in the table.
- Parameters:
obj -- An object to store
distinct -- Store object only if there is none identical of such. If at least one field is different, store it.
- Returns:
- update(obj, matches=None, mt=None, lt=None, eq=None)#
Update object(s) in the database.
- Parameters:
obj --
matches --
mt --
lt --
eq --
- Returns:
- class salt.modules.inspectlib.fsdb.CsvDBEntity#
Serializable object for the table.