pql

package module
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2025 License: Apache-2.0 Imports: 4 Imported by: 0

README

pipelined query language

Website Playground Discord

This is a simple fork of PQL repository to suit the needs of Anyquery project.

Changes

  • EQ operator does not use the coalesce function anymore. This change was needed because if a table parameter was used, SQLite wouldn't return the constraint to the vtable because PQL would embrace it with a coalesce function.

Documentation

Overview

Package pql provides a Pipeline Query Language that can be translated into SQL.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Compile

func Compile(source string) (string, error)

Compile converts the given Pipeline Query Language statement into the equivalent SQL. This is equivalent to new(CompileOptions).Compile(source).

Types

type CompileOptions

type CompileOptions struct {
	// Parameters is a map of identifiers to SQL snippets to substitute in.
	// For example, a "foo": "$1" entry would replace unquoted "foo" identifiers
	// with "$1" in the resulting SQL.
	Parameters map[string]string
}

CompileOptions a set of optional parameters that configure compilation. nil is treated the same as the zero value.

func (*CompileOptions) Compile

func (opts *CompileOptions) Compile(source string) (string, error)

Compile converts the given Pipeline Query Language statement into the equivalent SQL.

Directories

Path Synopsis
cmd
pql command
Package parser provides a parser and an Abstract Syntax Tree (AST) for the Pipeline Query Language.
Package parser provides a parser and an Abstract Syntax Tree (AST) for the Pipeline Query Language.

Jump to

Keyboard shortcuts

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