Like Prometheus, but for logs.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
loki/vendor/zombiezen.com/go/sqlite
Sandeep Sukhani 5b33e65bcd
feat: add support for using sqlite for storing delete requests (#16437)
1 year ago
..
sqlitex feat: add support for using sqlite for storing delete requests (#16437) 1 year ago
.envrc feat: add support for using sqlite for storing delete requests (#16437) 1 year ago
.gitignore feat: add support for using sqlite for storing delete requests (#16437) 1 year ago
CHANGELOG.md feat: add support for using sqlite for storing delete requests (#16437) 1 year ago
CODE_OF_CONDUCT.md feat: add support for using sqlite for storing delete requests (#16437) 1 year ago
CONTRIBUTING.md feat: add support for using sqlite for storing delete requests (#16437) 1 year ago
LICENSE feat: add support for using sqlite for storing delete requests (#16437) 1 year ago
README.md feat: add support for using sqlite for storing delete requests (#16437) 1 year ago
auth.go feat: add support for using sqlite for storing delete requests (#16437) 1 year ago
backup.go feat: add support for using sqlite for storing delete requests (#16437) 1 year ago
blob.go feat: add support for using sqlite for storing delete requests (#16437) 1 year ago
blocking_step.go feat: add support for using sqlite for storing delete requests (#16437) 1 year ago
doc.go feat: add support for using sqlite for storing delete requests (#16437) 1 year ago
flake.lock feat: add support for using sqlite for storing delete requests (#16437) 1 year ago
flake.nix feat: add support for using sqlite for storing delete requests (#16437) 1 year ago
func.go feat: add support for using sqlite for storing delete requests (#16437) 1 year ago
index_constraint.go feat: add support for using sqlite for storing delete requests (#16437) 1 year ago
op_type.go feat: add support for using sqlite for storing delete requests (#16437) 1 year ago
openflags.go feat: add support for using sqlite for storing delete requests (#16437) 1 year ago
result.go feat: add support for using sqlite for storing delete requests (#16437) 1 year ago
session.go feat: add support for using sqlite for storing delete requests (#16437) 1 year ago
sqlite.go feat: add support for using sqlite for storing delete requests (#16437) 1 year ago
vtable.go feat: add support for using sqlite for storing delete requests (#16437) 1 year ago

README.md

zombiezen.com/go/sqlite

Go Reference

This package provides a low-level Go interface to SQLite 3. It is a fork of crawshaw.io/sqlite that uses modernc.org/sqlite, a CGo-free SQLite package. It aims to be a mostly drop-in replacement for crawshaw.io/sqlite.

This package deliberately does not provide a database/sql driver. See David Crawshaw's rationale for an in-depth explanation. If you want to use database/sql with SQLite without CGo, use modernc.org/sqlite directly.

Features

Install

go get zombiezen.com/go/sqlite

While this library does not use CGo, make sure that you are building for one of the supported architectures.

Getting Started

import (
  "fmt"

  "zombiezen.com/go/sqlite"
  "zombiezen.com/go/sqlite/sqlitex"
)

// ...

// Open an in-memory database.
conn, err := sqlite.OpenConn(":memory:", sqlite.OpenReadWrite)
if err != nil {
  return err
}
defer conn.Close()

// Execute a query.
err = sqlitex.ExecuteTransient(conn, "SELECT 'hello, world';", &sqlitex.ExecOptions{
  ResultFunc: func(stmt *sqlite.Stmt) error {
    fmt.Println(stmt.ColumnText(0))
    return nil
  },
})
if err != nil {
  return err
}

If you're creating a new application, see the package examples or the reference docs.

If you're looking to switch existing code that uses crawshaw.io/sqlite, take a look at the migration docs.

License

ISC