美文网首页
Esql Sql2Dsl

Esql Sql2Dsl

作者: subway1211 | 来源:发表于2016-12-30 21:14 被阅读0次

    python -m ql.utest "select * from my_index where a = 10 limit 10;"

    (TOK_QUERY

    (TOK_SELECT

    (TOK_SELEXPR

    (TOK_VALUE

    *

    )

    )

    )

    (TOK_FROM

    (TOK_TABLE_NAME

    (TOK_VALUE

    my_index

    )

    )

    )

    (TOK_WHERE

    (TOK_COMPARE

    =

    (TOK_EXPRESSION_LEFT

    (TOK_VALUE

    a

    )

    )

    (TOK_EXPRESSION_RIGHT

    (TOK_VALUE

    10

    )

    )

    )

    )

    (TOK_LIMIT

    (TOK_VALUE

    10

    )

    )

    )

    -----------------------华丽分割----------------------------------

    {

    "query": {

    "bool": {

    "must": [

    {

    "query_string": {

    "query": "10",

    "default_operator": "AND",

    "fields": [

    "a"

    ]

    }

    }

    ]

    }

    },

    "from": 0,

    "size": "10"

    }

    Git开源地址

    https://g地址ithub.com/unimassystem/EsqlParser

    相关文章

      网友评论

          本文标题:Esql Sql2Dsl

          本文链接:https://www.haomeiwen.com/subject/kzxvvttx.html