toyz.utils.db_interfaces package¶
Submodules¶
toyz.utils.db_interfaces.sqlite_interface module¶
Database interface to sqlite
- toyz.utils.db_interfaces.sqlite_interface.check_user_type(param_type, params)¶
Set the user_type to either user_id or group_id depending on which parameter is contained in params
- toyz.utils.db_interfaces.sqlite_interface.create_toyz_database(db_settings)¶
Creates a new toyz database with all of the necessary tables needed.
See toyz.utils.db for more info.
- toyz.utils.db_interfaces.sqlite_interface.delete_param(db_settings, param_type, wildcards=False, **params)¶
Delete a parameter entry from the database. See toyz.utils.db for more info.
- toyz.utils.db_interfaces.sqlite_interface.get_all_ids(db_settings, user_type)¶
Get all user_ids or group_ids depending on user_type.
See toyz.utils.db for more info.
- toyz.utils.db_interfaces.sqlite_interface.get_param(db_settings, param_type, wildcards=False, **params)¶
Get a parameter from the database. See toyz.utils.db for more info.
- toyz.utils.db_interfaces.sqlite_interface.get_path_info(db_settings, path)¶
Get all of the users and permissions for a given path.
See toyz.utils.db for more info.
- toyz.utils.db_interfaces.sqlite_interface.get_table_names(db_settings)¶
Get a list of all tables in the database. This is not a required part of the API but can be very useful for debugging purposes.
- Parameters
- db_settings (*object( ): Database settings
- Returns
- tables (list): List of table names in the current database
- toyz.utils.db_interfaces.sqlite_interface.init(**params)¶
Because some databases might need to have their connections initialized, every database interface is require to have an init function, even if it is empty, that is called when the application is first opened
- toyz.utils.db_interfaces.sqlite_interface.update_all_params(db_settings, param_type, **params)¶
Update all parameters. See toyz.utils.db for more info.
- toyz.utils.db_interfaces.sqlite_interface.update_param(db_settings, param_type, **params)¶
Update a parameter. See toyz.utils.db for more info.
Module contents¶
Common non-package specific utility functions