文件名称:java版本的SQL语句解析源代码,包含demo(zql)
文件大小:218KB
文件格式:RAR
更新时间:2013-03-23 14:46:27
java,sql解析
SQL语句解析java包,含源代码: SELECT ANTIQUEOWNERS.OWNERLASTNAME, ANTIQUEOWNERS.OWNERFIRSTNAME FROM ANTIQUEOWNERS, ANTIQUES WHERE ANTIQUES.BUYERID = ANTIQUEOWNERS.OWNERID AND ANTIQUES.ITEM = 'Chair'; Will result in a ZqlQuery structure. ZqlQuery's getSelect(), getFrom() and getWhere() methods will extract the SELECT, FROM and WHERE parts of the query. getSelect() will return a Vector of ZSelectItem, data structures that give information about the columns and/or operations requested (including SQL expression support, like in SELECT a+b FROM num;). getFrom() will return a Vector of ZFromItem, data structures that give information about the tables involved in the query. getWhere() will return a SQL expression, a data structure that represents ANTIQUES.BUYERID = ANTIQUEOWNERS.OWNERID AND ANTIQUES.ITEM = 'Chair' in the example above (the expression evaluator that comes with Zql can evaluate such expressions, for a given data tuple).