db

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FromCSV

func FromCSV(b []byte, tableName string) (*sql.DB, string, error)

func FromJSON

func FromJSON(b []byte, tableName string) (*sql.DB, string, error)

func FromJSONL

func FromJSONL(b []byte, tableName string) (*sql.DB, string, error)

func GetColumnNames

func GetColumnNames(db *sql.DB, tableName string) ([]string, error)

func IsValidDB

func IsValidDB(fileName string) bool

check if the file is a valid sqlite db

func LoadFile

func LoadFile(fileName string) (*sql.DB, string, error)

func LoadStdin

func LoadStdin(bytes []byte) (*sql.DB, string, error)

load a sql file from bytes

func RowsToCSV

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

func RowsToJSON

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

func RowsToJSONL

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

func RowsToSQLite

func RowsToSQLite(rows *sql.Rows, tableName string, fileName string) error

func ToCSV

func ToCSV(db *sql.DB, tableName string) (string, error)

func ToJSON

func ToJSON(db *sql.DB, tableName string) (string, error)

func ToJSONL

func ToJSONL(db *sql.DB, tableName string) (string, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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