private QueryBuilderKraken parseUpdate ( ) { Token token ; UpdateQueryBuilder query = new UpdateQueryBuilder ( _tableManager , _sql ) ; String tableName = parseTableName ( ) ; query . setTableName ( tableName ) ; _query = query ; if ( ( token = scanToken ( ) ) != Token . SET ) { throw error ( L . l ( "expected SET at {0}" , token ) ) ; } do { parseSetItem ( query ) ; } while ( ( token = scanToken ( ) ) == Token . COMMA ) ; _token = token ; //query.setUpdateBuilder(new SetUpdateBuilder(setItems)); ExprKraken whereExpr = null ; token = scanToken ( ) ; if ( token == Token . WHERE ) { whereExpr = parseExpr ( ) ; } else if ( token != null && token != Token . EOF ) { throw error ( "expected WHERE at '{0}'" , token ) ; } ParamExpr [ ] params = _params . toArray ( new ParamExpr [ _params . size ( ) ] ) ; query . setParams ( params ) ; query . setWhereExpr ( whereExpr ) ; return query ; }
Parses the update .