columns

package
v1.2.84 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Fragment

func Fragment(ctx specifications.Context, spec *specifications.Specification, column *specifications.Column) (fragment string, err error)
func Link(ctx specifications.Context, spec *specifications.Specification, column *specifications.Column) (fragment string, err error)
func Links(ctx specifications.Context, spec *specifications.Specification, column *specifications.Column) (fragment string, err error)

Links (SELECT to_json(

ARRAY(
	SELECT row_to_json("{host}_{away}".*) FROM (
		SELECT ... FROM "schema"."away_table" WHERE "pk" = "{host}"."ref_column" ORDER BY ... OFFSET x LIMIT y
		) AS "{host}_{away}"
	)
)

) AS "{name}"

func Reference

func Reference(ctx specifications.Context, spec *specifications.Specification, column *specifications.Column) (fragment string, err error)

Reference (

 SELECT row_to_json("{host}_{away}".*) FROM (
		SELECT ... FROM "schema"."away" WHERE "pk" = "host"."ref_column" OFFSET 0 LIMIT 1
 ) AS "{host}_{away}"

) AS {name}

func Virtual

func Virtual(ctx specifications.Context, spec *specifications.Specification, column *specifications.Column) (fragment string, err error)

Virtual (

 {SELECT to_json(ARRAY(}
	{SELECT row_to_json("{name}_virtual".*) FROM (}
	{query}
	{) AS "{name}_virtual"}
 {))}

) AS {name}

Types

This section is empty.

Jump to

Keyboard shortcuts

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