本文整理了Java中org.teiid.metadata.Table.setMaterialized()
方法的一些代码示例,展示了Table.setMaterialized()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Table.setMaterialized()
方法的具体详情如下:
包路径:org.teiid.metadata.Table
类名称:Table
方法名:setMaterialized
暂无
代码示例来源:origin: teiid/teiid
private static void removeTableOption(String key, Table table) {
if (table.getProperty(key, false) != null) {
table.setProperty(key, null);
}
removeCommonProperty(key, table);
if (key.equals(DDLConstants.MATERIALIZED)) {
table.setMaterialized(false);
}
if (key.equals(DDLConstants.MATERIALIZED_TABLE)) {
table.setMaterializedTable(null);
}
if (key.equals(DDLConstants.UPDATABLE)) {
table.setSupportsUpdate(false);
}
if (key.equals(DDLConstants.CARDINALITY)) {
table.setCardinality(-1);
}
}
代码示例来源:origin: teiid/teiid
table.setSupportsUpdate(getBooleanValue(supportFlags[2]));
if(includeMaterializationFlag(indexVersion)) {
table.setMaterialized(getBooleanValue(supportFlags[3]));
代码示例来源:origin: org.teiid/teiid-runtime
private Table add_matpg_datatype() {
Table t = createView("matpg_datatype"); //$NON-NLS-1$
addColumn("oid", DataTypeManager.DefaultDataTypes.INTEGER, t); //$NON-NLS-1$
addColumn("typname", DataTypeManager.DefaultDataTypes.STRING, t); //$NON-NLS-1$
addColumn("name", DataTypeManager.DefaultDataTypes.STRING, t); //$NON-NLS-1$
addColumn("typlen", DataTypeManager.DefaultDataTypes.SHORT, t); //$NON-NLS-1$
addColumn("typtype", DataTypeManager.DefaultDataTypes.CHAR, t); //$NON-NLS-1$
addColumn("typbasetype", DataTypeManager.DefaultDataTypes.INTEGER, t); //$NON-NLS-1$
addColumn("typtypmod", DataTypeManager.DefaultDataTypes.INTEGER, t); //$NON-NLS-1$
addPrimaryKey("matpg_datatype_names", Arrays.asList("oid", "name"), t); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
addIndex("matpg_datatype_ids", true, Arrays.asList("typname", "oid"), t); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
String transformation = "select pt.oid as oid, pt.typname as typname, pt.teiid_name as name, pt.typlen, pt.typtype, pt.typbasetype, pt.typtypmod from pg_catalog.pg_type pt" //$NON-NLS-1$
+ " UNION ALL select pt.oid as oid, pt.typname as typname, 'char' as name, pt.typlen, pt.typtype, pt.typbasetype, pt.typtypmod from pg_catalog.pg_type pt where typname='bpchar'" //$NON-NLS-1$
+ " UNION ALL select pt.oid as oid, pt.typname as typname, 'byte' as name, pt.typlen, pt.typtype, pt.typbasetype, pt.typtypmod from pg_catalog.pg_type pt where typname='int2'" //$NON-NLS-1$
+ " UNION ALL select pt.oid as oid, pt.typname as typname, 'biginteger' as name, pt.typlen, pt.typtype, pt.typbasetype, pt.typtypmod from pg_catalog.pg_type pt where typname='numeric'" //$NON-NLS-1$
+ " UNION ALL select pt.oid as oid, pt.typname as typname, 'varbinary' as name, pt.typlen, pt.typtype, pt.typbasetype, pt.typtypmod from pg_catalog.pg_type pt where typname='bytea'" //$NON-NLS-1$
+ " UNION ALL select pt.oid as oid, pt.typname as typname, 'byte[]' as name, pt.typlen, pt.typtype, pt.typbasetype, pt.typtypmod from pg_catalog.pg_type pt where typname='_int2'" //$NON-NLS-1$
+ " UNION ALL select pt.oid as oid, pt.typname as typname, 'biginteger[]' as name, pt.typlen, pt.typtype, pt.typbasetype, pt.typtypmod from pg_catalog.pg_type pt where typname='_numeric'" //$NON-NLS-1$
+ " UNION ALL select pt.oid as oid, pt.typname as typname, 'varbinary[]' as name, pt.typlen, pt.typtype, pt.typbasetype, pt.typtypmod from pg_catalog.pg_type pt where typname='_bytea'" //$NON-NLS-1$
+ " UNION ALL select pt.oid as oid, pt.typname as typname, 'char[]' as name, pt.typlen, pt.typtype, pt.typbasetype, pt.typtypmod from pg_catalog.pg_type pt where typname='_bpchar'"; //$NON-NLS-1$
t.setSelectTransformation(transformation);
t.setMaterialized(true);
t.setProperty(MaterializationMetadataRepository.ALLOW_MATVIEW_MANAGEMENT, "true"); //$NON-NLS-1$
return t;
}
代码示例来源:origin: org.teiid/teiid-metadata
table.setSupportsUpdate(getBooleanValue(supportFlags[2]));
if(includeMaterializationFlag(indexVersion)) {
table.setMaterialized(getBooleanValue(supportFlags[3]));
代码示例来源:origin: org.jboss.teiid/teiid-engine
private static void removeTableOption(String key, Table table) {
if (table.getProperty(key, false) != null) {
table.setProperty(key, null);
}
removeCommonProperty(key, table);
if (key.equals(DDLConstants.MATERIALIZED)) {
table.setMaterialized(false);
}
if (key.equals(DDLConstants.MATERIALIZED_TABLE)) {
table.setMaterializedTable(null);
}
if (key.equals(DDLConstants.UPDATABLE)) {
table.setSupportsUpdate(false);
}
if (key.equals(DDLConstants.CARDINALITY)) {
table.setCardinality(-1);
}
}
代码示例来源:origin: org.teiid/teiid-runtime
"pg_catalog.matpg_datatype pt ON t1.DataType = pt.Name WHERE kc.keytype in ('Primary', 'Unique', 'Index')"; //$NON-NLS-1$
t.setSelectTransformation(transformation);
t.setMaterialized(true);
t.setProperty(MaterializationMetadataRepository.ALLOW_MATVIEW_MANAGEMENT, "true"); //$NON-NLS-1$
return t;
代码示例来源:origin: teiid/teiid
virtGroup.setMaterialized(true);
virtGroup.setMaterializedTable(physGroup);
virtGroup.setMaterializedStageTable(physGroupStage);
virtGroupManaged.setMaterialized(true);
virtGroupManaged.setMaterializedTable(physGroup);
virtGroupManaged.setMaterializedStageTable(physGroupStage);
vGroup2.setMaterialized(true);
createElements(vGroup2,
new String[] { "x" }, //$NON-NLS-1$
fbi.addColumn(c);
vGroup2a.getFunctionBasedIndexes().add(fbi);
vGroup2.setMaterialized(true);
createElements(vGroup2a,
new String[] { "x" }, //$NON-NLS-1$
vGroup3.setMaterialized(true);
List<Column> vElements3 = createElements(vGroup3,
new String[] { "x", "y" }, //$NON-NLS-1$
Table vGroup4 = createVirtualGroup("VGroup4", virtModel, vTrans4); //$NON-NLS-1$
vGroup4.setProperty(MaterializationMetadataRepository.MATVIEW_TTL, "100"); //$NON-NLS-1$
vGroup4.setMaterialized(true);
createElements(vGroup4,
new String[] { "x" }, //$NON-NLS-1$
+ "union all SELECT ifnull(x, ' ') || 'd', 'w' || substring(x, 2) as y, 1 as z FROM matsrc");
代码示例来源:origin: org.teiid/teiid-engine
private static void removeTableOption(String key, Table table) {
if (table.getProperty(key, false) != null) {
table.setProperty(key, null);
}
removeCommonProperty(key, table);
if (key.equals(DDLConstants.MATERIALIZED)) {
table.setMaterialized(false);
}
if (key.equals(DDLConstants.MATERIALIZED_TABLE)) {
table.setMaterializedTable(null);
}
if (key.equals(DDLConstants.UPDATABLE)) {
table.setSupportsUpdate(false);
}
if (key.equals(DDLConstants.CARDINALITY)) {
table.setCardinality(-1);
}
}
代码示例来源:origin: org.teiid/teiid-runtime
"FROM Sys.KeyColumns as t1 GROUP BY t1.TableUID, t1.uid, t1.KeyType, t1.KeyName"; //$NON-NLS-1$
t.setSelectTransformation(transformation);
t.setMaterialized(true);
return t;
代码示例来源: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: org.teiid/teiid-runtime
"' columns oid integer, typname string, typlen short, typtype char, typbasetype integer, typtypmod integer, typrelid integer, typelem integer, teiid_name string) AS t"; //$NON-NLS-1$
t.setSelectTransformation(transformation);
t.setMaterialized(true);
t.setProperty(MaterializationMetadataRepository.ALLOW_MATVIEW_MANAGEMENT, "true"); //$NON-NLS-1$
return t;
代码示例来源: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));
}
}
内容来源于网络,如有侵权,请联系作者删除!