[go-nuts] Re: Why doesn't the database/sql package in Go support using placeholders "?" to replace the database name and username in SQL statements?

2023-09-18 Thread Inada Naoki
Hi. I'm maintainer of go-mysql-driver. There is an option to substitute placeholders in the driver, instead of in the MySQL server. It can be used to: * Reduce roundtrip to execute a query * Avoid limitations of where placeholders can be used -- You received this message because you are subsc

Re: [go-nuts] semantics of panic stack traces

2023-09-18 Thread Ian Lance Taylor
On Sun, Sep 17, 2023 at 2:44 PM 'Dan Kortschak' via golang-nuts wrote: > > I'm trying to get my head around a panic stack trace from a user > report[1]. > > The parameter value make very little sense to me based on what they > should be from following the program logic. For example the {0x0?, 0x0,

[go-nuts] Re: possible bug in slog.Value json marshaling

2023-09-18 Thread Steven Pelley
filed https://github.com/golang/go/issues/62699 and expect any further discussion will happen there. On Monday, September 11, 2023 at 1:45:55 PM UTC-4 Jonathan Amsterdam wrote: > Hi Steve, > I'm not sure what the right answer is. Can you file this as a bug on > go.dev/issues? > > On Thursday, S

[go-nuts] Re: Why doesn't the database/sql package in Go support using placeholders "?" to replace the database name and username in SQL statements?

2023-09-18 Thread Brian Candler
Or else it's a prepared statement which gets invoked with parameters. Mysql's own documentation is unclear on where placeholders can be used: https://dev.mysql.com/doc/refman/8.0/en/sql-prepared-statements.html Note that they give this example: mysql> SET @table = 't1'; mysql> SET @s = CONCAT('

[go-nuts] Re: cannot find package "github.com/go-redis/redis/v8"

2023-09-18 Thread Brian Candler
You always need a go.mod file if you are importing other modules. But if you're not publishing your code, you can name your own module however you like: "go mod init example" is fine. On Monday, 18 September 2023 at 11:27:09 UTC+1 Aadi Sharma wrote: > I am using go-redis package and can not use

[go-nuts] Re: Why doesn't the database/sql package in Go support using placeholders "?" to replace the database name and username in SQL statements?

2023-09-18 Thread Vladimir Varankin
A thing, that it may be valuable to explain further, is that Go's "database/sql" doesn't come with a built-in query builder. The package implements the database connection pooling/management, but it passes the user's SQL input and its arguments to the "driver". Depending on the particular data

[go-nuts] cannot find package "github.com/go-redis/redis/v8"

2023-09-18 Thread Aadi Sharma
I am using go-redis package and can not use it's any version without mod file. Do golang does not allow us to use this package without mod file ? I use . github.com/go-redis/redis/v8 , go get github.com/go-redis/redis and github.com/go-redis/redis/v9 but with none of these three comands i w

[go-nuts] Re: JSON Compare

2023-09-18 Thread Corin Lawson
What makes you say the existing packages are not maintained? They may simply be complete? On Friday, 15 September 2023 at 5:05:10 am UTC+10 Sapna Jayavel wrote: > I am implementing a method find difference between two JSON objects and it > has to drill down recursively. My usecase has very lar