206 questions
0
votes
1
answer
69
views
Dataform fails to create external table intermittently
My sqlx file
config {
type: "operations",
tags: ["soma_deal_meta_audience_reporting_pipeline"]
}
${operations.createSessionizerTable("...
1
vote
1
answer
282
views
How to use postgis geography type with sqlx
I work with geospatial data and want to put it into a (postgres) database with the postgis plugin installed.
I know I need the geozero, geo and sqlx crate and also found an example here under PostGis ...
0
votes
0
answers
224
views
How can I access a static SQLite database as a resource in an Android Tauri 2 app?
I have made a Tauri 2.0 dictionary app, with Android as the target platform. It uses Vue.js on the front-end, with a sqlx connection to a static SQLite database file that contains all the words and ...
2
votes
2
answers
288
views
How do I get the current postgres sql or sqlx schema search path?
I am do ing a search on a post gres table and getting no records returned. The matching records are in the table I am searching. There is another table in aother schema where the data is not in any ...
1
vote
1
answer
49
views
SQLx does not see AtP placeholder
I get this error every time I try to run integration tests
sql: expected 0 arguments, got 1
However, when I run everything on the dev environment, everything works. Most likely the problem is in ...
5
votes
1
answer
7k
views
failed to parse certificate from server: x509: negative serial number
Have recently started to encountered this error when using testcontainers and specifically mssql images (have tried different image versions). This happens both locally when running on WSL, but also ...
1
vote
1
answer
134
views
Embedded struct with Go and sqlx
I am facing an error with NULL values comming from SQL DB.
Here is the schemas:
CREATE TABLE product (
id INT not null,
name text not null,
price int not null
);
INSERT INTO product (id, name, ...
1
vote
1
answer
110
views
How to use UNEST in sqlx posgres named query
I am trying to build a CTE where I want to pass values to the query, convert it a CTE table, and later use that in the subsequent part of the query.
Only CTE part is written below, as that is where ...
1
vote
1
answer
127
views
How to connect to H2 database through TCP using h2go package?
I have docker container with H2 database, I can connect to it using "Database" IDE feature, also can ping container host using DNS name inside my server container.
I'm using github.com/...
1
vote
1
answer
736
views
How can I ensure that a query gets killed if its context is canceled?
I recently learned that Go's mysql driver doesn't kill running queries on context cancelation. That's a problem because my application can generate long running queries that lock the database (which ...
1
vote
1
answer
2k
views
Using javascript to transform/manipulate data in google cloud dataform (sqlx)
im trying to use a javascript function to test if i can manipulate data in dataform from a query, however compilator says that "color" is not defined (one of the fields im trying to ...
1
vote
2
answers
472
views
How to scan returning struct with github.com/jmoiron/sqlx
How can I scan SQL returning values into a struct with github.com/jmoiron/sqlx?
I tried the following approach:
package main
import (
"log"
"github.com/jmoiron/sqlx"
...
2
votes
0
answers
883
views
Deserialize timestamp from postgres into google.protobuf.Timestamp with sqlx
I have a postgres table with a creation_time field defined like this:
creation_time timestamp with time zone not null default now(),
And I have a protobuf message defined like this:
message Thing {
...
1
vote
0
answers
405
views
Re-using prepared statements for Sqlite in Golang
I'm using sqlx and modernc.org/sqlite (https://pkg.go.dev/modernc.org/sqlite) to insert 500K rows in a Sqlite database.
The performance is already reasonable, execution time is below a minute; but I'm ...
1
vote
1
answer
859
views
Scan error on column index 8, name "replicated": unsupported Scan, storing driver.Value type []uint8 into type *[]*bool
I am using sqlx to select a PostgreSQL boolan[] into a Golang struct where the target struct value is a []*bool.
type App struct {
ApplicationID string `db:"application_id"`
Name ...