本文整理了Java中org.teiid.metadata.Table.<init>()
方法的一些代码示例,展示了Table.<init>()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Table.<init>()
方法的具体详情如下:
包路径:org.teiid.metadata.Table
类名称:Table
方法名:<init>
暂无
代码示例来源:origin: org.teiid/teiid-engine
public Table getTableForCreateColumn(String objectName, ResourceType type) {
if (!assertInEditMode(Mode.SCHEMA)) {
return new Table(); //return a dummy table;
}
Table table = (Table)getSchemaRecord(objectName, type);
assertGrant(Grant.Permission.Privilege.ALTER, Database.ResourceType.TABLE, table);
return table;
}
代码示例来源:origin: teiid/teiid
public Table getTableForCreateColumn(String objectName, ResourceType type) {
if (!assertInEditMode(Mode.SCHEMA)) {
return new Table(); //return a dummy table;
}
Table table = (Table)getSchemaRecord(objectName, type);
assertGrant(Grant.Permission.Privilege.ALTER, Database.ResourceType.TABLE, table);
return table;
}
代码示例来源:origin: org.teiid/teiid-engine
private static void setTableOptions(Table table) {
Map<String, String> props = table.getProperties();
setCommonProperties(table, props);
String value = props.remove(DDLConstants.MATERIALIZED);
if (value != null) {
table.setMaterialized(isTrue(value));
}
value = props.remove(DDLConstants.MATERIALIZED_TABLE);
if (value != null) {
Table mattable = new Table();
mattable.setName(value);
table.setMaterializedTable(mattable);
}
value = props.remove(DDLConstants.UPDATABLE);
if (value != null) {
table.setSupportsUpdate(isTrue(value));
}
value = props.remove(DDLConstants.CARDINALITY);
if (value != null) {
table.setCardinality(Long.valueOf(value));
}
}
代码示例来源:origin: teiid/teiid
private static void setTableOptions(Table table) {
Map<String, String> props = table.getProperties();
setCommonProperties(table, props);
String value = props.remove(DDLConstants.MATERIALIZED);
if (value != null) {
table.setMaterialized(isTrue(value));
}
value = props.remove(DDLConstants.MATERIALIZED_TABLE);
if (value != null) {
Table mattable = new Table();
mattable.setName(value);
table.setMaterializedTable(mattable);
}
value = props.remove(DDLConstants.UPDATABLE);
if (value != null) {
table.setSupportsUpdate(isTrue(value));
}
value = props.remove(DDLConstants.CARDINALITY);
if (value != null) {
table.setCardinality(Long.valueOf(value));
}
}
代码示例来源:origin: org.jboss.teiid/teiid-engine
private static void setTableOptions(Table table) {
Map<String, String> props = table.getProperties();
setCommonProperties(table, props);
String value = props.remove(DDLConstants.MATERIALIZED);
if (value != null) {
table.setMaterialized(isTrue(value));
}
value = props.remove(DDLConstants.MATERIALIZED_TABLE);
if (value != null) {
Table mattable = new Table();
mattable.setName(value);
table.setMaterializedTable(mattable);
}
value = props.remove(DDLConstants.UPDATABLE);
if (value != null) {
table.setSupportsUpdate(isTrue(value));
}
value = props.remove(DDLConstants.CARDINALITY);
if (value != null) {
table.setCardinality(Long.valueOf(value));
}
}
代码示例来源:origin: teiid/teiid
final Table table = new Table();
Table matTable = new Table();
matTable.setUUID(tokens.get(tokenIndex++));
table.setMaterializedTable(matTable);
matTable = new Table();
matTable.setUUID(tokens.get(tokenIndex++));
table.setMaterializedStageTable(matTable);
代码示例来源:origin: org.teiid/teiid-metadata
final Table table = new Table();
Table matTable = new Table();
matTable.setUUID(tokens.get(tokenIndex++));
table.setMaterializedTable(matTable);
matTable = new Table();
matTable.setUUID(tokens.get(tokenIndex++));
table.setMaterializedStageTable(matTable);
代码示例来源:origin: teiid/teiid
/**
* Create a physical group with default settings.
* @param name Name of physical group, must match model name
* @param model Associated model
* @return FakeMetadataObject Metadata object for group
*/
public static Table createPhysicalGroup(String name, Schema model, boolean fullyQualify) {
Table table = new Table();
table.setName(name);
model.addTable(table);
table.setSupportsUpdate(true);
table.setNameInSource((fullyQualify || name.lastIndexOf(".") == -1)? name : name.substring(name.lastIndexOf(".") + 1)); //$NON-NLS-1$ //$NON-NLS-2$
table.setTableType(org.teiid.metadata.Table.Type.Table);
return table;
}
代码示例来源:origin: teiid/teiid
/**
* Add a table with the given name to the model.
* @param name
* @return
* @throws MetadataException
*/
public Table addTable(String name) {
Table table = new Table();
table.setTableType(Table.Type.Table);
if (nameFormat != null) {
name = String.format(nameFormat, name);
}
if (renameAllDuplicates || renameDuplicateTables) {
name = checkForDuplicate(name, (s)->this.schema.getTable(s) != null, "Table"); //$NON-NLS-1$
}
table.setName(name);
setUUID(table);
this.schema.addTable(table);
table.setVirtual(!this.schema.isPhysical());
return table;
}
代码示例来源:origin: teiid/teiid
/**
* Create a virtual group with default settings.
*/
public static Table createVirtualGroup(String name, Schema model, QueryNode plan) {
Table table = new Table();
table.setName(name);
model.addTable(table);
table.setVirtual(true);
table.setTableType(org.teiid.metadata.Table.Type.View);
table.setSelectTransformation(plan.getQuery());
return table;
}
代码示例来源:origin: teiid/teiid
Mockito.stub(result.getAccessInfo()).toReturn(ai);
Table t = new Table();
t.setProperty(DataModifiable.DATA_TTL, "2");
ai.addAccessedObject(t);
Table t1 = new Table();
Schema s = new Schema();
t1.setParent(s);
代码示例来源:origin: org.jboss.teiid/teiid-engine
jj_consume_token(TABLE);
tableName = id(null);
table = new Table();
代码示例来源:origin: teiid/teiid
jj_consume_token(TABLE);
tableName = id(null);
table = new Table();
代码示例来源:origin: org.teiid/teiid-engine
jj_consume_token(TABLE);
tableName = id(null);
table = new Table();
代码示例来源:origin: teiid/teiid
@Test public void testCardinality() {
Table t = new Table();
assertEquals(-1, t.getCardinalityAsFloat(), 0);
t.setCardinality(1000);
assertEquals(1000, t.getCardinalityAsFloat(), 0);
t.setCardinality(100000111000111100l);
assertEquals(100000111000111100l/t.getCardinalityAsFloat(), 1, .01);
}
代码示例来源:origin: teiid/teiid
@Test public void testForeignTemp() {
Create create = new Create();
create.setTable(new GroupSymbol("tempTable")); //$NON-NLS-1$
create.setOn("source");
Table t = new Table();
t.setName("tempTable");
t.setUUID("tid:0");
Column c = new Column();
c.setName("x");
c.setUUID("tid:0");
Datatype string = SystemMetadata.getInstance().getRuntimeTypeMap().get("string");
c.setDatatype(string, true, 0);
t.addColumn(c);
c = new Column();
c.setName("y");
c.setUUID("tid:0");
Datatype decimal = SystemMetadata.getInstance().getRuntimeTypeMap().get("decimal");
c.setDatatype(decimal, true, 0);
t.addColumn(c);
t.setCardinality(10000);
create.setTableMetadata(t);
helpTest("create foreign temporary table tempTable (x string, y decimal) options (cardinality 10000) on source", "CREATE FOREIGN TEMPORARY TABLE tempTable (\n x string,\n y bigdecimal\n) OPTIONS (CARDINALITY 10000) ON 'source'", create); //$NON-NLS-1$ //$NON-NLS-2$
}
内容来源于网络,如有侵权,请联系作者删除!