odatasql

package
v0.7.2 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

nolint:perfsprint

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildCountQuery

func BuildCountQuery(sqlVariant jsonsql.Variant, schemaMetas map[string]SchemaMeta, schema string, filterString *string) (string, error)

nolint:cyclop

func BuildSQLQuery

func BuildSQLQuery(sqlVariant jsonsql.Variant, schemaMetas map[string]SchemaMeta, schema string, filterString, selectString, expandString, orderbyString *string, top, skip *int) (string, error)

nolint:cyclop,gocognit

Types

type FieldMeta

type FieldMeta struct {
	FieldType FieldType

	// Field for collection field types
	CollectionItemMeta *FieldMeta

	// Fields for complex field types
	ComplexFieldSchemas        []string
	DiscriminatorProperty      string
	DiscriminatorSchemaMapping map[string]string

	// Fields for relationship and relationship collection types
	RelationshipSchema   string
	RelationshipProperty string
}

type FieldType

type FieldType string
const (
	BooleanFieldType      FieldType = "boolean"
	NumberFieldType       FieldType = "number"
	StringFieldType       FieldType = "string"
	DateTimeFieldType     FieldType = "datetime"
	CollectionFieldType   FieldType = "collection"
	ComplexFieldType      FieldType = "complex"
	RelationshipFieldType FieldType = "relationship"
)

type Schema

type Schema map[string]FieldMeta

type SchemaMeta

type SchemaMeta struct {
	Table  string
	Fields map[string]FieldMeta
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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