FLP-GSP

Crates.io Version

General Search Parser

General Search String (GSS) Builder

Goto the page.

General Search String (GSS) LALR(1) Grammar

``` Search -> Relation

Relation -> GroupStart Comparison GroupEnd -> GroupStart Relation And Relation GroupEnd -> GroupStart Relation And Comparison GroupEnd -> GroupStart Comparison And Relation GroupEnd -> GroupStart Comparison And Comparison GroupEnd -> GroupStart Relation Or Relation GroupEnd -> GroupStart Relation Or Comparison GroupEnd -> GroupStart Comparison Or Relation GroupEnd -> GroupStart Comparison Or Comparison GroupEnd -> GroupStart Not Relation GroupEnd -> GroupStart Not Comparison GroupEnd

Comparison -> Str Equal Str -> Str EqualCI Str -> Str Greater Str -> Str Less Str -> Str Wildcard Str -> Str Regex Str -> Str Any Array -> Str Null

   Str -> DoubleQuote Content DoubleQuote

 Array -> SquareBracketLeft (Str Comma)* SquareBracketRight

GroupStart -> (

GroupEnd -> )

   And -> &

    Or -> |

   Not -> !

 Equal -> =

EqualCI -> ~

Greater -> >

  Less -> <

Wildcard -> *

 Regex -> $

   Any -> ?

  Null -> -

```

Interpreter

Some example interpreters that maybe useful, need to be enabled by feature

Evaluate ["evaluate"]

Customizable in-code evaluating interpreter. Goto the file.

An example could be found here.

Concept

To evaluate a Search, you will need EvaluateRules and EvaluatePairs.

Mysql ["mysql"]

Generating Mysql condition clause. Goto the file.

An example could be found here.

The types can be used in sqlx^0.5 binding directly.

Concept

To generate Mysql condition clause from a Search, you will need MysqlRenames and MysqlTypes.

Postgres ["postgres"]

Very similar to Mysql except for some types.

The types can be used in sqlx^0.5 binding directly, except several types defined by sqlx itself, e.g. PgInterval, PgMoney, etc.

Special Types