node

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package node contains the generated node objects that refer to tables, columns and aliases when doing a query.

Nodes use a builder pattern to create a chain of relationships that end in a table or column. Start a node with the same table being queried, and then create a chain to the object being queried.

For example, lets say a project table contains a foreign key to the id of a person table, and the foreign key is named "manager_id". You could get a list of all the projects managed by John with this query:

managers := model.QueryProjects(ctx).
           Where(op.Equal(node.Project().Manager().Name(), "John")).
           Load()

See the goradd-orm documentation for more information.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Alias

func Alias(alias string) query.AliasNodeI

Types

type AltLeafUnNode

type AltLeafUnNode interface {
	query.TableNodeI
	// PrimaryKey returns the column node representing the primary key of the table
	PrimaryKey() *query.ColumnNode
	// ID represents the id column in the database.
	ID() *query.ColumnNode
	// Name represents the name column in the database.
	Name() *query.ColumnNode
	// AltRootUnID represents the alt_root_un_id foreign key column in the database
	// that references the AltRootUn object.
	AltRootUnID() *query.ColumnNode
	// AltRootUn references the AltRootUn object whose primary key is AltRootUnID.
	AltRootUn() AltRootUnNode
}

AltLeafUnNode is the builder interface to the AltLeafUn nodes.

func AltLeafUn

func AltLeafUn() AltLeafUnNode

AltLeafUn returns a table node that starts a node chain that begins with the alt_leaf_un table.

type AltRootUnNode

type AltRootUnNode interface {
	query.TableNodeI
	// PrimaryKey returns the column node representing the primary key of the table
	PrimaryKey() *query.ColumnNode
	// ID represents the id column in the database.
	ID() *query.ColumnNode
	// Name represents the name column in the database.
	Name() *query.ColumnNode
	// AltLeafUn represents the AltLeafUn reverse reference to a AltLeafUn object
	// through the AltRootUnID foreign key there.
	AltLeafUn() AltLeafUnNode
}

AltRootUnNode is the builder interface to the AltRootUn nodes.

func AltRootUn

func AltRootUn() AltRootUnNode

AltRootUn returns a table node that starts a node chain that begins with the alt_root_un table.

type AutoGenNode

type AutoGenNode interface {
	query.TableNodeI
	// PrimaryKey returns the column node representing the primary key of the table
	PrimaryKey() *query.ColumnNode
	// ID represents the id column in the database.
	ID() *query.ColumnNode
	// GroLock represents the gro_lock column in the database.
	GroLock() *query.ColumnNode
	// GroTimestamp represents the gro_timestamp column in the database.
	GroTimestamp() *query.ColumnNode
	// Created represents the created column in the database.
	Created() *query.ColumnNode
	// Modified represents the modified column in the database.
	Modified() *query.ColumnNode
	// Name represents the name column in the database.
	Name() *query.ColumnNode
}

AutoGenNode is the builder interface to the AutoGen nodes.

func AutoGen

func AutoGen() AutoGenNode

AutoGen returns a table node that starts a node chain that begins with the auto_gen table.

type DoubleIndexNode

type DoubleIndexNode interface {
	query.TableNodeI
	// PrimaryKey returns the column node representing the primary key of the table
	PrimaryKey() *query.ColumnNode
	// ID represents the id column in the database.
	ID() *query.ColumnNode
	// FieldInt represents the field_int column in the database.
	FieldInt() *query.ColumnNode
	// FieldString represents the field_string column in the database.
	FieldString() *query.ColumnNode
	// Field2Int represents the field2_int column in the database.
	Field2Int() *query.ColumnNode
	// Field2String represents the field2_string column in the database.
	Field2String() *query.ColumnNode
}

DoubleIndexNode is the builder interface to the DoubleIndex nodes.

func DoubleIndex

func DoubleIndex() DoubleIndexNode

DoubleIndex returns a table node that starts a node chain that begins with the double_index table.

type LeafLNode

type LeafLNode interface {
	query.TableNodeI
	// PrimaryKey returns the column node representing the primary key of the table
	PrimaryKey() *query.ColumnNode
	// ID represents the id column in the database.
	ID() *query.ColumnNode
	// Name represents the name column in the database.
	Name() *query.ColumnNode
	// GroLock represents the gro_lock column in the database.
	GroLock() *query.ColumnNode
	// RootLID represents the root_l_id foreign key column in the database
	// that references the RootL object.
	RootLID() *query.ColumnNode
	// RootL references the RootL object whose primary key is RootLID.
	RootL() RootLNode
}

