SystemComponent "datastores"

From dataspects::Wiki
Jump to navigation Jump to search

sqlite3 datastore.db

sqlite> .tables
        .headers on

Import rows from txt file

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

sudo apt-get install libsqlite3-dev

Download fileio.c

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