1

I am using the RedQueryBuilder version 0.5.0 http://0-5-0.redquerybuilder.appspot.com/ for building an Expression validator. I want to Know, how to validate the entered expressions? The metadata of the RedQuery Builder 0.5.0 supports css and class additions for Jquery support. Please, suggest how to add the css metadata to the existing metadata.

The Sample MetaData is given below:

 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"
        }]
    }  ]
},
user_D_A__
  • 460
  • 2
  • 6
  • 14
  • I think what you could do it add "styleName" : "mySpecialValidator" then use jquery (or whatever you use) to look for those elements and add some change handlers etc to add whatever behaviour you like... Seems like a good feature though so worth adding to https://github.com/salk31/RedQueryBuilder or even better suggest a patch ;) – salk31 Sep 10 '13 at 11:24

0 Answers0