Skip to main content
Filter by
Sorted by
Tagged with
-1 votes
2 answers
105 views

With an SQLite database in Go I got: no such table: table_name I know where it is coming from but how can I use this error message in Go to create that table, like: _, err := getState(dbconn) // ...
guts_thakur's user avatar
0 votes
0 answers
245 views

sql.Register("sqlite3_with_extensions", &sqlite3.SQLiteDriver{ Extensions: []string{ "regex_match", }, }) I am working on loading an SQLite3 extension in Go, ...
User0987's user avatar
  • 184
1 vote
0 answers
243 views

I have an application structured more or less like the following : app api database db.go main.go data database data.db ui I would like to connect as a ...
LCaraway's user avatar
  • 1,357
1 vote
0 answers
73 views

Have written sqlite3 extension in cpp trying to load it from go lang,it works properly but it does not clean exist it gives exception. CPP code #include <regex> #include <string> #include &...
User0987's user avatar
  • 184
2 votes
0 answers
268 views

I recently upgraded the github.com/mattn/go-sqlite3 package in my Go project from version 1.14.16 to 1.14.20. Prior to the upgrade, the SQLite version reported by the sqlite_version() function was 3....
User0987's user avatar
  • 184
-1 votes
1 answer
476 views

What happened: After creating and starting a container group with one container, grafana/grafana:6.4.4, the container shuts down and goes into a reboot loop. I mounted one volume via Azure File Share ...
Taqi Rizvi's user avatar
1 vote
1 answer
3k views

