SystemComponent "datastores"

From Dataspects
C0137117334
Jump to: navigation, search


https://sqlite.org/cli.html

/home/datastore/data/datastore.db
sqlite3 datastore.db

sqlite> .tables
        .schema
        .headers on

Import rows from txt file[edit | edit source]

sqlite> CREATE table englishWords(word STRING);
        CREATE TEMP TABLE i(txt);
        .separator ~
        .import /home/lex/p51/home/Downloads/<FILE>.txt i
        INSERT INTO englishWords(word) SELECT txt FROM i;
        DROP TABLE i;

fileio extension[edit | edit source]

https://www.sqlite.org/loadext.html

sudo apt-get install libsqlite3-dev

Download fileio.c

gcc -g -fPIC -shared fileio.c -o fileio.so
sqlite> .load /home/lex/Downloads/fileio.so