/usr/share/bauble/plugins/imex/sqlite.py is in bauble 0.9.7-2.1build1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | #
# sqlite.py
#
# Description: handle importing and exporting data into a SQLite database using
# SQLite native import commands
#
# TODO: get the data from an XML export and use and XSL transform to transform
# the data into a format that SQLite understands
# use .separator, .import
def import_csv(connection, filename, table, delimiter=','):
'''
'''
# CRAP: this isn't supported from 3.0 onward
connection.execute('COPY %s FROM %s USING DELIMITERS %s' % \
(table.name, filename, delimiter))
|