sqlite

package
v0.1.60 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2026 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Overview

Package sqlite holds the dialect-generic SQL query provider and registers it under the "sqlite" key. A host that only needs SQLite-backed record stores enables it without the cloud providers:

import _ "github.com/flanksource/commons-db/query/providers/sqlite"

query/providers registers the remaining SQL keys (sql, postgres, mysql, sqlserver, clickhouse) through NewSQLProvider.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewSQLProvider

func NewSQLProvider(key, connType string) query.Provider

NewSQLProvider returns the SQL provider registered under key. connType presets the connection driver type; empty takes it from the request's options or connection.

Types

type SQLPageRequest

type SQLPageRequest struct {
	// Connection names the connection client is, for the SQL statement tap.
	Connection       string
	Query            string
	QueryArgs        []any
	QueryIdentifiers []string
	Filters          []query.ColumnFilterValue
	Order            query.Order
	Position         query.CursorPosition
	Page             query.PageRequest
	Diagnostics      *query.ProviderDiagnostics
}

type SQLPageResult

type SQLPageResult struct {
	Rows        []query.Row
	ColumnTypes []*sql.ColumnType
	Total       *query.Total
	HasMore     bool
}

func ReadSQLPage

func ReadSQLPage(ctx context.Context, client *sql.DB, driver string, request SQLPageRequest) (result SQLPageResult, err error)

Jump to

Keyboard shortcuts

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