chsql

package
v1.2.2 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var QEscapeEncoder = &QueryEscapeEncoder{}

Functions

This section is empty.

Types

type BasicBuilder

type BasicBuilder struct {
	// contains filtered or unexported fields
}

func (*BasicBuilder) AddParam

func (b *BasicBuilder) AddParam(param ISqlQueryParam) ISqlQueryBuilder

func (*BasicBuilder) String

func (b *BasicBuilder) String() string

String skip the nil item

func (*BasicBuilder) WithSeparator

func (b *BasicBuilder) WithSeparator(s string) ISqlQueryBuilder

type BasicParam

type BasicParam struct {
	// contains filtered or unexported fields
}

func (*BasicParam) KeyEncoded

func (b *BasicParam) KeyEncoded(encoder IValueEncoder) ISqlQueryParam

func (*BasicParam) String

func (b *BasicParam) String() string

String if k or v or sep is empty string else contacts them

func (*BasicParam) ValueEncoded

func (b *BasicParam) ValueEncoded(encoder IValueEncoder) ISqlQueryParam

func (*BasicParam) WithKey

func (b *BasicParam) WithKey(s string) ISqlQueryParam

func (*BasicParam) WithSeparator

func (b *BasicParam) WithSeparator(s string) ISqlQueryParam

func (*BasicParam) WithValue

func (b *BasicParam) WithValue(s string) ISqlQueryParam

type ISqlQueryBuilder

type ISqlQueryBuilder interface {
	String() string
	WithSeparator(string) ISqlQueryBuilder
	AddParam(ISqlQueryParam) ISqlQueryBuilder
}

func NewBasicBuilder

func NewBasicBuilder() ISqlQueryBuilder

type ISqlQueryParam

type ISqlQueryParam interface {
	WithKey(string) ISqlQueryParam
	WithValue(string) ISqlQueryParam
	KeyEncoded(IValueEncoder) ISqlQueryParam
	ValueEncoded(IValueEncoder) ISqlQueryParam
	WithSeparator(string) ISqlQueryParam
	String() string
}

func NewBasicParam

func NewBasicParam() ISqlQueryParam

func NewBasicParamKV

func NewBasicParamKV(k, v string) ISqlQueryParam

type IValueEncoder

type IValueEncoder interface {
	Encode(string) string
}

type QueryEscapeEncoder

type QueryEscapeEncoder struct {
}

func (*QueryEscapeEncoder) Encode

func (b *QueryEscapeEncoder) Encode(s string) string

Jump to

Keyboard shortcuts

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