An open API service providing package, version and dependency metadata of many open source software ecosystems and registries.

Top 4.8% on proxy.golang.org
Top 2.5% dependent packages on proxy.golang.org
Top 4.7% dependent repos on proxy.golang.org
Top 7.8% forks on proxy.golang.org

proxy.golang.org : github.com/tailscale/sqlite

Package sqlite implements a database/sql driver for SQLite3. This driver requires a file: URI always be used to open a database. For details see https://sqlite.org/c3ref/open.html#urifilenames. If you want to do initial configuration of a connection, or enable tracing, use the Connector function: In-memory databases are popular for tests. Use the "memdb" VFS (*not* the legacy in-memory modes) to be compatible with the database/sql connection pool: Use a different dbname for each memory database opened. SQLite is flexible about type conversions, and so is this driver. Almost all "basic" Go types (int, float64, string) are accepted and directly mapped into SQLite, even if they are named Go types. The time.Time type is also accepted (described below). Values that implement encoding.TextMarshaler or json.Marshaler are stored in SQLite in their marshaled form. While SQLite3 has no strict time datatype, it does have a series of built-in functions that operate on timestamps that expect columns to be in one of many formats: https://sqlite.org/lang_datefunc.html When encoding a time.Time into one of SQLite's preferred formats, we use the shortest timestamp format that can accurately represent the time.Time. The supported formats are: If the time.Time is not UTC (strongly consider storing times in UTC!), we follow SQLite's norm of appending "[+-]HH:MM" to the above formats. It is common in SQLite to store "Unix time", seconds-since-epoch in an INTEGER column. This is understood by the date and time functions documented in the link above. If you want to do that, pass the result of time.Time.Unix to the driver. In general, time is hard to extract from SQLite as a time.Time. If a column is defined as DATE or DATETIME, then text data is parsed as TimeFormat and returned as a time.Time. Integer data is parsed as seconds since epoch and returned as a time.Time.

Registry - Source - Documentation - JSON
purl: pkg:golang/github.com/tailscale/sqlite
License: BSD-3-Clause
Latest release: over 1 year ago
First release: over 3 years ago
Namespace: github.com/tailscale
Dependent packages: 5
Dependent repositories: 1
Stars: 151 on GitHub
Forks: 6 on GitHub
See more repository details: repos.ecosyste.ms
Last synced: 30 days ago

    Loading...
    Readme
    Loading...