Class FromStatement
java.lang.Object
com.invirgance.convirgance.jdbc.sql.FromStatement
- All Implemented Interfaces:
NamedSchema,SQLStatement
Creates the FROM clause for a SQL query with the provided
TabularStructure.
Additionally supports table aliasing with the "AS" syntax when a name is provided.
DatabaseSchemaLayout layout = new DatabaseSchemaLayout(driver, getHSQLDataSource());
Table table = layout.getCurrentSchema().getTable("customer");
FromStatement from = new FromStatement(layout, table);
- Author:
- jbanes
-
Constructor Summary
ConstructorsConstructorDescriptionFromStatement(DatabaseSchemaLayout layout, TabularStructure table) Creates the from statement using the provided layout andTabularStructure.FromStatement(DatabaseSchemaLayout layout, TabularStructure table, String name) Creates the from statement using the provided layout andTabularStructure. -
Method Summary
Modifier and TypeMethodDescriptiongetName()Get the schema name of this database objectIf this statement is part of a larger statement, this returns the parent statement.Get the schema name of this database object quoted for use in a SQL statementrender(SQLRenderer renderer) voidvoidsetParent(SQLStatement parent) toString()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.invirgance.convirgance.jdbc.sql.SQLStatement
query, query
-
Constructor Details
-
FromStatement
Creates the from statement using the provided layout andTabularStructure.- Parameters:
layout- Database layout.table- The table.
-
FromStatement
Creates the from statement using the provided layout andTabularStructure.- Parameters:
layout- Database layout.table- The table.name- The alias to use.
-
-
Method Details
-
getParent
Description copied from interface:SQLStatementIf this statement is part of a larger statement, this returns the parent statement.- Specified by:
getParentin interfaceSQLStatement- Returns:
- the parent statement
-
setParent
- Specified by:
setParentin interfaceSQLStatement
-
getName
Description copied from interface:NamedSchemaGet the schema name of this database object- Specified by:
getNamein interfaceNamedSchema- Returns:
- name of the object with exact database capitalization
-
setName
-
getQuotedName
Description copied from interface:NamedSchemaGet the schema name of this database object quoted for use in a SQL statement- Specified by:
getQuotedNamein interfaceNamedSchema- Returns:
- name of the object quoted for use in a SQL statement
-
render
- Specified by:
renderin interfaceSQLStatement
-
toString
-