Julia, SQLite3
Hi! I have an SQLite3 database and want to get information from it into a string, not DataFrame.
# Connection to database
db = SQLite.DB(raw"pictures.sqlite")
# Creation of table
SQLite.execute(db, "DROP TABLE IF EXISTS Files")
SQLite.execute(db, "CREATE TABLE IF NOT EXISTS Files
(ID INTEGER PRIMARY KEY AUTOINCREMENT,
FullName TEXT,
creation_date TEXT,
change_date TEXT,
size INTEGER,
UNIQUE (ID))")
#Another code
#This is a way to add rows to database (it works)
DBInterface.execute(db,
"INSERT INTO Files (FullName, creation_date, change_date, size)
VALUES
('$fileName', '$cdate', '$mdate', '$fileSize')
")
#Then i am trying to get one row into a string
strq = SQLite.DBInterface.execute(db, "SELECT * FROM Files WHERE ID=3")
#I can't transfornm these to string
I'm writing on Julia and need help!!