SQL parser: no "as" rule anymore; now as_clause and opt_as

Change-Id: Ib0c7151b311029318c213abb86e6541e3b27d040
This commit is contained in:
Lionel Elie Mamane
2013-01-23 15:30:33 +01:00
parent ce59b1b397
commit 5214bda61e
3 changed files with 19 additions and 6 deletions

View File

@@ -219,7 +219,8 @@ namespace connectivity
data_type,
column_def,
table_node,
as,
as_clause,
opt_as,
op_column_commalist,
table_primary_as_range_column,
datetime_primary,

View File

@@ -392,9 +392,19 @@ void OSQLParseNode::impl_parseNodeToString_throw(::rtl::OUStringBuffer& rString,
bHandled = impl_parseTableNameNodeToString_throw( rString, rParam );
break;
case as:
if ( rParam.aMetaData.generateASBeforeCorrelationName() )
rString.append(::rtl::OUString(" AS"));
case as_clause:
assert(nCount == 0 || nCount == 2);
if (nCount == 2)
{
if ( rParam.aMetaData.generateASBeforeCorrelationName() )
rString.append(::rtl::OUString(" AS "));
m_aChildren[1]->impl_parseNodeToString_throw( rString, rParam );
}
bHandled = true;
break;
case opt_as:
assert(nCount == 0);
bHandled = true;
break;
@@ -1386,7 +1396,8 @@ OSQLParser::OSQLParser(const ::com::sun::star::uno::Reference< ::com::sun::star:
{ OSQLParseNode::data_type, "data_type" },
{ OSQLParseNode::column_def, "column_def" },
{ OSQLParseNode::table_node, "table_node" },
{ OSQLParseNode::as, "as" },
{ OSQLParseNode::as_clause, "as_clause" },
{ OSQLParseNode::opt_as, "opt_as" },
{ OSQLParseNode::op_column_commalist, "op_column_commalist" },
{ OSQLParseNode::table_primary_as_range_column, "table_primary_as_range_column" },
{ OSQLParseNode::datetime_primary, "datetime_primary" },

View File

@@ -3388,7 +3388,8 @@ void OQueryDesignView::fillFunctionInfo( const ::connectivity::OSQLParseNode* p
case OSQLParseNode::data_type:
case OSQLParseNode::column_def:
case OSQLParseNode::table_node:
case OSQLParseNode::as: // Seems to never be generated?
case OSQLParseNode::as_clause:
case OSQLParseNode::opt_as:
case OSQLParseNode::op_column_commalist:
case OSQLParseNode::table_primary_as_range_column:
case OSQLParseNode::character_string_type: