infrastructure

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package infrastructure manage sqly infrastructure logic.

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrNoRows is same as sql.ErrNoRows
	ErrNoRows = errors.New("execute query, however return no records")
	// ErrNoLabel is error when label not found during LTSV parsing
	ErrNoLabel = errors.New("no labels in the data")
)

Functions

func GenerateCreateTableStatement

func GenerateCreateTableStatement(t *model.Table) string

GenerateCreateTableStatement returns create table statement. e.g. CREATE TABLE `table_name` (`column1` INTEGER, `column2` TEXT, ...);

func GenerateInsertStatement

func GenerateInsertStatement(name string, record model.Record) string

GenerateInsertStatement returns insert statement. e.g. INSERT INTO `table_name` VALUES ('value1', 'value2', ...);

func Quote

func Quote(s string) string

Quote returns quoted string.

func SingleQuote

func SingleQuote(s string) string

SingleQuote returns single quoted string.

Types

This section is empty.

Directories

Path Synopsis
Package memory handle sqlite3 in memory mode
Package memory handle sqlite3 in memory mode
Package mock is a generated GoMock package.
Package mock is a generated GoMock package.
Package persistence handle sqlite3, csv
Package persistence handle sqlite3, csv

Jump to

Keyboard shortcuts

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