adding some sqlx stuff

This commit is contained in:
Chris Cochrun 2024-09-24 14:20:23 -05:00
parent 0a1800ad71
commit 6de638440f
16 changed files with 318 additions and 0 deletions

View file

@ -0,0 +1,12 @@
{
"db_name": "SQLite",
"query": "UPDATE songs SET verticalTextAlignment = ?",
"describe": {
"columns": [],
"parameters": {
"Right": 1
},
"nullable": []
},
"hash": "03d9706445455610fa20e5105996cff60667e0583b25c32bcdb835ff3516a386"
}

View file

@ -0,0 +1,12 @@
{
"db_name": "SQLite",
"query": "UPDATE songs SET title = ?",
"describe": {
"columns": [],
"parameters": {
"Right": 1
},
"nullable": []
},
"hash": "064f8f9fbcab0f1192865d505799080115f209f7c211fefdfa730cd95740a39c"
}

View file

@ -0,0 +1,12 @@
{
"db_name": "SQLite",
"query": "UPDATE songs SET author = ?",
"describe": {
"columns": [],
"parameters": {
"Right": 1
},
"nullable": []
},
"hash": "21f86a50febf92a8479b694df6199aa13275bf5d77cd509c6dfa8c58b563e58c"
}

View file

@ -0,0 +1,12 @@
{
"db_name": "SQLite",
"query": "UPDATE songs SET fontSize = ?",
"describe": {
"columns": [],
"parameters": {
"Right": 1
},
"nullable": []
},
"hash": "2f0d0e87173fc9885d6495bf53bb2d2498ab7a2dc6feb565b14ba3aa0858fba7"
}

View file

@ -0,0 +1,12 @@
{
"db_name": "SQLite",
"query": "delete from songs where id = ?",
"describe": {
"columns": [],
"parameters": {
"Right": 1
},
"nullable": []
},
"hash": "42f529d74842286221074730a5c75f12eacdf6fb1328aa6292e457c0d361fca0"
}

View file

@ -0,0 +1,12 @@
{
"db_name": "SQLite",
"query": "UPDATE songs SET lyrics = ?",
"describe": {
"columns": [],
"parameters": {
"Right": 1
},
"nullable": []
},
"hash": "644b32e47e3352a6496b13b7654bc082a4f8123da23181a0faa2d4d6da81f456"
}

View file

@ -0,0 +1,12 @@
{
"db_name": "SQLite",
"query": "UPDATE songs SET background = ?",
"describe": {
"columns": [],
"parameters": {
"Right": 1
},
"nullable": []
},
"hash": "72ca964fb7cf078231b89b03068ea8abdb4fd505441b2504145634c0d2d2d51d"
}

View file

@ -0,0 +1,12 @@
{
"db_name": "SQLite",
"query": "INSERT into songs (vorder, fontSize, backgroundType, horizontalTextAlignment, verticalTextAlignment, title, font, background, lyrics, ccli, author, audio, id) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)",
"describe": {
"columns": [],
"parameters": {
"Right": 13
},
"nullable": []
},
"hash": "7f6183cc2f81c8136b77561631eabb4daae801b811e91632b794a8ca45200793"
}

View file

@ -0,0 +1,12 @@
{
"db_name": "SQLite",
"query": "UPDATE songs SET horizontalTextAlignment = ?",
"describe": {
"columns": [],
"parameters": {
"Right": 1
},
"nullable": []
},
"hash": "8c52f75b92c0fd65e69e9ef142c4edcbb007968316410bb94e8e233cf08a3553"
}

View file

@ -0,0 +1,12 @@
{
"db_name": "SQLite",
"query": "UPDATE songs SET vorder = ?",
"describe": {
"columns": [],
"parameters": {
"Right": 1
},
"nullable": []
},
"hash": "b3c4641a31dd0bed71f9d90e53e22be3c4f9c61303ced7b7ab44e55c82882cab"
}

View file

@ -0,0 +1,12 @@
{
"db_name": "SQLite",
"query": "UPDATE songs SET font = ?",
"describe": {
"columns": [],
"parameters": {
"Right": 1
},
"nullable": []
},
"hash": "c2dd5c2e44dbed87fa415ac666778dc21e2894deb30f89d4eca01793871587b3"
}

View file

@ -0,0 +1,12 @@
{
"db_name": "SQLite",
"query": "UPDATE songs SET ccli = ?",
"describe": {
"columns": [],
"parameters": {
"Right": 1
},
"nullable": []
},
"hash": "d315bf0e1a07881776ea76a2463dee01e28108db6fe0be27fd8339a612c83c7c"
}

View file