LeafLNode is the builder interface to the LeafL nodes.

func LeafL

func LeafL() LeafLNode

LeafL returns a table node that starts a node chain that begins with the leaf_l table.

type LeafNNode

type LeafNNode interface {
	query.TableNodeI
	// PrimaryKey returns the column node representing the primary key of the table
	PrimaryKey() *query.ColumnNode
	// ID represents the id column in the database.
	ID() *query.ColumnNode
	// Name represents the name column in the database.
	Name() *query.ColumnNode
	// RootNID represents the root_n_id foreign key column in the database
	// that references the RootN object.
	RootNID() *query.ColumnNode
	// RootN references the RootN object whose primary key is RootNID.
	RootN() RootNNode
}

LeafNNode is the builder interface to the LeafN nodes.

func LeafN

func LeafN() LeafNNode

LeafN returns a table node that starts a node chain that begins with the leaf_n table.

type LeafNlNode

type LeafNlNode interface {
	query.TableNodeI
	// PrimaryKey returns the column node representing the primary key of the table
	PrimaryKey() *query.ColumnNode
	// ID represents the id column in the database.
	ID() *query.ColumnNode
	// Name represents the name column in the database.
	Name() *query.ColumnNode
	// GroLock represents the gro_lock column in the database.
	GroLock() *query.ColumnNode
	// RootNlID represents the root_nl_id foreign key column in the database
	// that references the RootNl object.
	RootNlID() *query.ColumnNode
	// RootNl references the RootNl object whose primary key is RootNlID.
	RootNl() RootNlNode
	// Leaf2s represents the many-many reference to LeafNl objects.
	Leaf2s() LeafNlNode
	// Leaf1s represents the many-many reference to LeafNl objects.
	Leaf1s() LeafNlNode
}

LeafNlNode is the builder interface to the LeafNl nodes.

func LeafNl

func LeafNl() LeafNlNode

LeafNl returns a table node that starts a node chain that begins with the leaf_nl table.

type LeafNode

type LeafNode interface {
	query.TableNodeI
	// PrimaryKey returns the column node representing the primary key of the table
	PrimaryKey() *query.ColumnNode
	// ID represents the id column in the database.
	ID() *query.ColumnNode
	// Name represents the name column in the database.
	Name() *query.ColumnNode
	// RootID represents the root_id foreign key column in the database
	// that references the Root object.
	RootID() *query.ColumnNode
	// Root references the Root object whose primary key is RootID.
	Root() RootNode
}

LeafNode is the builder interface to the Leaf nodes.

func Leaf

func Leaf() LeafNode

Leaf returns a table node that starts a node chain that begins with the leaf table.

type LeafUNode

type LeafUNode interface {
	query.TableNodeI
	// PrimaryKey returns the column node representing the primary key of the table
	PrimaryKey() *query.ColumnNode
	// ID represents the id column in the database.
	ID() *query.ColumnNode
	// Name represents the name column in the database.
	Name() *query.ColumnNode
	// RootUID represents the root_u_id foreign key column in the database
	// that references the RootU object.
	RootUID() *query.ColumnNode
	// RootU references the RootU object whose primary key is RootUID.
	RootU() RootUNode
}

LeafUNode is the builder interface to the LeafU nodes.

func LeafU

func LeafU() LeafUNode

LeafU returns a table node that starts a node chain that begins with the leaf_u table.

type LeafUlNode

type LeafUlNode interface {
	query.TableNodeI
	// PrimaryKey returns the column node representing the primary key of the table
	PrimaryKey() *query.ColumnNode
	// ID represents the id column in the database.
	ID() *query.ColumnNode
	// Name represents the name column in the database.
	Name() *query.ColumnNode
	// GroLock represents the gro_lock column in the database.
	GroLock() *query.ColumnNode
	// RootUlID represents the root_ul_id foreign key column in the database
	// that references the RootUl object.
	RootUlID() *query.ColumnNode
	// RootUl references the RootUl object whose primary key is RootUlID.
	RootUl() RootUlNode
}

LeafUlNode is the builder interface to the LeafUl nodes.

func LeafUl

func LeafUl() LeafUlNode

LeafUl returns a table node that starts a node chain that begins with the leaf_ul table.

type LeafUnNode

