mattn / go-sqlite3

sqlite3 driver for go using database/sql
http://mattn.github.io/go-sqlite3
MIT License
8.05k stars 1.11k forks source link

enable geopoly #1255

Open jtarchie opened 4 months ago

jtarchie commented 4 months ago

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

rittneje commented 4 months ago

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

jtarchie commented 4 months ago

Is that an approval or a recommendation?

andyfusniak commented 1 month ago

Why not just set the flags yourself in your build?

CGO_CFLAGS="-DSQLITE_ENABLE_GEOPOLY" go build main.go
jtarchie commented 1 month ago

Just following the pattern of mattn go build flags.

mattn commented 1 month ago

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 commented 1 month ago

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

andyfusniak commented 1 month ago

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?