Documentation ¶
Overview ¶
Package query is inspired and partially copied from by github.com/cch123/elasticsql.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewConverterError ¶
Types ¶
type Converter ¶
type Converter struct {
// contains filtered or unexported fields
}
func NewConverter ¶
func NewConverter(fnInterceptor FieldNameInterceptor, fvInterceptor FieldValuesInterceptor) *Converter
func (*Converter) ConvertWhereOrderBy ¶
func (c *Converter) ConvertWhereOrderBy(whereOrderBy string) (*elastic.BoolQuery, []*elastic.FieldSort, error)
ConvertWhereOrderBy transforms WHERE SQL statement to Elasticsearch query. It also supports ORDER BY clause.
type ConverterError ¶
type ConverterError struct {
// contains filtered or unexported fields
}
func (*ConverterError) Error ¶
func (c *ConverterError) Error() string
type FieldNameInterceptor ¶
type FieldNameInterceptor interface {
Name(name string, usage FieldNameUsage) (string, error)
}
type FieldNameUsage ¶
type FieldNameUsage int
const ( FieldNameFilter FieldNameUsage = iota FieldNameSorter )
type FieldValuesInterceptor ¶
Click to show internal directories.
Click to hide internal directories.