type LeafUnNode interface {
	query.TableNodeI
	// PrimaryKey returns the column node representing the primary key of the table
	PrimaryKey() *query.ColumnNode
	// ID represents the id column in the database.
	ID() *query.ColumnNode
	// Name represents the name column in the database.
	Name() *query.ColumnNode
	// RootUnID represents the root_un_id foreign key column in the database
	// that references the RootUn object.
	RootUnID() *query.ColumnNode
	// RootUn references the RootUn object whose primary key is RootUnID.
	RootUn() RootUnNode
}

LeafUnNode is the builder interface to the LeafUn nodes.

func LeafUn

func LeafUn() LeafUnNode

LeafUn returns a table node that starts a node chain that begins with the leaf_un table.

type LeafUnlNode

type LeafUnlNode interface {
	query.TableNodeI
	// PrimaryKey returns the column node representing the primary key of the table
	PrimaryKey() *query.ColumnNode
	// ID represents the id column in the database.
	ID() *query.ColumnNode
	// Name represents the name column in the database.
	Name() *query.ColumnNode
	// GroLock represents the gro_lock column in the database.
	GroLock() *query.ColumnNode
	// RootUnlID represents the root_unl_id foreign key column in the database
	// that references the RootUnl object.
	RootUnlID() *query.ColumnNode
	// RootUnl references the RootUnl object whose primary key is RootUnlID.
	RootUnl() RootUnlNode
}

LeafUnlNode is the builder interface to the LeafUnl nodes.

func LeafUnl

func LeafUnl() LeafUnlNode

LeafUnl returns a table node that starts a node chain that begins with the leaf_unl table.

type MultiParentNode

type MultiParentNode interface {
	query.TableNodeI
	// PrimaryKey returns the column node representing the primary key of the table
	PrimaryKey() *query.ColumnNode
	// ID represents the id column in the database.
	ID() *query.ColumnNode
	// Name represents the name column in the database.
	Name() *query.ColumnNode
	// Parent1ID represents the parent_1_id foreign key column in the database
	// that references the Parent1 object.
	Parent1ID() *query.ColumnNode
	// Parent1 references the MultiParent object whose primary key is Parent1ID.
	Parent1() MultiParentNode
	// Parent2ID represents the parent_2_id foreign key column in the database
	// that references the Parent2 object.
	Parent2ID() *query.ColumnNode
	// Parent2 references the MultiParent object whose primary key is Parent2ID.
	Parent2() MultiParentNode
	// Parent1MultiParent represents the Parent1MultiParent reverse reference to MultiParent objects
	// through the Parent1ID foreign key there.
	Parent1MultiParents() MultiParentNode
	// Parent2MultiParent represents the Parent2MultiParent reverse reference to MultiParent objects
	// through the Parent2ID foreign key there.
	Parent2MultiParents() MultiParentNode
}

MultiParentNode is the builder interface to the MultiParent nodes.

func MultiParent

func MultiParent() MultiParentNode

MultiParent returns a table node that starts a node chain that begins with the multi_parent table.

type RootLNode

type RootLNode interface {
	query.TableNodeI
	// PrimaryKey returns the column node representing the primary key of the table
	PrimaryKey() *query.ColumnNode
	// ID represents the id column in the database.
	ID() *query.ColumnNode
	// Name represents the name column in the database.
	Name() *query.ColumnNode
	// GroLock represents the gro_lock column in the database.
	GroLock() *query.ColumnNode
	// LeafL represents the LeafL reverse reference to LeafL objects
	// through the RootLID foreign key there.
	LeafLs() LeafLNode
}

RootLNode is the builder interface to the RootL nodes.

func RootL

func RootL() RootLNode

RootL returns a table node that starts a node chain that begins with the root_l table.

type RootNNode

type RootNNode interface {
	query.TableNodeI
	// PrimaryKey returns the column node representing the primary key of the table
	PrimaryKey() *query.ColumnNode
	// ID represents the id column in the database.
	ID() *query.ColumnNode
	// Name represents the name column in the database.
	Name() *query.ColumnNode
	// LeafN represents the LeafN reverse reference to LeafN objects
	// through the RootNID foreign key there.
	LeafNs() LeafNNode
}

RootNNode is the builder interface to the RootN nodes.

func RootN

func RootN() RootNNode

RootN returns a table node that starts a node chain that begins with the root_n table.

type RootNlNode

type RootNlNode interface {
	query.TableNodeI
	// PrimaryKey returns the column node representing the primary key of the table
	PrimaryKey() *query.ColumnNode
	// ID represents the id column in the database.
	ID() *query.ColumnNode
	// Name represents the name column in the database.
	Name() *query.ColumnNode
	// GroLock represents the gro_lock column in the database.
	GroLock() *query.ColumnNode
	// LeafNl represents the LeafNl reverse reference to LeafNl objects
	// through the RootNlID foreign key there.
	LeafNls() LeafNlNode
}

RootNlNode is the builder interface to the RootNl nodes.

func RootNl

func RootNl() RootNlNode

RootNl returns a table node that starts a node chain that begins with the root_nl table.

type RootNode

type RootNode interface {
	query.TableNodeI
	// PrimaryKey returns the column node representing the primary key of the table
	PrimaryKey() *query.ColumnNode
	// ID represents the id column in the database.
	ID() *query.ColumnNode
	// Name represents the name column in the database.
	Name() *query.ColumnNode
	// Leaf represents the Leaf reverse reference to Leaf objects
	// through the RootID foreign key there.
	Leafs() LeafNode
}

RootNode is the builder interface to the Root nodes.

func Root

func Root() RootNode

Root returns a table node that starts a node chain that begins with the root table.

type RootUNode

type RootUNode interface {
	query.TableNodeI
	// PrimaryKey returns the column node representing the primary key of the table
	PrimaryKey() *query.ColumnNode
	// ID represents the id column in the database.
	ID() *query.ColumnNode
	// Name represents the name column in the database.
	Name() *query.ColumnNode
	// LeafU represents the LeafU reverse reference to a LeafU object
	// through the RootUID foreign key there.
	LeafU() LeafUNode
}

RootUNode is the builder interface to the RootU nodes.

func RootU

func RootU() RootUNode

RootU returns a table node that starts a node chain that begins with the root_u table.

type RootUlNode

type RootUlNode interface {
	query.TableNodeI
	// PrimaryKey returns the column node representing the primary key of the table
	PrimaryKey() *query.ColumnNode
	// ID represents the id column in the database.
	ID() *query.ColumnNode
	// Name represents the name column in the database.
	Name() *query.ColumnNode
	// GroLock represents the gro_lock column in the database.
	GroLock() *query.ColumnNode
	// LeafUl represents the LeafUl reverse reference to a LeafUl object
	// through the RootUlID foreign key there.
	LeafUl() LeafUlNode
}

RootUlNode is the builder interface to the RootUl nodes.

func RootUl

func RootUl() RootUlNode

RootUl returns a table node that starts a node chain that begins with the root_ul table.

type RootUnNode

type RootUnNode interface {
	query.TableNodeI
	// PrimaryKey returns the column node representing the primary key of the table
	PrimaryKey() *query.ColumnNode
	// ID represents the id column in the database.
	ID() *query.ColumnNode
	// Name represents the name column in the database.
	Name() *query.ColumnNode
	// LeafUn represents the LeafUn reverse reference to a LeafUn object
	// through the RootUnID foreign key there.
	LeafUn() LeafUnNode
}

RootUnNode is the builder interface to the RootUn nodes.

func RootUn

func RootUn() RootUnNode

RootUn returns a table node that starts a node chain that begins with the root_un table.

type RootUnlNode

type RootUnlNode interface {
	query.TableNodeI
	// PrimaryKey returns the column node representing the primary key of the table
	PrimaryKey() *query.ColumnNode
	// ID represents the id column in the database.
	ID() *query.ColumnNode
	// Name represents the name column in the database.
	Name() *query.ColumnNode
	// GroLock represents the gro_lock column in the database.
	GroLock() *query.ColumnNode
	// LeafUnl represents the LeafUnl reverse reference to a LeafUnl object
	// through the RootUnlID foreign key there.
	LeafUnl() LeafUnlNode
}

RootUnlNode is the builder interface to the RootUnl nodes.

func RootUnl

func RootUnl() RootUnlNode

RootUnl returns a table node that starts a node chain that begins with the root_unl table.

type TimeoutTestNode

type TimeoutTestNode interface {
	query.TableNodeI
	// PrimaryKey returns the column node representing the primary key of the table
	PrimaryKey() *query.ColumnNode
	// ID represents the id column in the database.
	ID() *query.ColumnNode
	// Name represents the name column in the database.
	Name() *query.ColumnNode
}

TimeoutTestNode is the builder interface to the TimeoutTest nodes.

func TimeoutTest

func TimeoutTest() TimeoutTestNode

TimeoutTest returns a table node that starts a node chain that begins with the timeout_test table.

type TwoKeyNode

type TwoKeyNode interface {
	query.TableNodeI
	// Server represents the server column in the database.
	Server() *query.ColumnNode
	// Directory represents the directory column in the database.
	Directory() *query.ColumnNode
	// FileName represents the file_name column in the database.
	FileName() *query.ColumnNode
}

TwoKeyNode is the builder interface to the TwoKey nodes.

func TwoKey

func TwoKey() TwoKeyNode

TwoKey returns a table node that starts a node chain that begins with the two_key table.

type TypeTestNode

type TypeTestNode interface {
	query.TableNodeI
	// PrimaryKey returns the column node representing the primary key of the table
	PrimaryKey() *query.ColumnNode
	// ID represents the id column in the database.
	ID() *query.ColumnNode
	// Date represents the date column in the database.
	Date() *query.ColumnNode
	// Time represents the time column in the database.
	Time() *query.ColumnNode
	// DateTime represents the date_time column in the database.
	DateTime() *query.ColumnNode
	// CreationTime represents the creation_time column in the database.
	CreationTime() *query.ColumnNode
	// ModifiedTime represents the modified_time column in the database.
	ModifiedTime() *query.ColumnNode
	// TestInt represents the test_int column in the database.
	TestInt() *query.ColumnNode
	// TestUnsigned represents the test_unsigned column in the database.
	TestUnsigned() *query.ColumnNode
	// TestInt64 represents the test_int64 column in the database.
	TestInt64() *query.ColumnNode
	// TestUint64 represents the test_uint64 column in the database.
	TestUint64() *query.ColumnNode
	// TestFloat32 represents the test_float32 column in the database.
	TestFloat32() *query.ColumnNode
	// TestFloat64 represents the test_float64 column in the database.
	TestFloat64() *query.ColumnNode
	// TestNumeric represents the test_numeric column in the database.
	TestNumeric() *query.ColumnNode
	// TestBool represents the test_bool column in the database.
	TestBool() *query.ColumnNode
	// TestUnlimitedString represents the test_unlimited_string column in the database.
	TestUnlimitedString() *query.ColumnNode
	// TestLimitedString represents the test_limited_string column in the database.
	TestLimitedString() *query.ColumnNode
	// TestLongstring represents the test_longstring column in the database.
	TestLongstring() *query.ColumnNode
	// TestUnlimitedBytes represents the test_unlimited_bytes column in the database.
	TestUnlimitedBytes() *query.ColumnNode
	// TestLimitedBytes represents the test_limited_bytes column in the database.
	TestLimitedBytes() *query.ColumnNode
	// TypeLongBytes represents the type_long_bytes column in the database.
	TypeLongBytes() *query.ColumnNode
}

TypeTestNode is the builder interface to the TypeTest nodes.

func TypeTest

func TypeTest() TypeTestNode

TypeTest returns a table node that starts a node chain that begins with the type_test table.

type UnsupportedTypeNode

type UnsupportedTypeNode interface {
	query.TableNodeI
	// PrimaryKey returns the column node representing the primary key of the table
	PrimaryKey() *query.ColumnNode
	// TypeSerial represents the type_serial column in the database.
	TypeSerial() *query.ColumnNode
	// TypeSet represents the type_set column in the database.
	TypeSet() *query.ColumnNode
	// TypeEnumerated represents the type_enumerated column in the database.
	TypeEnumerated() *query.ColumnNode
	// TypeGeo represents the type_geo column in the database.
	TypeGeo() *query.ColumnNode
	// TypeTinyblob represents the type_tinyblob column in the database.
	TypeTinyblob() *query.ColumnNode
	// TypeBinary represents the type_binary column in the database.
	TypeBinary() *query.ColumnNode
	// TypeSmall represents the type_small column in the database.
	TypeSmall() *query.ColumnNode
	// TypeMedium represents the type_medium column in the database.
	TypeMedium() *query.ColumnNode
	// TypePolygon represents the type_polygon column in the database.
	TypePolygon() *query.ColumnNode
	// TypeMultFk1 represents the type_mult_fk1 column in the database.
	TypeMultFk1() *query.ColumnNode
	// TypeMultiFk2 represents the type_multi_fk2 column in the database.
	TypeMultiFk2() *query.ColumnNode
}

UnsupportedTypeNode is the builder interface to the UnsupportedType nodes.

func UnsupportedType

func UnsupportedType() UnsupportedTypeNode

UnsupportedType returns a table node that starts a node chain that begins with the unsupported_type table.

Jump to

Keyboard shortcuts

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