1

我正在使用 RedQueryBuilder 0.5.0 版 http://0-5-0.redquerybuilder.appspot.com/来构建表达式验证器。我想知道,如何验证输入的表达式?RedQuery Builder 0.5.0 的元数据支持为 Jquery 支持添加 css 和类。请建议如何将 css 元数据添加到现有元数据中。

示例元数据如下所示:

 meta : {
    tables : [ {
        "name" : "PERSON",
        "label" : "Person",
        "columns" : [ {
            "name" : "NAME",
            "label" : "Name",
            "type" : "STRING",
            "size" : 10
        }, {
            "name" : "DOB",
            "label" : "Date of birth",
            "type" : "DATE"
        }, {
            "name" : "SEX",
            "label" : "Sex",
            "type" : "STRING",
            "editor" : "SELECT"
        }, {
            "name" : "CATEGORY",
            "label" : "Category",
            "type" : "REF",
        }  ],
        fks : []
    } ],

    types : [ {
        "name" : "STRING",
        "editor" : "TEXT",
        "operators" : [ {
            "name" : "=",
            "label" : "is",
            "cardinality" : "ONE"
        }, {
            "name" : "<>",
            "label" : "is not",
            "cardinality" : "ONE"
        }, {
            "name" : "LIKE",
            "label" : "like",
            "cardinality" : "ONE"
        }, {
            "name" : "<",
            "label" : "less than",
            "cardinality" : "ONE"
        }, {
            "name" : ">",
            "label" : "greater than",
            "cardinality" : "ONE"
        } ]
    }, {
        "name" : "DATE",
        "editor" : "DATE",
        "operators" : [ {
            "name" : "=",
            "label" : "is",
            "cardinality" : "ONE"
        }, {
            "name" : "<>",
            "label" : "is not",
            "cardinality" : "ONE"
        }, {
            "name" : "<",
            "label" : "before",
            "cardinality" : "ONE"
        }, {
            "name" : ">",
            "label" : "after",
            "cardinality" : "ONE"
        } ]
    }, {
        "name" : "REF",
        "editor" : "SELECT",
        "operators" : [ {
            "name" : "IN",
            "label" : "any of",
            "cardinality" : "MULTI"
        }]
    }  ]
},
4

0 回答 0