sqlitetime

package
v0.23.0-beta.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 9, 2026 License: Apache-2.0, BSD-3-Clause, MIT Imports: 3 Imported by: 0

Documentation

Overview

Package sqlitetime holds the text forms of a time in a SQLite column, which keyset and searchexec share. SQLite has no time type: a time column holds text and compares as text, so a literal must have the text form of the stored values.

Index

Constants

View Source
const DriverLayout = "2006-01-02 15:04:05.999999999-07:00"

DriverLayout is the text form in which the SQLite driver writes a time.Time.

Variables

This section is empty.

Functions

func CheckLayout

func CheckLayout(owner, layout string)

CheckLayout panics when layout does not sort in time order. The layout must start with "2006-01-02 15:04:05" or "2006-01-02T15:04:05". owner names the caller in the message. A layout comes from code, never from a request.

func Step

func Step(layout string) time.Duration

Step is the smallest time that layout writes: one second, or the unit of its last fraction digit ("05.000" and "05.999" write a millisecond). CheckLayout must accept layout.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL