quote

package
v1.0.45 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2021 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package quote provides sqlite quoting functions for strings and identifiers

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DoubleQuote

func DoubleQuote(value string) string

DoubleQuote puts double quotes around a string and escapes existing double quotes

func IsReservedWord

func IsReservedWord(k string) bool

IsReservedWord returns true if the given string is a reserved word

func IsType

func IsType(k string) bool

IsType returns true if the given string is a sqlite type

func Quote

func Quote(value string) string

Quote puts single quotes around a string and escapes existing single quotes

func QuoteDeclType

func QuoteDeclType(v string) string

QuoteDeclType returns a supported type or quotes type TEXT => TEXT TIMESTAMP => TIMESTAMP some other type => "some other type"

func QuoteIdentifier

func QuoteIdentifier(v string) string

QuoteIdentifier returns a safe version of an identifier

func QuoteIdentifiers

func QuoteIdentifiers(v ...string) string

QuoteIdentifiers returns a safe version of a list of identifiers, separated by commas

func ReservedWords

func ReservedWords() []string

ReservedWords returns a list of reserved words

func Types

func Types() []string

Types returns a list of sqlite types

Types

This section is empty.

Jump to

Keyboard shortcuts

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