Execute sqlite3 “dot” commands from Python or register collation in command line utility

前端 未结 6 1145
轮回少年
轮回少年 2021-02-07 01:34

My sqlite3 database contains a \"collate\" column-constraint. I\'ve placed it in the schema for the table, to prevent accidentally neglecting to use the necessary collation. How

6条回答
  •  无人及你
    2021-02-07 02:03

    You can load new collating sequences and functions using load_extension() built-in SQLite function or .load command in command line shell for SQLite. Obviously, extensions shold be written in C.

    And you can not call dot-commands from python, because dot-commands are specific to the command line shell tool.

提交回复
热议问题