I am working on a Bot. For this purposes I have decided to use the sqlite DB and GORM as ORM. Right now i am working on a simple "Connection" file, that should connect with sqlite db (which ...
NightBottle's user avatar
2 votes
1 answer
906 views

I am trying to use a prepared statement for querying a sqlite file. This worked fine before, but I change the code to make it more unit testable. To do this, I started using prepared statements. ...
Anthony Quinn's user avatar
1 vote
0 answers
103 views

I'm building a social media-like web app, but I'm having trouble displaying images on the frontend. For the realization I'm using openAPI , Golang for the backend, sqlte3 database, vue.js for the ...
fede14's user avatar
  • 11
1 vote
1 answer
402 views

This is my code I'm not sure what went wrong the value which is in the user is getting updated in the user table properly but the address struct value is not storing the data in the address table I ...
Yogi's user avatar
  • 21
1 vote
1 answer
2k views

package main import ( "database/sql" "fmt" "log" "os" _ "github.com/mattn/go-sqlite3" ) type Users struct { UserId, ...
marks's user avatar
  • 31
-1 votes
1 answer
2k views

I have this simple go file called main.go: package main import ( "fmt" "database/sql" _ "github.com/mattn/go-sqlite3" ) func main() { db, err := sql....
Ibrahim Sharaf's user avatar
2 votes
1 answer
819 views

I modified my app recently and found that tests started hanging. This the stripped down test code: package app_test ...
kargirwar's user avatar
  • 608
2 votes
1 answer
2k views

I want to import SQLite3 into my project: import ( "database/sql" _ "github.com/mattn/go-sqlite3" ) But I get this error: could not import github.com/mattn/go-sqlite3 (no ...
kasra rassi's user avatar
0 votes
0 answers
371 views

I have a piece of code that checks whether or not the requested key exists in the database. Its contents are therefore not important in that particular place. The best way I know how to check for it ...
vatuqemor's user avatar
2 votes
2 answers
2k views

I'm running a list of sql files. The list of files comes from the same sqlite3 db that I'm going to execute sql against, hence there's only one db connection. If I don't kill the loop over sql files ...
Darian Hickman's user avatar
3 votes
1 answer
424 views

The database I am using is a global variable, initialized reading the file sql-repo.db: const dbFile = "sql-repo.db" var globalDB *LocalDB type LocalDB struct { Path string ...
matthieu's user avatar
0 votes
1 answer
3k views

I have to make my database password protected as a task in my school. For example if anyone tries to access my database it will ask the password. I am trying to use go-sqlite3 package and I have tried ...
Kristofer Kangro's user avatar
0 votes
2 answers
455 views

In my go program I does this to initialize my sqlite3 schema: db.MustExec(`ATTACH DATABASE ":memory:" AS "mem"`) db.MustExec(`CREATE TABLE IF NOT EXISTS "mem.token" ( ...
xrfang's user avatar
  • 2,363
0 votes
0 answers
102 views

I am using SQLite3 from Go on a Jetson NX running Ubuntu 18.04. The performance appears to be very erratic. A query that takes a few ms most of the time can sometimes take upwards of 10 sec. top does ...
Pete 's user avatar
  • 1,313
1 vote
1 answer
2k views

I wish to compile for a raspberry pi from my windows machine (much faster). Everything works if I use this command: env GOOS=linux GOARCH=arm GOARM=5 go build src/*.go However, I am using go-sqlite3 ...
will.mendil's user avatar
  • 1,085
0 votes
0 answers
325 views

I am trying to construct a sql query with respect to optional query parameters from the endpoint. e.g. I have a url http://localhost/api?one=1 Now form the above url I need to construct query somthing ...
Hsn's user avatar
  • 1,238
1 vote
1 answer
2k views

In Go, I'm trying to pass an interface{} to the statement.Exec() function from go-sqlite3. I'm sure this is a solved problem, but I cannot figure it out. Basically I have a struct with the row data ...
will.mendil's user avatar
  • 1,085
5 votes
1 answer
3k views

I have created an SQL file that loads into sqlite3 and creates a bunch of tables for me. In that sql file, I attempt to enforce foreign_keys with the pragma: PRAGMA foreign_keys = on; -- also 1, true ...
Omortis's user avatar
  • 1,580
0 votes
1 answer
324 views

I have been trying to insert column list into table but unable to do so here is what i want to do Let say i have a list of column names column=["Email","Name","Salary"] ...
Nbbbb's user avatar
  • 1
0 votes
1 answer
960 views

I am creating a program for me and my friends small shop. I am using Python, Sqlite3, and Tkinter. I am able to display records from Sqlite3 through Tkinter but when I insert new records/data, it ...
Oliver Almonte's user avatar
0 votes
1 answer
477 views

I'm using Windows Server 2019 x64. Trying to leverage go-sqlcipher to manipulate sqlite database. But it always fails when I try to run the sample. # go run .\encrypto.go # github.com/xeodou/go-...
JasonS's user avatar
  • 455
1 vote
1 answer
553 views

I have a SQLite query which returns expected results in the shell. However, when I run the same query in my Go program, no values are scanned. Here is my query: sqlite> select html, text from ...
poundifdef's user avatar
  • 19.5k
2 votes
1 answer
899 views

I use go-sqlite3 and need to track changes another process makes to my database. For a Products table with name and id columns I want to get a notification after the name column has been changed. How ...
user11433445's user avatar
1 vote
0 answers
163 views

This is a small chat app. Here is the function: var msgsStatement *sql.Stmt func handleMessages() { for { msg := <-broadcast log.Println(msg) start := time.Now()....
mismaah's user avatar
  • 386
1 vote
1 answer
3k views

This question is the same as go-sqlite3 compiler arguments for cross compile OSX to linux, but since that one doesn't have an answer I'll try asking again. I have a Go package which uses the github....
Kurt Peek's user avatar
  • 58.5k
0 votes
1 answer
2k views

In the following example I use json_extract(...) using the go-sqlite3 driver in Golang. package main import ( _ "github.com/mattn/go-sqlite3" "github.com/jinzhu/gorm" _ "github.com/...
riccardo_92's user avatar
-1 votes
1 answer
962 views

I am trying to convert an err in Go to go-sqlite3.Error, but it fails always. Above image represents the snapshot of my debug windows, which shows that the err is of type go-sqlite3.Error I am using ...
Ashish Mittal's user avatar
4 votes
1 answer
8k views

In go, I open a sqlite3 database using the mattn/go-sqlite3 module. I set the database journalling mode to WAL immediately after opening using a PRAGMA journal_mode=WAL. However, if I try to open the ...
Steve Hanov's user avatar
  • 11.6k
0 votes
1 answer
445 views

I'm using sqlite3 in Go and for debugging purposes would like to see the result of applying arguments to the query with the replacements, i.e., with ? replaced by the actual argument. Is this possible?...
Eric '3ToedSloth''s user avatar
1 vote
1 answer
2k views

I am trying to load a huge data set from DB. func main() { db, err := sql.Open("mysql", "root:pass1@tcp(127.0.0.1:3306)/tuts") if err != nil { log.Print(err.Error()) ...
Suren Raju's user avatar
  • 3,070
1 vote
1 answer
369 views

The following is the code that is giving me problem. What i want to achieve is to create those many tables in parallel. After all the tables are created I want to exit the functions. func ...
pr0p's user avatar
  • 2,348
2 votes
1 answer
466 views

Setting: 1) SQLite3 database file gets uploaded to a fileserver 2) Files get stored into virtual filesystem 3) I want to execute sql queries on that database Currently I am using go-sqlite3 with a ...
Simon Frey's user avatar
  • 3,099
2 votes
2 answers
785 views

We're using gorm and I'd like to be able to specify database specific annotations. For convenience, in development/test we use an sqlite3 database, then MySQL in production. Unfortunately sqlite3 ...
Dan's user avatar
  • 1,012
3 votes
1 answer
11k views

I have a json field in a sqlite3 collection. My schema looks like: CREATE Table Animals( id int, sounds json, name string ) I understand the go-sqlite interface does not support the json ...
Mittenchops's user avatar