defs

package
v3.35.0 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2023 License: Apache-2.0, Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Copyright 2021 Molecula Corp. All rights reserved.

Copyright 2021 Molecula Corp. All rights reserved.

Copyright 2021 Molecula Corp. All rights reserved.

Copyright 2021 Molecula Corp. All rights reserved.

Index

Constants

View Source
const (
	CompareExactOrdered   compareMethod = "exactOrdered"
	CompareExactUnordered compareMethod = "exactUnordered"
	CompareIncludedIn     compareMethod = "includedIn"
	ComparePartial        compareMethod = "comparePartial"
)

Variables

View Source
var TableTests []TableTest = []TableTest{}/* 147 elements not displayed */

TableTests is the list of tests which get run by TestSQL_Execute in sql_test.go. They're defined here just to keep the test definitions separate from the test execution logic.

Functions

This section is empty.

Types

type PQLTest

type PQLTest struct {
	PQLs         []string
	Table        string
	ExpHdrs      []*featurebase.WireQueryField
	ExpRows      [][]interface{}
	ExpRowsPlus1 [][][]interface{}
	ExpErr       string
	// contains filtered or unexported fields
}

func (PQLTest) Name

func (s PQLTest) Name(i int) string

Name returns a string name which can be used to distingish test runs. It takes an integer value which will be used as part of a generic table name in the case where a name value was not provided in the definition.

type PlanCheckFunc added in v3.32.0

type PlanCheckFunc func([]byte) error

type SQLTest

type SQLTest struct {
	SQLs           []string
	ExpHdrs        []*featurebase.WireQueryField
	ExpRows        [][]interface{}
	ExpRowsPlus1   [][][]interface{}
	ExpErr         string
	Compare        compareMethod
	SortStringKeys bool
	ExpRowCount    int
	PlanCheck      PlanCheckFunc
	// contains filtered or unexported fields
}

func (SQLTest) Name

func (s SQLTest) Name(i int) string

Name returns a string name which can be used to distingish test runs. It takes an integer value which will be used as part of a generic table name in the case where a name value was not provided in the definition.

type TableTest

type TableTest struct {
	Table    source
	SQLTests []SQLTest
	PQLTests []PQLTest
	// contains filtered or unexported fields
}
var Keyed TableTest = keyed
var Unkeyed TableTest = unkeyed

func (TableTest) CreateTable

func (tt TableTest) CreateTable() string

func (TableTest) HasData

func (tt TableTest) HasData() bool

HasData returns true is TableTest has a data defined which should be inserted.

func (TableTest) HasTable

func (tt TableTest) HasTable() bool

HasTable returns true is TableTest has a table defined which should be created.

func (TableTest) InsertInto

func (tt TableTest) InsertInto(t *testing.T, rowSets ...int) string

func (TableTest) Name

func (tt TableTest) Name(i int) string

Name returns a string name which can be used to distingish test runs. It takes an integer value which will be used as part of a generic table name in the case where a name value was not provided in the definition.

Jump to

Keyboard shortcuts

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