OW_WQLSelectStatementGen.cpp

Go to the documentation of this file.
00001 /*******************************************************************************
00002 * Copyright (C) 2001-2004 Vintela, Inc. All rights reserved.
00003 *
00004 * Redistribution and use in source and binary forms, with or without
00005 * modification, are permitted provided that the following conditions are met:
00006 *
00007 *  - Redistributions of source code must retain the above copyright notice,
00008 *    this list of conditions and the following disclaimer.
00009 *
00010 *  - Redistributions in binary form must reproduce the above copyright notice,
00011 *    this list of conditions and the following disclaimer in the documentation
00012 *    and/or other materials provided with the distribution.
00013 *
00014 *  - Neither the name of Vintela, Inc. nor the names of its
00015 *    contributors may be used to endorse or promote products derived from this
00016 *    software without specific prior written permission.
00017 *
00018 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
00019 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00020 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00021 * ARE DISCLAIMED. IN NO EVENT SHALL Vintela, Inc. OR THE CONTRIBUTORS
00022 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
00023 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
00024 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
00025 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
00026 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
00027 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
00028 * POSSIBILITY OF SUCH DAMAGE.
00029 *******************************************************************************/
00030 
00035 #include "OW_config.h"
00036 #include "OW_WQLSelectStatementGen.hpp"
00037 #include "OW_WQLAst.hpp"
00038 #include "OW_WQLScanUtils.hpp"
00039 #include "OW_CIMException.hpp"
00040 
00041 namespace OW_NAMESPACE
00042 {
00043 
00044 WQLSelectStatementGen::~WQLSelectStatementGen()
00045 {
00046 }
00047 
00048 WQLSelectStatementGen::WQLSelectStatementGen()
00049    : m_isPropertyList(false)
00050 {
00051 }
00052 void WQLSelectStatementGen::visit_stmt_selectStmt_optSemicolon(
00053    const stmt_selectStmt_optSemicolon* pstmt_selectStmt_optSemicolon
00054    )
00055 {
00056    pstmt_selectStmt_optSemicolon->m_pselectStmt1->acceptInterface(this);
00057    if (pstmt_selectStmt_optSemicolon->m_poptSemicolon2)
00058    {
00059       pstmt_selectStmt_optSemicolon->m_poptSemicolon2->acceptInterface(this);
00060    }
00061 }
00062 void WQLSelectStatementGen::visit_stmt_updateStmt_optSemicolon(
00063    const stmt_updateStmt_optSemicolon*
00064    )
00065 {
00066    OW_THROWCIM(CIMException::INVALID_QUERY);
00067 }
00068 void WQLSelectStatementGen::visit_stmt_insertStmt_optSemicolon(
00069    const stmt_insertStmt_optSemicolon*
00070    )
00071 {
00072    OW_THROWCIM(CIMException::INVALID_QUERY);
00073 }
00074 void WQLSelectStatementGen::visit_stmt_deleteStmt_optSemicolon(
00075    const stmt_deleteStmt_optSemicolon*
00076    )
00077 {
00078    OW_THROWCIM(CIMException::INVALID_QUERY);
00079 }
00080 void WQLSelectStatementGen::visit_optSemicolon_empty(
00081    const optSemicolon_empty* poptSemicolon_empty
00082    )
00083 {
00084 }
00085 void WQLSelectStatementGen::visit_optSemicolon_SEMICOLON(
00086    const optSemicolon_SEMICOLON* poptSemicolon_SEMICOLON
00087    )
00088 {
00089 }
00090 void WQLSelectStatementGen::visit_insertStmt(
00091    const insertStmt*
00092    )
00093 {
00094    OW_THROWCIM(CIMException::INVALID_QUERY);
00095 }
00096 void WQLSelectStatementGen::visit_insertRest_VALUES_LEFTPAREN_targetList_RIGHTPAREN(
00097    const insertRest_VALUES_LEFTPAREN_targetList_RIGHTPAREN*
00098    )
00099 {
00100    OW_THROWCIM(CIMException::INVALID_QUERY);
00101 }
00102 void WQLSelectStatementGen::visit_insertRest_DEFAULT_VALUES(
00103    const insertRest_DEFAULT_VALUES*
00104    )
00105 {
00106    OW_THROWCIM(CIMException::INVALID_QUERY);
00107 }
00108 void WQLSelectStatementGen::visit_insertRest_LEFTPAREN_columnList_RIGHTPAREN_VALUES_LEFTPAREN_targetList_RIGHTPAREN(
00109    const insertRest_LEFTPAREN_columnList_RIGHTPAREN_VALUES_LEFTPAREN_targetList_RIGHTPAREN*
00110    )
00111 {
00112    OW_THROWCIM(CIMException::INVALID_QUERY);
00113 }
00114 void WQLSelectStatementGen::visit_deleteStmt(
00115    const deleteStmt*
00116    )
00117 {
00118    OW_THROWCIM(CIMException::INVALID_QUERY);
00119 }
00120 void WQLSelectStatementGen::visit_updateStmt(
00121    const updateStmt*
00122    )
00123 {
00124    OW_THROWCIM(CIMException::INVALID_QUERY);
00125 }
00126 /*********************************************************
00127  * SELECT statement
00128  *  SELECT [distinct] targetEl* [FromClause] [Where Clause]
00129  *   [Group Clause] [Having Clause] [Sort Clause]
00130  *********************************************************/
00131 void WQLSelectStatementGen::visit_selectStmt(
00132    const selectStmt* pselectStmt
00133    )
00134 {
00135    // visit the unused ones, to detect an invalid query
00136    if (pselectStmt->m_poptDistinct2)
00137    {
00138       pselectStmt->m_poptDistinct2->acceptInterface(this);
00139    }
00140    if (pselectStmt->m_poptGroupClause6)
00141    {
00142       pselectStmt->m_poptGroupClause6->acceptInterface(this);
00143    }
00144    if (pselectStmt->m_poptHavingClause7)
00145    {
00146       pselectStmt->m_poptHavingClause7->acceptInterface(this);
00147    }
00148    if (pselectStmt->m_poptSortClause8)
00149    {
00150       pselectStmt->m_poptSortClause8->acceptInterface(this);
00151    }
00152    // start fresh
00153    m_stmt.clear();
00154    // FROM clause
00155    if (pselectStmt->m_poptFromClause4)
00156    {
00157       pselectStmt->m_poptFromClause4->acceptInterface(this);
00158    }
00159    // WHERE
00160    if (pselectStmt->m_poptWhereClause5)
00161    {
00162       pselectStmt->m_poptWhereClause5->acceptInterface(this);
00163    }
00164    // desired properties
00165    for (List<targetEl*>::const_iterator i = pselectStmt->m_ptargetList3->begin();
00166       i != pselectStmt->m_ptargetList3->end();
00167       ++i )
00168    {
00169       (*i)->acceptInterface(this);
00170    }
00171 }
00172 void WQLSelectStatementGen::visit_exprSeq_aExpr(
00173    const exprSeq_aExpr*
00174    )
00175 {
00176    OW_THROWCIM(CIMException::INVALID_QUERY);
00177 }
00178 void WQLSelectStatementGen::visit_exprSeq_exprSeq_COMMA_aExpr(
00179    const exprSeq_exprSeq_COMMA_aExpr*
00180    )
00181 {
00182    OW_THROWCIM(CIMException::INVALID_QUERY);
00183 }
00184 void WQLSelectStatementGen::visit_exprSeq_exprSeq_USING_aExpr(
00185    const exprSeq_exprSeq_USING_aExpr*
00186    )
00187 {
00188    OW_THROWCIM(CIMException::INVALID_QUERY);
00189 }
00190 void WQLSelectStatementGen::visit_optDistinct_empty(
00191    const optDistinct_empty* poptDistinct_empty
00192    )
00193 {
00194 }
00195 void WQLSelectStatementGen::visit_optDistinct_DISTINCT(
00196    const optDistinct_DISTINCT*
00197    )
00198 {
00199    OW_THROWCIM(CIMException::INVALID_QUERY);
00200 }
00201 void WQLSelectStatementGen::visit_optDistinct_DISTINCT_ON_LEFTPAREN_exprSeq_RIGHTPAREN(
00202    const optDistinct_DISTINCT_ON_LEFTPAREN_exprSeq_RIGHTPAREN*
00203    )
00204 {
00205    OW_THROWCIM(CIMException::INVALID_QUERY);
00206 }
00207 void WQLSelectStatementGen::visit_optDistinct_ALL(
00208    const optDistinct_ALL*
00209    )
00210 {
00211    OW_THROWCIM(CIMException::INVALID_QUERY);
00212 }
00213 void WQLSelectStatementGen::visit_sortClause(
00214    const sortClause*
00215    )
00216 {
00217    OW_THROWCIM(CIMException::INVALID_QUERY);
00218 }
00219 void WQLSelectStatementGen::visit_optSortClause_empty(
00220    const optSortClause_empty* poptSortClause_empty
00221    )
00222 {
00223 }
00224 void WQLSelectStatementGen::visit_optSortClause_sortClause(
00225    const optSortClause_sortClause*
00226    )
00227 {
00228    OW_THROWCIM(CIMException::INVALID_QUERY);
00229 }
00230 void WQLSelectStatementGen::visit_sortby(
00231    const sortby*
00232    )
00233 {
00234    OW_THROWCIM(CIMException::INVALID_QUERY);
00235 }
00236 void WQLSelectStatementGen::visit_optGroupClause_empty(
00237    const optGroupClause_empty* poptGroupClause_empty
00238    )
00239 {
00240 }
00241 void WQLSelectStatementGen::visit_optGroupClause_GROUP_BY_exprSeq(
00242    const optGroupClause_GROUP_BY_exprSeq*
00243    )
00244 {
00245    OW_THROWCIM(CIMException::INVALID_QUERY);
00246 }
00247 void WQLSelectStatementGen::visit_optHavingClause_empty(
00248    const optHavingClause_empty*
00249    )
00250 {
00251    OW_THROWCIM(CIMException::INVALID_QUERY);
00252 }
00253 void WQLSelectStatementGen::visit_optHavingClause_HAVING_aExpr(
00254    const optHavingClause_HAVING_aExpr*
00255    )
00256 {
00257    OW_THROWCIM(CIMException::INVALID_QUERY);
00258 }
00259 void WQLSelectStatementGen::visit_optFromClause_empty(
00260    const optFromClause_empty*
00261    )
00262 {
00263    OW_THROWCIM(CIMException::INVALID_QUERY);
00264 }
00265 void WQLSelectStatementGen::visit_optFromClause_FROM_fromList(
00266    const optFromClause_FROM_fromList* poptFromClause_FROM_fromList
00267    )
00268 {
00269    int count = 0;
00270    for (List<tableRef*>::const_iterator i = poptFromClause_FROM_fromList->m_pfromList2->begin();
00271       i != poptFromClause_FROM_fromList->m_pfromList2->end();
00272       ++i, ++count )
00273    {
00274       (*i)->acceptInterface(this);
00275       // only handle one class name in the FROM clause for now.
00276       if (count != 0)
00277       {
00278          OW_THROWCIMMSG(CIMException::INVALID_QUERY, "Only one class name allowed in FROM clause");
00279       }
00280    }
00281 }
00282 void WQLSelectStatementGen::visit_tableRef_relationExpr(
00283    const tableRef_relationExpr* ptableRef_relationExpr
00284    )
00285 {
00286    ptableRef_relationExpr->m_prelationExpr1->acceptInterface(this);
00287 }
00288 void WQLSelectStatementGen::visit_tableRef_relationExpr_aliasClause(
00289    const tableRef_relationExpr_aliasClause*
00290    )
00291 {
00292    OW_THROWCIM(CIMException::INVALID_QUERY);
00293 }
00294 void WQLSelectStatementGen::visit_tableRef_joinedTable(
00295    const tableRef_joinedTable*
00296    )
00297 {
00298    OW_THROWCIM(CIMException::INVALID_QUERY);
00299 }
00300 void WQLSelectStatementGen::visit_tableRef_LEFTPAREN_joinedTable_RIGHTPAREN_aliasClause(
00301    const tableRef_LEFTPAREN_joinedTable_RIGHTPAREN_aliasClause*
00302    )
00303 {
00304    OW_THROWCIM(CIMException::INVALID_QUERY);
00305 }
00306 void WQLSelectStatementGen::visit_joinedTable_LEFTPAREN_joinedTable_RIGHTPAREN(
00307    const joinedTable_LEFTPAREN_joinedTable_RIGHTPAREN*
00308    )
00309 {
00310    OW_THROWCIM(CIMException::INVALID_QUERY);
00311 }
00312 void WQLSelectStatementGen::visit_joinedTable_tableRef_CROSS_JOIN_tableRef(
00313    const joinedTable_tableRef_CROSS_JOIN_tableRef*
00314    )
00315 {
00316    OW_THROWCIM(CIMException::INVALID_QUERY);
00317 }
00318 void WQLSelectStatementGen::visit_joinedTable_tableRef_UNIONJOIN_tableRef(
00319    const joinedTable_tableRef_UNIONJOIN_tableRef*
00320    )
00321 {
00322    OW_THROWCIM(CIMException::INVALID_QUERY);
00323 }
00324 void WQLSelectStatementGen::visit_joinedTable_tableRef_joinType_JOIN_tableRef_joinQual(
00325    const joinedTable_tableRef_joinType_JOIN_tableRef_joinQual*
00326    )
00327 {
00328    OW_THROWCIM(CIMException::INVALID_QUERY);
00329 }
00330 void WQLSelectStatementGen::visit_joinedTable_tableRef_JOIN_tableRef_joinQual(
00331    const joinedTable_tableRef_JOIN_tableRef_joinQual*
00332    )
00333 {
00334    OW_THROWCIM(CIMException::INVALID_QUERY);
00335 }
00336 void WQLSelectStatementGen::visit_joinedTable_tableRef_NATURAL_joinType_JOIN_tableRef(
00337    const joinedTable_tableRef_NATURAL_joinType_JOIN_tableRef*
00338    )
00339 {
00340    OW_THROWCIM(CIMException::INVALID_QUERY);
00341 }
00342 void WQLSelectStatementGen::visit_joinedTable_tableRef_NATURAL_JOIN_tableRef(
00343    const joinedTable_tableRef_NATURAL_JOIN_tableRef*
00344    )
00345 {
00346    OW_THROWCIM(CIMException::INVALID_QUERY);
00347 }
00348 void WQLSelectStatementGen::visit_aliasClause_AS_strColId_LEFTPAREN_nameList_RIGHTPAREN(
00349    const aliasClause_AS_strColId_LEFTPAREN_nameList_RIGHTPAREN*
00350    )
00351 {
00352    OW_THROWCIM(CIMException::INVALID_QUERY);
00353 }
00354 void WQLSelectStatementGen::visit_aliasClause_AS_strColId(
00355    const aliasClause_AS_strColId*
00356    )
00357 {
00358    OW_THROWCIM(CIMException::INVALID_QUERY);
00359 }
00360 void WQLSelectStatementGen::visit_aliasClause_strColId_LEFTPAREN_nameList_RIGHTPAREN(
00361    const aliasClause_strColId_LEFTPAREN_nameList_RIGHTPAREN*
00362    )
00363 {
00364    OW_THROWCIM(CIMException::INVALID_QUERY);
00365 }
00366 void WQLSelectStatementGen::visit_aliasClause_strColId(
00367    const aliasClause_strColId*
00368    )
00369 {
00370    OW_THROWCIM(CIMException::INVALID_QUERY);
00371 }
00372 void WQLSelectStatementGen::visit_joinType_FULL_strOptJoinOuter(
00373    const joinType_FULL_strOptJoinOuter*
00374    )
00375 {
00376    OW_THROWCIM(CIMException::INVALID_QUERY);
00377 }
00378 void WQLSelectStatementGen::visit_joinType_LEFT_strOptJoinOuter(
00379    const joinType_LEFT_strOptJoinOuter*
00380    )
00381 {
00382    OW_THROWCIM(CIMException::INVALID_QUERY);
00383 }
00384 void WQLSelectStatementGen::visit_joinType_RIGHT_strOptJoinOuter(
00385    const joinType_RIGHT_strOptJoinOuter*
00386    )
00387 {
00388    OW_THROWCIM(CIMException::INVALID_QUERY);
00389 }
00390 void WQLSelectStatementGen::visit_joinType_INNERP(
00391    const joinType_INNERP*
00392    )
00393 {
00394    OW_THROWCIM(CIMException::INVALID_QUERY);
00395 }
00396 void WQLSelectStatementGen::visit_joinQual_USING_LEFTPAREN_nameList_RIGHTPAREN(
00397    const joinQual_USING_LEFTPAREN_nameList_RIGHTPAREN*
00398    )
00399 {
00400    OW_THROWCIM(CIMException::INVALID_QUERY);
00401 }
00402 void WQLSelectStatementGen::visit_joinQual_ON_aExpr(
00403    const joinQual_ON_aExpr*
00404    )
00405 {
00406    OW_THROWCIM(CIMException::INVALID_QUERY);
00407 }
00408 void WQLSelectStatementGen::visit_relationExpr_strRelationName(
00409    const relationExpr_strRelationName* prelationExpr_strRelationName
00410    )
00411 {
00412    m_stmt.setClassName(*prelationExpr_strRelationName->m_pstrRelationName1);
00413 }
00414 void WQLSelectStatementGen::visit_relationExpr_strRelationName_ASTERISK(
00415    const relationExpr_strRelationName_ASTERISK*
00416    )
00417 {
00418    OW_THROWCIM(CIMException::INVALID_QUERY);
00419 }
00420 void WQLSelectStatementGen::visit_relationExpr_ONLY_strRelationName(
00421    const relationExpr_ONLY_strRelationName*
00422    )
00423 {
00424    OW_THROWCIM(CIMException::INVALID_QUERY);
00425 }
00426 void WQLSelectStatementGen::visit_optWhereClause_empty(
00427    const optWhereClause_empty* poptWhereClause_empty
00428    )
00429 {
00430 }
00431 void WQLSelectStatementGen::visit_optWhereClause_WHERE_aExpr(
00432    const optWhereClause_WHERE_aExpr* poptWhereClause_WHERE_aExpr
00433    )
00434 {
00435    poptWhereClause_WHERE_aExpr->m_paExpr2->acceptInterface(this);
00436 }
00437 void WQLSelectStatementGen::visit_rowExpr(
00438    const rowExpr*
00439    )
00440 {
00441    OW_THROWCIM(CIMException::INVALID_QUERY);
00442 }
00443 void WQLSelectStatementGen::visit_rowDescriptor(
00444    const rowDescriptor*
00445    )
00446 {
00447    OW_THROWCIM(CIMException::INVALID_QUERY);
00448 }
00449 void WQLSelectStatementGen::visit_aExpr_cExpr(
00450    const aExpr_cExpr* paExpr_cExpr
00451    )
00452 {
00453    paExpr_cExpr->m_pcExpr1->acceptInterface(this);
00454 }
00455 void WQLSelectStatementGen::visit_aExpr_aExpr_AT_TIME_ZONE_cExpr(
00456    const aExpr_aExpr_AT_TIME_ZONE_cExpr*
00457    )
00458 {
00459    OW_THROWCIM(CIMException::INVALID_QUERY);
00460 }
00461 void WQLSelectStatementGen::visit_aExpr_PLUS_aExpr(
00462    const aExpr_PLUS_aExpr*
00463    )
00464 {
00465    OW_THROWCIM(CIMException::INVALID_QUERY);
00466 }
00467 void WQLSelectStatementGen::visit_aExpr_MINUS_aExpr(
00468    const aExpr_MINUS_aExpr*
00469    )
00470 {
00471    OW_THROWCIM(CIMException::INVALID_QUERY);
00472 }
00473 void WQLSelectStatementGen::visit_aExpr_BITINVERT_aExpr(
00474    const aExpr_BITINVERT_aExpr*
00475    )
00476 {
00477    OW_THROWCIM(CIMException::INVALID_QUERY);
00478 }
00479 void WQLSelectStatementGen::visit_aExpr_aExpr_PLUS_aExpr(
00480    const aExpr_aExpr_PLUS_aExpr*
00481    )
00482 {
00483    OW_THROWCIM(CIMException::INVALID_QUERY);
00484 }
00485 void WQLSelectStatementGen::visit_aExpr_aExpr_MINUS_aExpr(
00486    const aExpr_aExpr_MINUS_aExpr*
00487    )
00488 {
00489    OW_THROWCIM(CIMException::INVALID_QUERY);
00490 }
00491 void WQLSelectStatementGen::visit_aExpr_aExpr_ASTERISK_aExpr(
00492    const aExpr_aExpr_ASTERISK_aExpr*
00493    )
00494 {
00495    OW_THROWCIM(CIMException::INVALID_QUERY);
00496 }
00497 void WQLSelectStatementGen::visit_aExpr_aExpr_SOLIDUS_aExpr(
00498    const aExpr_aExpr_SOLIDUS_aExpr*
00499    )
00500 {
00501    OW_THROWCIM(CIMException::INVALID_QUERY);
00502 }
00503 void WQLSelectStatementGen::visit_aExpr_aExpr_PERCENT_aExpr(
00504    const aExpr_aExpr_PERCENT_aExpr*
00505    )
00506 {
00507    OW_THROWCIM(CIMException::INVALID_QUERY);
00508 }
00509 void WQLSelectStatementGen::visit_aExpr_aExpr_BITAND_aExpr(
00510    const aExpr_aExpr_BITAND_aExpr*
00511    )
00512 {
00513    OW_THROWCIM(CIMException::INVALID_QUERY);
00514 }
00515 void WQLSelectStatementGen::visit_aExpr_aExpr_BITOR_aExpr(
00516    const aExpr_aExpr_BITOR_aExpr*
00517    )
00518 {
00519    OW_THROWCIM(CIMException::INVALID_QUERY);
00520 }
00521 void WQLSelectStatementGen::visit_aExpr_aExpr_BITSHIFTLEFT_aExpr(
00522    const aExpr_aExpr_BITSHIFTLEFT_aExpr*
00523    )
00524 {
00525    OW_THROWCIM(CIMException::INVALID_QUERY);
00526 }
00527 void WQLSelectStatementGen::visit_aExpr_aExpr_BITSHIFTRIGHT_aExpr(
00528    const aExpr_aExpr_BITSHIFTRIGHT_aExpr*
00529    )
00530 {
00531    OW_THROWCIM(CIMException::INVALID_QUERY);
00532 }
00533 void WQLSelectStatementGen::visit_aExpr_aExpr_LESSTHAN_aExpr(
00534    const aExpr_aExpr_LESSTHAN_aExpr* paExpr_aExpr_LESSTHAN_aExpr
00535    )
00536 {
00537    paExpr_aExpr_LESSTHAN_aExpr->m_paExpr1->acceptInterface(this);
00538    paExpr_aExpr_LESSTHAN_aExpr->m_paExpr3->acceptInterface(this);
00539    m_stmt.appendOperation(WQL_LT);
00540 }
00541 void WQLSelectStatementGen::visit_aExpr_aExpr_LESSTHANOREQUALS_aExpr(
00542    const aExpr_aExpr_LESSTHANOREQUALS_aExpr* paExpr_aExpr_LESSTHANOREQUALS_aExpr
00543    )
00544 {
00545    paExpr_aExpr_LESSTHANOREQUALS_aExpr->m_paExpr1->acceptInterface(this);
00546    paExpr_aExpr_LESSTHANOREQUALS_aExpr->m_paExpr3->acceptInterface(this);
00547    m_stmt.appendOperation(WQL_LE);
00548 }
00549 void WQLSelectStatementGen::visit_aExpr_aExpr_GREATERTHAN_aExpr(
00550    const aExpr_aExpr_GREATERTHAN_aExpr* paExpr_aExpr_GREATERTHAN_aExpr
00551    )
00552 {
00553    paExpr_aExpr_GREATERTHAN_aExpr->m_paExpr1->acceptInterface(this);
00554    paExpr_aExpr_GREATERTHAN_aExpr->m_paExpr3->acceptInterface(this);
00555    m_stmt.appendOperation(WQL_GT);
00556 }
00557 void WQLSelectStatementGen::visit_aExpr_aExpr_GREATERTHANOREQUALS_aExpr(
00558    const aExpr_aExpr_GREATERTHANOREQUALS_aExpr* paExpr_aExpr_GREATERTHANOREQUALS_aExpr
00559    )
00560 {
00561    paExpr_aExpr_GREATERTHANOREQUALS_aExpr->m_paExpr1->acceptInterface(this);
00562    paExpr_aExpr_GREATERTHANOREQUALS_aExpr->m_paExpr3->acceptInterface(this);
00563    m_stmt.appendOperation(WQL_GE);
00564 }
00565 void WQLSelectStatementGen::visit_aExpr_aExpr_EQUALS_aExpr(
00566    const aExpr_aExpr_EQUALS_aExpr* paExpr_aExpr_EQUALS_aExpr
00567    )
00568 {
00569    paExpr_aExpr_EQUALS_aExpr->m_paExpr1->acceptInterface(this);
00570    paExpr_aExpr_EQUALS_aExpr->m_paExpr3->acceptInterface(this);
00571    m_stmt.appendOperation(WQL_EQ);
00572 }
00573 void WQLSelectStatementGen::visit_aExpr_aExpr_NOTEQUALS_aExpr(
00574    const aExpr_aExpr_NOTEQUALS_aExpr* paExpr_aExpr_NOTEQUALS_aExpr
00575    )
00576 {
00577    paExpr_aExpr_NOTEQUALS_aExpr->m_paExpr1->acceptInterface(this);
00578    paExpr_aExpr_NOTEQUALS_aExpr->m_paExpr3->acceptInterface(this);
00579    m_stmt.appendOperation(WQL_NE);
00580 }
00581 void WQLSelectStatementGen::visit_aExpr_aExpr_AND_aExpr(
00582    const aExpr_aExpr_AND_aExpr* paExpr_aExpr_AND_aExpr
00583    )
00584 {
00585    paExpr_aExpr_AND_aExpr->m_paExpr1->acceptInterface(this);
00586    paExpr_aExpr_AND_aExpr->m_paExpr3->acceptInterface(this);
00587    m_stmt.appendOperation(WQL_AND);
00588 }
00589 void WQLSelectStatementGen::visit_aExpr_aExpr_OR_aExpr(
00590    const aExpr_aExpr_OR_aExpr* paExpr_aExpr_OR_aExpr
00591    )
00592 {
00593    paExpr_aExpr_OR_aExpr->m_paExpr1->acceptInterface(this);
00594    paExpr_aExpr_OR_aExpr->m_paExpr3->acceptInterface(this);
00595    m_stmt.appendOperation(WQL_OR);
00596 }
00597 void WQLSelectStatementGen::visit_aExpr_NOT_aExpr(
00598    const aExpr_NOT_aExpr* paExpr_NOT_aExpr
00599    )
00600 {
00601    paExpr_NOT_aExpr->m_paExpr2->acceptInterface(this);
00602    m_stmt.appendOperation(WQL_NOT);
00603 }
00604 void WQLSelectStatementGen::visit_aExpr_aExpr_CONCATENATION_aExpr(
00605    const aExpr_aExpr_CONCATENATION_aExpr*
00606    )
00607 {
00608    OW_THROWCIM(CIMException::INVALID_QUERY);
00609 }
00610 void WQLSelectStatementGen::visit_aExpr_aExpr_LIKE_aExpr(
00611    const aExpr_aExpr_LIKE_aExpr*
00612    )
00613 {
00614    OW_THROWCIM(CIMException::INVALID_QUERY);
00615 }
00616 void WQLSelectStatementGen::visit_aExpr_aExpr_LIKE_aExpr_ESCAPE_aExpr(
00617    const aExpr_aExpr_LIKE_aExpr_ESCAPE_aExpr*
00618    )
00619 {
00620    OW_THROWCIM(CIMException::INVALID_QUERY);
00621 }
00622 void WQLSelectStatementGen::visit_aExpr_aExpr_NOT_LIKE_aExpr(
00623    const aExpr_aExpr_NOT_LIKE_aExpr*
00624    )
00625 {
00626    OW_THROWCIM(CIMException::INVALID_QUERY);
00627 }
00628 void WQLSelectStatementGen::visit_aExpr_aExpr_NOT_LIKE_aExpr_ESCAPE_aExpr(
00629    const aExpr_aExpr_NOT_LIKE_aExpr_ESCAPE_aExpr*
00630    )
00631 {
00632    OW_THROWCIM(CIMException::INVALID_QUERY);
00633 }
00634 void WQLSelectStatementGen::visit_aExpr_aExpr_ISNULL(
00635    const aExpr_aExpr_ISNULL* paExpr_aExpr_ISNULL
00636    )
00637 {
00638    paExpr_aExpr_ISNULL->m_paExpr1->acceptInterface(this);
00639    m_stmt.appendOperand(WQLOperand()); // default constructor creates NULL operand
00640    m_stmt.appendOperation(WQL_EQ);
00641 }
00642 void WQLSelectStatementGen::visit_aExpr_aExpr_IS_NULLP(
00643    const aExpr_aExpr_IS_NULLP* paExpr_aExpr_IS_NULLP
00644    )
00645 {
00646    paExpr_aExpr_IS_NULLP->m_paExpr1->acceptInterface(this);
00647    m_stmt.appendOperand(WQLOperand()); // default constructor creates NULL operand
00648    m_stmt.appendOperation(WQL_EQ);
00649 }
00650 void WQLSelectStatementGen::visit_aExpr_aExpr_NOTNULL(
00651    const aExpr_aExpr_NOTNULL* paExpr_aExpr_NOTNULL
00652    )
00653 {
00654    paExpr_aExpr_NOTNULL->m_paExpr1->acceptInterface(this);
00655    m_stmt.appendOperand(WQLOperand()); // default constructor creates NULL operand
00656    m_stmt.appendOperation(WQL_NE);
00657 }
00658 void WQLSelectStatementGen::visit_aExpr_aExpr_IS_NOT_NULLP(
00659    const aExpr_aExpr_IS_NOT_NULLP* paExpr_aExpr_IS_NOT_NULLP
00660    )
00661 {
00662    paExpr_aExpr_IS_NOT_NULLP->m_paExpr1->acceptInterface(this);
00663    m_stmt.appendOperand(WQLOperand()); // default constructor creates NULL operand
00664    m_stmt.appendOperation(WQL_NE);
00665 }
00666 void WQLSelectStatementGen::visit_aExpr_aExpr_IS_TRUEP(
00667    const aExpr_aExpr_IS_TRUEP* paExpr_aExpr_IS_TRUEP
00668    )
00669 {
00670    paExpr_aExpr_IS_TRUEP->m_paExpr1->acceptInterface(this);
00671    m_stmt.appendOperand(WQLOperand(true, WQL_BOOLEAN_VALUE_TAG));
00672    m_stmt.appendOperation(WQL_EQ);
00673 }
00674 void WQLSelectStatementGen::visit_aExpr_aExpr_IS_NOT_FALSEP(
00675    const aExpr_aExpr_IS_NOT_FALSEP* paExpr_aExpr_IS_NOT_FALSEP
00676    )
00677 {
00678    paExpr_aExpr_IS_NOT_FALSEP->m_paExpr1->acceptInterface(this);
00679    m_stmt.appendOperand(WQLOperand(false, WQL_BOOLEAN_VALUE_TAG));
00680    m_stmt.appendOperation(WQL_NE);
00681 }
00682 void WQLSelectStatementGen::visit_aExpr_aExpr_IS_FALSEP(
00683    const aExpr_aExpr_IS_FALSEP* paExpr_aExpr_IS_FALSEP
00684    )
00685 {
00686    paExpr_aExpr_IS_FALSEP->m_paExpr1->acceptInterface(this);
00687    m_stmt.appendOperand(WQLOperand(false, WQL_BOOLEAN_VALUE_TAG));
00688    m_stmt.appendOperation(WQL_EQ);
00689 }
00690 void WQLSelectStatementGen::visit_aExpr_aExpr_IS_NOT_TRUEP(
00691    const aExpr_aExpr_IS_NOT_TRUEP* paExpr_aExpr_IS_NOT_TRUEP
00692    )
00693 {
00694    paExpr_aExpr_IS_NOT_TRUEP->m_paExpr1->acceptInterface(this);
00695    m_stmt.appendOperand(WQLOperand(true, WQL_BOOLEAN_VALUE_TAG));
00696    m_stmt.appendOperation(WQL_NE);
00697 }
00698 void WQLSelectStatementGen::visit_aExpr_aExpr_ISA_aExpr(
00699       const aExpr_aExpr_ISA_aExpr* paExpr_aExpr_ISA_aExpr
00700       )
00701 {
00702    paExpr_aExpr_ISA_aExpr->m_paExpr1->acceptInterface(this);
00703    paExpr_aExpr_ISA_aExpr->m_paExpr3->acceptInterface(this);
00704    m_stmt.appendOperation(WQL_ISA);
00705 }
00706 void WQLSelectStatementGen::visit_aExpr_rowExpr(
00707    const aExpr_rowExpr*
00708    )
00709 {
00710    OW_THROWCIM(CIMException::INVALID_QUERY);
00711 }
00712 void WQLSelectStatementGen::visit_bExpr_cExpr(
00713    const bExpr_cExpr* pbExpr_cExpr
00714    )
00715 {
00716    pbExpr_cExpr->m_pcExpr1->acceptInterface(this);
00717 }
00718 void WQLSelectStatementGen::visit_bExpr_PLUS_bExpr(
00719    const bExpr_PLUS_bExpr*
00720    )
00721 {
00722    OW_THROWCIM(CIMException::INVALID_QUERY);
00723 }
00724 void WQLSelectStatementGen::visit_bExpr_MINUS_bExpr(
00725    const bExpr_MINUS_bExpr*
00726    )
00727 {
00728    OW_THROWCIM(CIMException::INVALID_QUERY);
00729 }
00730 void WQLSelectStatementGen::visit_bExpr_BITINVERT_bExpr(
00731    const bExpr_BITINVERT_bExpr*
00732    )
00733 {
00734    OW_THROWCIM(CIMException::INVALID_QUERY);
00735 }
00736 void WQLSelectStatementGen::visit_bExpr_bExpr_PLUS_bExpr(
00737    const bExpr_bExpr_PLUS_bExpr*
00738    )
00739 {
00740    OW_THROWCIM(CIMException::INVALID_QUERY);
00741 }
00742 void WQLSelectStatementGen::visit_bExpr_bExpr_MINUS_bExpr(
00743    const bExpr_bExpr_MINUS_bExpr*
00744    )
00745 {
00746    OW_THROWCIM(CIMException::INVALID_QUERY);
00747 }
00748 void WQLSelectStatementGen::visit_bExpr_bExpr_ASTERISK_bExpr(
00749    const bExpr_bExpr_ASTERISK_bExpr*
00750    )
00751 {
00752    OW_THROWCIM(CIMException::INVALID_QUERY);
00753 }
00754 void WQLSelectStatementGen::visit_bExpr_bExpr_SOLIDUS_bExpr(
00755    const bExpr_bExpr_SOLIDUS_bExpr*
00756    )
00757 {
00758    OW_THROWCIM(CIMException::INVALID_QUERY);
00759 }
00760 void WQLSelectStatementGen::visit_bExpr_bExpr_PERCENT_bExpr(
00761    const bExpr_bExpr_PERCENT_bExpr*
00762    )
00763 {
00764    OW_THROWCIM(CIMException::INVALID_QUERY);
00765 }
00766 void WQLSelectStatementGen::visit_bExpr_bExpr_BITAND_bExpr(
00767    const bExpr_bExpr_BITAND_bExpr*
00768    )
00769 {
00770    OW_THROWCIM(CIMException::INVALID_QUERY);
00771 }
00772 void WQLSelectStatementGen::visit_bExpr_bExpr_BITOR_bExpr(
00773    const bExpr_bExpr_BITOR_bExpr*
00774    )
00775 {
00776    OW_THROWCIM(CIMException::INVALID_QUERY);
00777 }
00778 void WQLSelectStatementGen::visit_bExpr_bExpr_BITSHIFTLEFT_bExpr(
00779    const bExpr_bExpr_BITSHIFTLEFT_bExpr*
00780    )
00781 {
00782    OW_THROWCIM(CIMException::INVALID_QUERY);
00783 }
00784 void WQLSelectStatementGen::visit_bExpr_bExpr_BITSHIFTRIGHT_bExpr(
00785    const bExpr_bExpr_BITSHIFTRIGHT_bExpr*
00786    )
00787 {
00788    OW_THROWCIM(CIMException::INVALID_QUERY);
00789 }
00790 void WQLSelectStatementGen::visit_bExpr_bExpr_LESSTHAN_bExpr(
00791    const bExpr_bExpr_LESSTHAN_bExpr*
00792    )
00793 {
00794    OW_THROWCIM(CIMException::INVALID_QUERY);
00795 }
00796 void WQLSelectStatementGen::visit_bExpr_bExpr_LESSTHANOREQUALS_bExpr(
00797    const bExpr_bExpr_LESSTHANOREQUALS_bExpr*
00798    )
00799 {
00800    OW_THROWCIM(CIMException::INVALID_QUERY);
00801 }
00802 void WQLSelectStatementGen::visit_bExpr_bExpr_GREATERTHAN_bExpr(
00803    const bExpr_bExpr_GREATERTHAN_bExpr*
00804    )
00805 {
00806    OW_THROWCIM(CIMException::INVALID_QUERY);
00807 }
00808 void WQLSelectStatementGen::visit_bExpr_bExpr_GREATERTHANOREQUALS_bExpr(
00809    const bExpr_bExpr_GREATERTHANOREQUALS_bExpr*
00810    )
00811 {
00812    OW_THROWCIM(CIMException::INVALID_QUERY);
00813 }
00814 void WQLSelectStatementGen::visit_bExpr_bExpr_EQUALS_bExpr(
00815    const bExpr_bExpr_EQUALS_bExpr*
00816    )
00817 {
00818    OW_THROWCIM(CIMException::INVALID_QUERY);
00819 }
00820 void WQLSelectStatementGen::visit_bExpr_bExpr_NOTEQUALS_bExpr(
00821    const bExpr_bExpr_NOTEQUALS_bExpr*
00822    )
00823 {
00824    OW_THROWCIM(CIMException::INVALID_QUERY);
00825 }
00826 void WQLSelectStatementGen::visit_bExpr_bExpr_CONCATENATION_bExpr(
00827    const bExpr_bExpr_CONCATENATION_bExpr*
00828    )
00829 {
00830    OW_THROWCIM(CIMException::INVALID_QUERY);
00831 }
00832 void WQLSelectStatementGen::visit_cExpr_attr(
00833    const cExpr_attr* pcExpr_attr
00834    )
00835 {
00836    pcExpr_attr->m_pattr1->acceptInterface(this);
00837 }
00838 void WQLSelectStatementGen::visit_cExpr_strColId_optIndirection(
00839    const cExpr_strColId_optIndirection* pcExpr_strColId_optIndirection
00840    )
00841 {
00842    if (m_isPropertyList)
00843    {
00844       m_stmt.appendSelectPropertyName(*pcExpr_strColId_optIndirection->m_pstrColId1);
00845    }
00846    else
00847    {
00848       m_stmt.appendOperand(WQLOperand(*pcExpr_strColId_optIndirection->m_pstrColId1, WQL_PROPERTY_NAME_TAG));
00849       m_stmt.appendWherePropertyName(*pcExpr_strColId_optIndirection->m_pstrColId1);
00850    }
00851    if (pcExpr_strColId_optIndirection->m_poptIndirection2)
00852    {
00853       pcExpr_strColId_optIndirection->m_poptIndirection2->acceptInterface(this);
00854    }
00855 }
00856 void WQLSelectStatementGen::visit_cExpr_aExprConst(
00857    const cExpr_aExprConst* pcExpr_aExprConst
00858    )
00859 {
00860    pcExpr_aExprConst->m_paExprConst1->acceptInterface(this);
00861 }
00862 void WQLSelectStatementGen::visit_cExpr_LEFTPAREN_aExpr_RIGHTPAREN(
00863    const cExpr_LEFTPAREN_aExpr_RIGHTPAREN* pcExpr_LEFTPAREN_aExpr_RIGHTPAREN
00864    )
00865 {
00866    pcExpr_LEFTPAREN_aExpr_RIGHTPAREN->m_paExpr2->acceptInterface(this);
00867 }
00868 void WQLSelectStatementGen::visit_cExpr_strFuncName_LEFTPAREN_RIGHTPAREN(
00869    const cExpr_strFuncName_LEFTPAREN_RIGHTPAREN* pcExpr_strFuncName_LEFTPAREN_RIGHTPAREN
00870    )
00871 {
00872    OW_THROWCIM(CIMException::INVALID_QUERY);
00873 }
00874 void WQLSelectStatementGen::visit_cExpr_strFuncName_LEFTPAREN_exprSeq_RIGHTPAREN(
00875    const cExpr_strFuncName_LEFTPAREN_exprSeq_RIGHTPAREN*
00876    )
00877 {
00878    OW_THROWCIM(CIMException::INVALID_QUERY);
00879 }
00880 void WQLSelectStatementGen::visit_cExpr_strFuncName_LEFTPAREN_ALL_exprSeq_RIGHTPAREN(
00881    const cExpr_strFuncName_LEFTPAREN_ALL_exprSeq_RIGHTPAREN*
00882    )
00883 {
00884    OW_THROWCIM(CIMException::INVALID_QUERY);
00885 }
00886 void WQLSelectStatementGen::visit_cExpr_strFuncName_LEFTPAREN_DISTINCT_exprSeq_RIGHTPAREN(
00887    const cExpr_strFuncName_LEFTPAREN_DISTINCT_exprSeq_RIGHTPAREN*
00888    )
00889 {
00890    OW_THROWCIM(CIMException::INVALID_QUERY);
00891 }
00892 void WQLSelectStatementGen::visit_cExpr_strFuncName_LEFTPAREN_ASTERISK_RIGHTPAREN(
00893    const cExpr_strFuncName_LEFTPAREN_ASTERISK_RIGHTPAREN*
00894    )
00895 {
00896    OW_THROWCIM(CIMException::INVALID_QUERY);
00897 }
00898 void WQLSelectStatementGen::visit_cExpr_CURRENTDATE(
00899    const cExpr_CURRENTDATE*
00900    )
00901 {
00902    OW_THROWCIM(CIMException::INVALID_QUERY);
00903 }
00904 void WQLSelectStatementGen::visit_cExpr_CURRENTTIME(
00905    const cExpr_CURRENTTIME*
00906    )
00907 {
00908    OW_THROWCIM(CIMException::INVALID_QUERY);
00909 }
00910 void WQLSelectStatementGen::visit_cExpr_CURRENTTIME_LEFTPAREN_ICONST_RIGHTPAREN(
00911    const cExpr_CURRENTTIME_LEFTPAREN_ICONST_RIGHTPAREN*
00912    )
00913 {
00914    OW_THROWCIM(CIMException::INVALID_QUERY);
00915 }
00916 void WQLSelectStatementGen::visit_cExpr_CURRENTTIMESTAMP(
00917    const cExpr_CURRENTTIMESTAMP*
00918    )
00919 {
00920    OW_THROWCIM(CIMException::INVALID_QUERY);
00921 }
00922 void WQLSelectStatementGen::visit_cExpr_CURRENTTIMESTAMP_LEFTPAREN_ICONST_RIGHTPAREN(
00923    const cExpr_CURRENTTIMESTAMP_LEFTPAREN_ICONST_RIGHTPAREN*
00924    )
00925 {
00926    OW_THROWCIM(CIMException::INVALID_QUERY);
00927 }
00928 void WQLSelectStatementGen::visit_cExpr_CURRENTUSER(
00929    const cExpr_CURRENTUSER*
00930    )
00931 {
00932    OW_THROWCIM(CIMException::INVALID_QUERY);
00933 }
00934 void WQLSelectStatementGen::visit_cExpr_SESSIONUSER(
00935    const cExpr_SESSIONUSER*
00936    )
00937 {
00938    OW_THROWCIM(CIMException::INVALID_QUERY);
00939 }
00940 void WQLSelectStatementGen::visit_cExpr_USER(
00941    const cExpr_USER*
00942    )
00943 {
00944    OW_THROWCIM(CIMException::INVALID_QUERY);
00945 }
00946 void WQLSelectStatementGen::visit_cExpr_EXTRACT_LEFTPAREN_optExtract_RIGHTPAREN(
00947    const cExpr_EXTRACT_LEFTPAREN_optExtract_RIGHTPAREN*
00948    )
00949 {
00950    OW_THROWCIM(CIMException::INVALID_QUERY);
00951 }
00952 void WQLSelectStatementGen::visit_cExpr_POSITION_LEFTPAREN_positionExpr_RIGHTPAREN(
00953    const cExpr_POSITION_LEFTPAREN_positionExpr_RIGHTPAREN*
00954    )
00955 {
00956    OW_THROWCIM(CIMException::INVALID_QUERY);
00957 }
00958 void WQLSelectStatementGen::visit_cExpr_SUBSTRING_LEFTPAREN_optSubstrExpr_RIGHTPAREN(
00959    const cExpr_SUBSTRING_LEFTPAREN_optSubstrExpr_RIGHTPAREN*
00960    )
00961 {
00962    OW_THROWCIM(CIMException::INVALID_QUERY);
00963 }
00964 void WQLSelectStatementGen::visit_cExpr_TRIM_LEFTPAREN_LEADING_trimExpr_RIGHTPAREN(
00965    const cExpr_TRIM_LEFTPAREN_LEADING_trimExpr_RIGHTPAREN*
00966    )
00967 {
00968    OW_THROWCIM(CIMException::INVALID_QUERY);
00969 }
00970 void WQLSelectStatementGen::visit_cExpr_TRIM_LEFTPAREN_TRAILING_trimExpr_RIGHTPAREN(
00971    const cExpr_TRIM_LEFTPAREN_TRAILING_trimExpr_RIGHTPAREN*
00972    )
00973 {
00974    OW_THROWCIM(CIMException::INVALID_QUERY);
00975 }
00976 void WQLSelectStatementGen::visit_cExpr_TRIM_LEFTPAREN_trimExpr_RIGHTPAREN(
00977    const cExpr_TRIM_LEFTPAREN_trimExpr_RIGHTPAREN*
00978    )
00979 {
00980    OW_THROWCIM(CIMException::INVALID_QUERY);
00981 }
00982 void WQLSelectStatementGen::visit_optIndirection_empty(
00983    const optIndirection_empty* poptIndirection_empty
00984    )
00985 {
00986 }
00987 void WQLSelectStatementGen::visit_optIndirection_optIndirection_LEFTBRACKET_aExpr_RIGHTBRACKET(
00988    const optIndirection_optIndirection_LEFTBRACKET_aExpr_RIGHTBRACKET*
00989    )
00990 {
00991    OW_THROWCIM(CIMException::INVALID_QUERY);
00992 }
00993 void WQLSelectStatementGen::visit_optIndirection_optIndirection_LEFTBRACKET_aExpr_COLON_aExpr_RIGHTBRACKET(
00994    const optIndirection_optIndirection_LEFTBRACKET_aExpr_COLON_aExpr_RIGHTBRACKET*
00995    )
00996 {
00997    OW_THROWCIM(CIMException::INVALID_QUERY);
00998 }
00999 void WQLSelectStatementGen::visit_optExtract_empty(
01000    const optExtract_empty* poptExtract_empty
01001    )
01002 {
01003 }
01004 void WQLSelectStatementGen::visit_optExtract_strExtractArg_FROM_aExpr(
01005    const optExtract_strExtractArg_FROM_aExpr*
01006    )
01007 {
01008    OW_THROWCIM(CIMException::INVALID_QUERY);
01009 }
01010 void WQLSelectStatementGen::visit_positionExpr_bExpr_IN_bExpr(
01011    const positionExpr_bExpr_IN_bExpr*
01012    )
01013 {
01014    OW_THROWCIM(CIMException::INVALID_QUERY);
01015 }
01016 void WQLSelectStatementGen::visit_positionExpr_empty(
01017    const positionExpr_empty* ppositionExpr_empty
01018    )
01019 {
01020 }
01021 void WQLSelectStatementGen::visit_optSubstrExpr_empty(
01022    const optSubstrExpr_empty* poptSubstrExpr_empty
01023    )
01024 {
01025 }
01026 void WQLSelectStatementGen::visit_optSubstrExpr_aExpr_substrFrom_substrFor(
01027    const optSubstrExpr_aExpr_substrFrom_substrFor*
01028    )
01029 {
01030    OW_THROWCIM(CIMException::INVALID_QUERY);
01031 }
01032 void WQLSelectStatementGen::visit_optSubstrExpr_aExpr_substrFor_substrFrom(
01033    const optSubstrExpr_aExpr_substrFor_substrFrom*
01034    )
01035 {
01036    OW_THROWCIM(CIMException::INVALID_QUERY);
01037 }
01038 void WQLSelectStatementGen::visit_optSubstrExpr_aExpr_substrFrom(
01039    const optSubstrExpr_aExpr_substrFrom*
01040    )
01041 {
01042    OW_THROWCIM(CIMException::INVALID_QUERY);
01043 }
01044 void WQLSelectStatementGen::visit_optSubstrExpr_aExpr_substrFor(
01045    const optSubstrExpr_aExpr_substrFor*
01046    )
01047 {
01048    OW_THROWCIM(CIMException::INVALID_QUERY);
01049 }
01050 void WQLSelectStatementGen::visit_optSubstrExpr_exprSeq(
01051    const optSubstrExpr_exprSeq*
01052    )
01053 {
01054    OW_THROWCIM(CIMException::INVALID_QUERY);
01055 }
01056 void WQLSelectStatementGen::visit_substrFrom(
01057    const substrFrom*
01058    )
01059 {
01060    OW_THROWCIM(CIMException::INVALID_QUERY);
01061 }
01062 void WQLSelectStatementGen::visit_substrFor(
01063    const substrFor*
01064    )
01065 {
01066    OW_THROWCIM(CIMException::INVALID_QUERY);
01067 }
01068 void WQLSelectStatementGen::visit_trimExpr_aExpr_FROM_exprSeq(
01069    const trimExpr_aExpr_FROM_exprSeq*
01070    )
01071 {
01072    OW_THROWCIM(CIMException::INVALID_QUERY);
01073 }
01074 void WQLSelectStatementGen::visit_trimExpr_FROM_exprSeq(
01075    const trimExpr_FROM_exprSeq*
01076    )
01077 {
01078    OW_THROWCIM(CIMException::INVALID_QUERY);
01079 }
01080 void WQLSelectStatementGen::visit_trimExpr_exprSeq(
01081    const trimExpr_exprSeq*
01082    )
01083 {
01084    OW_THROWCIM(CIMException::INVALID_QUERY);
01085 }
01086 void WQLSelectStatementGen::visit_attr(
01087    const attr* pattr
01088    )
01089 {
01090    // This handles embedded properties or ClassName.PropertyName
01091    m_attrName = *pattr->m_pstrRelationName1;
01092    
01093    // This call may append onto m_attrName
01094    pattr->m_pattrs3->acceptInterface(this);
01095    if (m_isPropertyList)
01096    {
01097       m_stmt.appendSelectPropertyName(m_attrName);
01098    }
01099    else
01100    {
01101       m_stmt.appendOperand(WQLOperand(m_attrName, WQL_PROPERTY_NAME_TAG));
01102       m_stmt.appendWherePropertyName(m_attrName);
01103    }
01104       
01105    // TODO: What does indirection mean? Array index
01106    if (pattr->m_poptIndirection4)
01107    {
01108       pattr->m_poptIndirection4->acceptInterface(this);
01109    }
01110 }
01111 void WQLSelectStatementGen::visit_attrs_strAttrName(
01112    const attrs_strAttrName* pattrs_strAttrName
01113    )
01114 {
01115    m_attrName = m_attrName + "." + *pattrs_strAttrName->m_pstrAttrName1;
01116 }
01117 void WQLSelectStatementGen::visit_attrs_attrs_PERIOD_strAttrName(
01118    const attrs_attrs_PERIOD_strAttrName* pattrs_attrs_PERIOD_strAttrName
01119    )
01120 {
01121    // This handles embedded properties or ClassName.PropertyName
01122    pattrs_attrs_PERIOD_strAttrName->m_pattrs1->acceptInterface(this);
01123    m_attrName = m_attrName + "." + *pattrs_attrs_PERIOD_strAttrName->m_pstrAttrName3;
01124 }
01125 void WQLSelectStatementGen::visit_attrs_attrs_PERIOD_ASTERISK(
01126    const attrs_attrs_PERIOD_ASTERISK* pattrs_attrs_PERIOD_ASTERISK
01127    )
01128 {
01129    // This handles embedded properties or ClassName.PropertyName
01130    pattrs_attrs_PERIOD_ASTERISK->m_pattrs1->acceptInterface(this);
01131    m_attrName = m_attrName + ".*";
01132 }
01133 void WQLSelectStatementGen::visit_targetEl_aExpr_AS_strColLabel(
01134    const targetEl_aExpr_AS_strColLabel*
01135    )
01136 {
01137    OW_THROWCIM(CIMException::INVALID_QUERY);
01138 }
01139 void WQLSelectStatementGen::visit_targetEl_aExpr(
01140    const targetEl_aExpr* ptargetEl_aExpr
01141    )
01142 {
01143    // setting this causes appendSelectPropertyName to be called
01144    m_isPropertyList = true;
01145    ptargetEl_aExpr->m_paExpr1->acceptInterface(this);
01146    m_isPropertyList = false;
01147 }
01148 void WQLSelectStatementGen::visit_targetEl_strRelationName_PERIOD_ASTERISK(
01149    const targetEl_strRelationName_PERIOD_ASTERISK* ptargetEl_strRelationName_PERIOD_ASTERISK
01150    )
01151 {
01152    m_stmt.appendSelectPropertyName(*ptargetEl_strRelationName_PERIOD_ASTERISK->m_pstrRelationName1 + ".*");
01153    // this isn't correct because it could be an embedded property, we need to keep the relation name
01154    //m_stmt.appendSelectPropertyName("*");
01155 }
01156 void WQLSelectStatementGen::visit_targetEl_ASTERISK(
01157    const targetEl_ASTERISK*
01158    )
01159 {
01160    m_stmt.appendSelectPropertyName("*");
01161 }
01162 void WQLSelectStatementGen::visit_updateTargetEl(
01163    const updateTargetEl*
01164    )
01165 {
01166    OW_THROWCIM(CIMException::INVALID_QUERY);
01167 }
01168 void WQLSelectStatementGen::visit_aExprConst_ICONST(
01169    const aExprConst_ICONST* paExprConst_ICONST
01170    )
01171 {
01172    try
01173    {
01174       m_stmt.appendOperand(WQLOperand(paExprConst_ICONST->m_pICONST1->toInt64(), WQL_INTEGER_VALUE_TAG));
01175    }
01176    catch (const StringConversionException& e)
01177    {
01178       OW_THROWCIMMSG(CIMException::INVALID_QUERY, e.getMessage());
01179    }
01180 }
01181 void WQLSelectStatementGen::visit_aExprConst_FCONST(
01182    const aExprConst_FCONST* paExprConst_FCONST
01183    )
01184 {
01185    try
01186    {
01187       m_stmt.appendOperand(WQLOperand(paExprConst_FCONST->m_pFCONST1->toReal64(), WQL_DOUBLE_VALUE_TAG));
01188    }
01189    catch (const StringConversionException& e)
01190    {
01191       OW_THROWCIMMSG(CIMException::INVALID_QUERY, e.getMessage());
01192    }
01193 }
01194 void WQLSelectStatementGen::visit_aExprConst_SCONST(
01195    const aExprConst_SCONST* paExprConst_SCONST
01196    )
01197 {
01198    m_stmt.appendOperand(WQLOperand(WQLRemoveStringEscapes(*paExprConst_SCONST->m_pSCONST1), WQL_STRING_VALUE_TAG));
01199 }
01200 void WQLSelectStatementGen::visit_aExprConst_BITCONST(
01201    const aExprConst_BITCONST* paExprConst_BITCONST
01202    )
01203 {
01204    try
01205    {
01206       m_stmt.appendOperand(WQLOperand(paExprConst_BITCONST->m_pBITCONST1->toInt64(2), WQL_INTEGER_VALUE_TAG));
01207    }
01208    catch (const StringConversionException& e)
01209    {
01210       OW_THROWCIMMSG(CIMException::INVALID_QUERY, e.getMessage());
01211    }
01212 }
01213 void WQLSelectStatementGen::visit_aExprConst_HEXCONST(
01214    const aExprConst_HEXCONST* paExprConst_HEXCONST
01215    )
01216 {
01217    try
01218    {
01219       m_stmt.appendOperand(WQLOperand(paExprConst_HEXCONST->m_pHEXCONST1->toInt64(16), WQL_INTEGER_VALUE_TAG));
01220    }
01221    catch (const StringConversionException& e)
01222    {
01223       OW_THROWCIMMSG(CIMException::INVALID_QUERY, e.getMessage());
01224    }
01225 }
01226 void WQLSelectStatementGen::visit_aExprConst_TRUEP(
01227    const aExprConst_TRUEP*
01228    )
01229 {
01230    m_stmt.appendOperand(WQLOperand(true, WQL_BOOLEAN_VALUE_TAG));
01231 }
01232 void WQLSelectStatementGen::visit_aExprConst_FALSEP(
01233    const aExprConst_FALSEP*
01234    )
01235 {
01236    m_stmt.appendOperand(WQLOperand(false, WQL_BOOLEAN_VALUE_TAG));
01237 }
01238 void WQLSelectStatementGen::visit_aExprConst_NULLP(
01239    const aExprConst_NULLP*
01240    )
01241 {
01242    m_stmt.appendOperand(WQLOperand());  // WQLOperand defaults to NULL
01243 }
01244 
01245 } // end namespace OW_NAMESPACE
01246 

Generated on Thu Feb 9 08:48:18 2006 for openwbem by  doxygen 1.4.6