modulepackage
0.0.0-20240627190206-ae42224afe11
Repository: https://github.com/bjbigler/database.git
Documentation: pkg.go.dev
# Functions
Connect returns a database connection.
FloatToInt64ForStorage ...
GetNullBool ...
GetNullDecimal ...
GetNullFloat64 returns sqlutils.NullFloat64 with the supplied value.
GetNullInt64 returns sqlutils.NullInt64 with the supplied value.
GetNullString ...
GetNullTime ...
New ...
NewKey generates a new key to serve as primary.
PrepWhere uses a slice of Filter to create a where clause.
Sqlize escapes a string for SQL.
StructFromForm populates a struct (ptr, a *pointer*) with http.Request.Form valuesusing as keys either "db" or "form" struct tags (e.g., `db:"sql_field_name"` or `form:"customName"`).The "form" tag overrides "db".HTML input / select / textarea / etc.
ToInt64ForStorage multiplies the input number by precisionand returns an int64 for Datastore persist.
# Type aliases
NullBool is an alias for sql.NullBool data type.
NullFloat64 is an alias for sql.NullFloat64 data type.
NullInt64 is an alias for sql.NullInt64 data type.
NullString is an alias for sql.NullString data type.