"""SQL column type definitions, including conversion rules from / to Python types."""from__future__importannotationsimportosfromenumimportEnumfromtypingimportIterable,TypeVar,Generic,cast
[docs]classSqlInt(SqlType[int,int]):""" Class to represent Python integers in SQLite table SQLite supports up to 64-bit signed integers (-2**63 < int < 2**63 - 1) """
[docs]classSqlLargeInt(SqlType[int,str]):"""Class to represent large integers > 64bit in SQLite table Integers are stored as text in the database and converted on read / write. """
[docs]classSqlPath(SqlType[str,bytes]):""" Class to represent Python paths in SQLite table Paths are stored as bytes in the database to handle characters in the path which cannot be decoded in the reported file system encoding. On the Python side, paths will contain surrogate escapes in place of such characters. """