# README
enjinql - Enjin Query Language
enjinql is the reference implementation of the Enjin Query Language, a feature of Go-Enjin that manages the indexing and accessing of page content.
Notice
While this project is in active use within the Go-Enjin project and example sites, enjinql does not have a sufficient amount of unit tests and the syntax has not been ratified as a formal specification.
Please consider enjinql as a proof-of-concept that is already on its way to being a minimum viable product and for the time being, probably not the best choice to use in non-Go-Enjin projects.
Installation
> go get github.com/go-corelibs/enjinql@latest
Command Line Interface
> go install github.com/go-corelibs/enjinql/cmd/enjinql@latest
Go-CoreLibs
Go-CoreLibs is a repository of shared code between the Go-Curses and Go-Enjin projects.
License
Copyright 2024 The Go-CoreLibs Authors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use file except in compliance with the License.
You may obtain a copy of the license at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
# Packages
No description provided by the author
# Functions
GetLexerJSON returns a JSON representation of the syntax lexer.
GetSyntaxEBNF returns the EBNF text representing the Enjin Query Language.
MakeSourceConfig is a convenience wrapper for constructing SourceConfig instances.
No description provided by the author
NewBoolValue is a convenience wrapper to construct a boolean SourceConfigValue.
NewConfig returns a new Config instance with only the given prefix set.
NewFloatValue is a convenience wrapper to construct a decimal SourceConfigValue.
NewIntValue is a convenience wrapper to construct an integer SourceConfigValue.
NewLinkedValue is a convenience wrapper to construct a linked SourceConfigValue.
NewShell starts a new EnjinQL interactive shell, creating a new default shell configuration if the shell argument is nil.
NewStringValue is a convenience wrapper to construct a string SourceConfigValue.
NewTimeValue is a convenience wrapper to construct a boolean SourceConfigValue.
No description provided by the author
No description provided by the author
PageSourceConfig returns a new SourceConfig, preset with the primary source settings required for the Go-Enjin project.
ParseConfig unmarshalls the given JSON data into a new Config instance.
ParseSyntax parses the input string and returns an initialized Syntax tree.
No description provided by the author
No description provided by the author
No description provided by the author
# Constants
DataSourceType represents sources that have no parent and no linked values.
JoinSourceType represents sources that have a parent and have liked values.
LinkSourceType represents sources that have a parent or have linked values.
length of hex-string uuid.V4 ((uuid.Size * 2) + 4).
MaxPageTypeSize is the Go-Enjin recommended 64-character limit on the total length of custom page type and archetype names.
MaxUrlPathSize is the recommended 2000-character limit on overall URL size, minus 256 for the domain segment and minus another nine for the https://.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
PageShasumSize is the length of a Go-Enjin page "shasum" identifier, which is the first 10-characters of the SHA-256 hash of the complete page content (front-matter plus body).
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
size of [shasum.BriefLength].
SourceIdKey is the SQL name of the primary key for all SQL tables.
No description provided by the author
# Variables
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# Structs
Condition is the AND/OR combining of two expressions.
Config is the structure for configuring a New EnjinQL instance
Config structures can be constructed manually, simply instantiate the Go types and build the structure directly.
Constraint is the comparing of two values.
No description provided by the author
Operator represents a comparison operation
| Key | Op | Description | +-----+------+--------------------------+ | EQ | == | equal to | | NE | != | not equal to | | GE | >= | greater than or equal to | | LE | <= | less than or equal to | | GT | > | greater than | | LT | < | less than | | LK | LIKE | like | | SW | ^= | starts with | | EW | $= | ends with | | CS | *= | contains one of string | | CF | ~= | contains any of fields |
For LK, SW, EW, CS and CF, there is a NOT modifier:
| Key | Op | Description | +-----+------+--------------------------+ | Not | NOT | long-form negate | | Nt | ! | short-form negate |
Example NOT modifier usage:
| Example | Description | +---------+---------------------+ | NOT ^= | does not start with | | !$= | does not end with |.
No description provided by the author
SourceConfig is the structure for configuring a specific source.
SourceConfigValue is the structure for configuring a specific value indexed by the SourceConfig.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# Interfaces
EnjinQL is the interface for a built enjinql instance.
Shell is a simple interface for managing an interactive eql shell session.
No description provided by the author
No description provided by the author
No description provided by the author
# Type aliases
No description provided by the author
ConfigSources is a slice type for providing Config builder methods.
ConfigSourceValues is a slice type for providing Config builder methods.
No description provided by the author
No description provided by the author
No description provided by the author