History Backend Sqlite – xonsh.history.sqlite
¶
Implements the xonsh history backend via sqlite3.
-
class
xonsh.history.sqlite.
SqliteHistory
(gc=True, filename=None, **kwargs)[source]¶ Xonsh history backend implemented with sqlite3.
-
append
(cmd)[source]¶ Append a command item into history.
Parameters: cmd: dict
This dict contains information about the command that is to be added to the history list. It should contain the keys
inp
,rtn
andts
. These key names mirror the same names defined as instance variables in theHistoryEntry
class.
-
-
class
xonsh.history.sqlite.
SqliteHistoryGC
(wait_for_shell=True, size=None, filename=None, *args, **kwargs)[source]¶ Shell history garbage collection.
Thread responsible for garbage collecting old history.
May wait for shell (and for xonshrc to have been loaded) to start work.
-
run
()[source]¶ Method representing the thread’s activity.
You may override this method in a subclass. The standard run() method invokes the callable object passed to the object’s constructor as the target argument, if any, with sequential and keyword arguments taken from the args and kwargs arguments, respectively.
-