db

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2025 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DuckdbSafeMigration string
View Source
var DuckdbUpMigration string
View Source
var DuckdbViewsMigration string

Functions

func RowsToCSV

func RowsToCSV(rows *sql.Rows) (string, error)

RowsToCSV converts sql.Rows rows to a CSV string.

func RunMigration

func RunMigration(conn *sql.DB) error

RunMigration executes the migration string on the DuckDB connection. Returns an error, if any.

func RunSafeMode

func RunSafeMode(conn *sql.DB) error

RunSafeMode locks the database down with the DuckdbSafeMigration. Returns an error, if any

func String

func String(str string) string

String internally quotes a string for use in a SQL query.

Types

type MigrationInfo

type MigrationInfo struct {
	HomeDir string
}

MigrationInfo holds data to be injected by our migration template

Jump to

Keyboard shortcuts

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