Exports data as a SQLite database file using the stdlib sqlite3 module.
Creates a single table with all columns typed as VARCHAR and inserts rows via executemany. The table name defaults to "exported_data" but can be customised by setting self.table_name before calling WriteHeader. The database connection is opened on OpenFile and committed/closed on CloseFile.
sqlite3 (Python stdlib, no external dependency)from ObjDataExportSqlite import ObjExportApi
exporter = ObjExportApi()
exporter.table_name = "customers"
exporter.OpenFile("/tmp/output.sqlite")
exporter.WriteHeader(["Name", "Score"])
exporter.WriteData([["Alice", "95"], ["Bob", "82"]])
exporter.CloseFile()
| Method | Description |
|---|---|
OpenFile(filename) |
Open SQLite connection to file |
WriteHeader(fields) |
Store columns and CREATE TABLE |
WriteData(data) |
INSERT rows with redaction applied |
CloseFile() |
COMMIT and close connection |
EscapeCSV(val) |
No-op passthrough |
DefaultExtension() |
Returns "sqlite" |