Set default sql

This commit is contained in:
Spxg
2025-05-17 10:57:42 +08:00
parent ff7fd29fb8
commit 35c98329f3

View File

@@ -7,6 +7,8 @@ use serde::{Deserialize, Serialize};
use crate::{FragileComfirmed, SQLightError, SQLiteStatementResult, WorkerHandle};
const DEFAULT_CODE: &str = "SELECT 'Hello World!', datetime('now','localtime') AS current_time;";
#[derive(Store, Serialize, Deserialize)]
pub struct GlobalState {
vfs: Vfs,
@@ -40,7 +42,7 @@ impl Default for GlobalState {
fn default() -> Self {
Self {
editor_config: EditorConfig::default(),
code: String::new(),
code: DEFAULT_CODE.into(),
focus: None,
show_something: false,
orientation: Orientation::Automatic,