go-sqlite3 icon indicating copy to clipboard operation
go-sqlite3 copied to clipboard

enable geopoly

Open jtarchie opened this issue 1 year ago • 7 comments

Sqlite in standard amalgamation there is geopoly. It requires the DSQLITE_ENABLE_GEOPOLY=1 compile time option. Would you accept a PR for this?

jtarchie avatar Jul 04 '24 01:07 jtarchie

Seems reasonable as an opt-in via a sqlite_geopoly build tag.

rittneje avatar Jul 04 '24 21:07 rittneje

Is that an approval or a recommendation?

jtarchie avatar Jul 09 '24 14:07 jtarchie

Why not just set the flags yourself in your build?

CGO_CFLAGS="-DSQLITE_ENABLE_GEOPOLY" go build main.go

andyfusniak avatar Oct 26 '24 14:10 andyfusniak

Just following the pattern of mattn go build flags.

jtarchie avatar Oct 27 '24 16:10 jtarchie

Activation by tag of a feature can add useful Go functions for that feature. For example, some tags not only add “-D” but also provide a useful interface or functions. If you want CGO_CFLAGS, I won't reject it, but it won't provide that useful functions.

mattn avatar Oct 27 '24 16:10 mattn

There is currently no geo-related interface in go-sqlite3, but it is possible that one may be added in the future.

mattn avatar Oct 27 '24 16:10 mattn

As some tags only add "-D" wouldn't it be more consistent to add the tags covering all remaining SQLite features (even if they currently don't yet support a richer abstraction, as some do)?

Currently the only way to get Geopoly or Sessions enabled is to pass the environment variables down through the build?

andyfusniak avatar Oct 27 '24 17:10 andyfusniak