implement sqlite write queue
This commit is contained in:
@@ -24,7 +24,7 @@ type Root struct {
|
||||
}
|
||||
|
||||
func main() {
|
||||
dbPaths := []string{"test.db", "nkode.db"}
|
||||
dbPaths := []string{"/Users/donov/databases/test.db", "/Users/donov/databases/nkode.db"}
|
||||
outputStr := MakeSvgFiles()
|
||||
for _, path := range dbPaths {
|
||||
MakeTables(path)
|
||||
@@ -57,7 +57,7 @@ VALUES (?)
|
||||
}
|
||||
|
||||
func MakeSvgFiles() string {
|
||||
jsonFiles, err := GetAllFiles("./core//sqlite-init/json")
|
||||
jsonFiles, err := GetAllFiles("./core/sqlite-init/json")
|
||||
if err != nil {
|
||||
log.Fatalf("Error getting JSON files: %v", err)
|
||||
}
|
||||
@@ -146,7 +146,7 @@ func MakeTables(dbPath string) {
|
||||
PRAGMA journal_mode=WAL;
|
||||
--PRAGMA busy_timeout = 5000; -- Wait up to 5 seconds
|
||||
--PRAGMA synchronous = NORMAL; -- Reduce sync frequency for less locking
|
||||
--PRAGMA cache_size = -16000; -- Increase cache size (16MB)PRAGMA foreign_keys = ON;
|
||||
--PRAGMA cache_size = -16000; -- Increase cache size (16MB)PRAGMA
|
||||
|
||||
CREATE TABLE IF NOT EXISTS customer (
|
||||
id TEXT NOT NULL PRIMARY KEY,
|
||||
|
||||
Reference in New Issue
Block a user