@ -0,0 +1,12 @@
{
"db_name": "SQLite",
"query": "UPDATE songs SET backgroundType = ?",
"describe": {
"columns": [],
"parameters": {
"Right": 1
},
"nullable": []
},
"hash": "d6a937fa9c6d432e9d41b5cf845ab0059994f0ce3cd7c16f657aa9eb1e77e0bd"
}

View file

@ -0,0 +1,92 @@
{
"db_name": "SQLite",
"query": "SELECT vorder as \"verse_order!\", fontSize as \"font_size!: i32\", backgroundType as \"background_type!\", horizontalTextAlignment as \"horizontal_text_alignment!\", verticalTextAlignment as \"vertical_text_alignment!\", title as \"title!\", font as \"font!\", background as \"background!\", lyrics as \"lyrics!\", ccli as \"ccli!\", author as \"author!\", audio as \"audio!\", id as \"id: i32\" from songs",
"describe": {
"columns": [
{
"name": "verse_order!",
"ordinal": 0,
"type_info": "Text"
},
{
"name": "font_size!: i32",
"ordinal": 1,
"type_info": "Integer"
},
{
"name": "background_type!",
"ordinal": 2,
"type_info": "Text"
},
{
"name": "horizontal_text_alignment!",
"ordinal": 3,
"type_info": "Text"
},
{
"name": "vertical_text_alignment!",
"ordinal": 4,
"type_info": "Text"
},
{
"name": "title!",
"ordinal": 5,
"type_info": "Text"
},
{
"name": "font!",
"ordinal": 6,
"type_info": "Text"
},
{
"name": "background!",
"ordinal": 7,
"type_info": "Text"
},
{
"name": "lyrics!",
"ordinal": 8,
"type_info": "Text"
},
{
"name": "ccli!",
"ordinal": 9,
"type_info": "Text"
},
{
"name": "author!",
"ordinal": 10,
"type_info": "Text"
},
{
"name": "audio!",
"ordinal": 11,
"type_info": "Text"
},
{
"name": "id: i32",
"ordinal": 12,
"type_info": "Integer"
}
],
"parameters": {
"Right": 0
},
"nullable": [
true,
true,
true,
true,
true,
false,
true,
true,
true,
true,
true,
true,
false
]
},
"hash": "eafd47ac0c3f5952e63f446a9228ad06967a62831adbac9ed5727a80e3f8cca8"
}

View file

@ -0,0 +1,12 @@
{
"db_name": "SQLite",
"query": "UPDATE songs SET audio = ?",
"describe": {
"columns": [],
"parameters": {
"Right": 1
},
"nullable": []
},
"hash": "eb2a3334642b1144cb4db350fcaada342fa7bd6ed0dd39df26c3ef9e951d8d02"
}

View file

@ -0,0 +1,58 @@
CREATE TABLE IF NOT EXISTS 'songs' (
'id' INTEGER NOT NULL,
'title' TEXT NOT NULL,
'lyrics' TEXT,
'author' TEXT,
'ccli' TEXT,
'audio' TEXT,
'vorder' TEXT,
'background' TEXT,
'backgroundType' TEXT,
horizontalTextAlignment TEXT,
verticalTextAlignment TEXT,
font TEXT,
fontSize INTEGER,
PRIMARY KEY(id)
);
CREATE TABLE IF NOT EXISTS 'videos' (
'id' INTEGER NOT NULL,
'title' TEXT NOT NULL,
'filePath' TEXT NOT NULL,
startTime REAL,
endTime REAL,
loop BOOLEAN NOT NULL DEFAULT 0,
PRIMARY KEY(id)
);
CREATE TABLE IF NOT EXISTS 'images' (
'id' INTEGER NOT NULL,
'title' TEXT NOT NULL,
'filePath' TEXT NOT NULL,
PRIMARY KEY(id)
);
CREATE TABLE IF NOT EXISTS 'presentations' (
'id' INTEGER NOT NULL,
'title' TEXT NOT NULL,
'filePath' TEXT NOT NULL,
pageCount INTEGER DEFAULT 1,
html BOOLEAN NOT NULL DEFAULT 0,
PRIMARY KEY(id)
);
ALTER TABLE songs
RENAME COLUMN horizontalTextAlignment TO horizontal_text_alignment;
ALTER TABLE songs
RENAME COLUMN verticalTextAlignment TO vertical_text_alignment;
ALTER TABLE songs
RENAME COLUMN vorder TO verse_order;
ALTER TABLE songs
RENAME COLUMN backgroundType TO background_type;
ALTER TABLE songs
RENAME COLUMN fontSize TO font_size;