From 76dc7b8af4ebcd99f3e551c6e1e06a73836e3c5e Mon Sep 17 00:00:00 2001 From: Spxg Date: Sun, 18 May 2025 17:12:02 +0800 Subject: [PATCH] Update default sql statement --- src/app/state.rs | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/src/app/state.rs b/src/app/state.rs index 569a314..f8c6cde 100644 --- a/src/app/state.rs +++ b/src/app/state.rs @@ -9,10 +9,21 @@ use web_sys::MediaQueryList; use crate::{FragileComfirmed, SQLightError, SQLiteStatementResult, WorkerHandle}; -const DEFAULT_CODE: &str = "SELECT 'Hello World!', +const DEFAULT_CODE: &str = "PRAGMA page_size=4096; + +CREATE TABLE IF NOT EXISTS blobs ( + id INTEGER PRIMARY KEY, + data BLOB +); + +INSERT INTO blobs(data) VALUES (randomblob(12)); + +SELECT 'Hello World!', datetime('now','localtime') AS TM, x'73716c69676874' AS BLOB_VAL, - NULL as NULL_VAL;"; + NULL as NULL_VAL; + +SELECT * FROM blobs;"; #[derive(Store, Serialize, Deserialize)] pub struct GlobalState {