org.teiid.metadata.Table.setMaterialized()方法的使用及代码示例

x33g5p2x  于2022-01-30 转载在 其他  
字(8.8k)|赞(0)|评价(0)|浏览(229)

本文整理了Java中org.teiid.metadata.Table.setMaterialized()方法的一些代码示例,展示了Table.setMaterialized()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Table.setMaterialized()方法的具体详情如下:
包路径:org.teiid.metadata.Table
类名称:Table
方法名:setMaterialized

Table.setMaterialized介绍

暂无

代码示例

代码示例来源:origin: teiid/teiid

  1. private static void removeTableOption(String key, Table table) {
  2. if (table.getProperty(key, false) != null) {
  3. table.setProperty(key, null);
  4. }
  5. removeCommonProperty(key, table);
  6. if (key.equals(DDLConstants.MATERIALIZED)) {
  7. table.setMaterialized(false);
  8. }
  9. if (key.equals(DDLConstants.MATERIALIZED_TABLE)) {
  10. table.setMaterializedTable(null);
  11. }
  12. if (key.equals(DDLConstants.UPDATABLE)) {
  13. table.setSupportsUpdate(false);
  14. }
  15. if (key.equals(DDLConstants.CARDINALITY)) {
  16. table.setCardinality(-1);
  17. }
  18. }

代码示例来源:origin: teiid/teiid

  1. table.setSupportsUpdate(getBooleanValue(supportFlags[2]));
  2. if(includeMaterializationFlag(indexVersion)) {
  3. table.setMaterialized(getBooleanValue(supportFlags[3]));

代码示例来源:origin: org.teiid/teiid-runtime

  1. private Table add_matpg_datatype() {
  2. Table t = createView("matpg_datatype"); //$NON-NLS-1$
  3. addColumn("oid", DataTypeManager.DefaultDataTypes.INTEGER, t); //$NON-NLS-1$
  4. addColumn("typname", DataTypeManager.DefaultDataTypes.STRING, t); //$NON-NLS-1$
  5. addColumn("name", DataTypeManager.DefaultDataTypes.STRING, t); //$NON-NLS-1$
  6. addColumn("typlen", DataTypeManager.DefaultDataTypes.SHORT, t); //$NON-NLS-1$
  7. addColumn("typtype", DataTypeManager.DefaultDataTypes.CHAR, t); //$NON-NLS-1$
  8. addColumn("typbasetype", DataTypeManager.DefaultDataTypes.INTEGER, t); //$NON-NLS-1$
  9. addColumn("typtypmod", DataTypeManager.DefaultDataTypes.INTEGER, t); //$NON-NLS-1$
  10. addPrimaryKey("matpg_datatype_names", Arrays.asList("oid", "name"), t); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
  11. addIndex("matpg_datatype_ids", true, Arrays.asList("typname", "oid"), t); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
  12. 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$
  13. + " 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$
  14. + " 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$
  15. + " 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$
  16. + " 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$
  17. + " 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$
  18. + " 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$
  19. + " 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$
  20. + " 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$
  21. t.setSelectTransformation(transformation);
  22. t.setMaterialized(true);
  23. t.setProperty(MaterializationMetadataRepository.ALLOW_MATVIEW_MANAGEMENT, "true"); //$NON-NLS-1$
  24. return t;
  25. }

代码示例来源:origin: org.teiid/teiid-metadata

  1. table.setSupportsUpdate(getBooleanValue(supportFlags[2]));
  2. if(includeMaterializationFlag(indexVersion)) {
  3. table.setMaterialized(getBooleanValue(supportFlags[3]));

代码示例来源:origin: org.jboss.teiid/teiid-engine

  1. private static void removeTableOption(String key, Table table) {
  2. if (table.getProperty(key, false) != null) {
  3. table.setProperty(key, null);
  4. }
  5. removeCommonProperty(key, table);
  6. if (key.equals(DDLConstants.MATERIALIZED)) {
  7. table.setMaterialized(false);
  8. }
  9. if (key.equals(DDLConstants.MATERIALIZED_TABLE)) {
  10. table.setMaterializedTable(null);
  11. }
  12. if (key.equals(DDLConstants.UPDATABLE)) {
  13. table.setSupportsUpdate(false);
  14. }
  15. if (key.equals(DDLConstants.CARDINALITY)) {
  16. table.setCardinality(-1);
  17. }
  18. }

代码示例来源:origin: org.teiid/teiid-runtime

  1. "pg_catalog.matpg_datatype pt ON t1.DataType = pt.Name WHERE kc.keytype in ('Primary', 'Unique', 'Index')"; //$NON-NLS-1$
  2. t.setSelectTransformation(transformation);
  3. t.setMaterialized(true);
  4. t.setProperty(MaterializationMetadataRepository.ALLOW_MATVIEW_MANAGEMENT, "true"); //$NON-NLS-1$
  5. return t;

代码示例来源:origin: teiid/teiid

  1. virtGroup.setMaterialized(true);
  2. virtGroup.setMaterializedTable(physGroup);
  3. virtGroup.setMaterializedStageTable(physGroupStage);
  4. virtGroupManaged.setMaterialized(true);
  5. virtGroupManaged.setMaterializedTable(physGroup);
  6. virtGroupManaged.setMaterializedStageTable(physGroupStage);
  7. vGroup2.setMaterialized(true);
  8. createElements(vGroup2,
  9. new String[] { "x" }, //$NON-NLS-1$
  10. fbi.addColumn(c);
  11. vGroup2a.getFunctionBasedIndexes().add(fbi);
  12. vGroup2.setMaterialized(true);
  13. createElements(vGroup2a,
  14. new String[] { "x" }, //$NON-NLS-1$
  15. vGroup3.setMaterialized(true);
  16. List<Column> vElements3 = createElements(vGroup3,
  17. new String[] { "x", "y" }, //$NON-NLS-1$
  18. Table vGroup4 = createVirtualGroup("VGroup4", virtModel, vTrans4); //$NON-NLS-1$
  19. vGroup4.setProperty(MaterializationMetadataRepository.MATVIEW_TTL, "100"); //$NON-NLS-1$
  20. vGroup4.setMaterialized(true);
  21. createElements(vGroup4,
  22. new String[] { "x" }, //$NON-NLS-1$
  23. + "union all SELECT ifnull(x, ' ') || 'd', 'w' || substring(x, 2) as y, 1 as z FROM matsrc");

代码示例来源:origin: org.teiid/teiid-engine

  1. private static void removeTableOption(String key, Table table) {
  2. if (table.getProperty(key, false) != null) {
  3. table.setProperty(key, null);
  4. }
  5. removeCommonProperty(key, table);
  6. if (key.equals(DDLConstants.MATERIALIZED)) {
  7. table.setMaterialized(false);
  8. }
  9. if (key.equals(DDLConstants.MATERIALIZED_TABLE)) {
  10. table.setMaterializedTable(null);
  11. }
  12. if (key.equals(DDLConstants.UPDATABLE)) {
  13. table.setSupportsUpdate(false);
  14. }
  15. if (key.equals(DDLConstants.CARDINALITY)) {
  16. table.setCardinality(-1);
  17. }
  18. }

代码示例来源:origin: org.teiid/teiid-runtime

  1. "FROM Sys.KeyColumns as t1 GROUP BY t1.TableUID, t1.uid, t1.KeyType, t1.KeyName"; //$NON-NLS-1$
  2. t.setSelectTransformation(transformation);
  3. t.setMaterialized(true);
  4. return t;

代码示例来源:origin: org.teiid/teiid-engine

  1. private static void setTableOptions(Table table) {
  2. Map<String, String> props = table.getProperties();
  3. setCommonProperties(table, props);
  4. String value = props.remove(DDLConstants.MATERIALIZED);
  5. if (value != null) {
  6. table.setMaterialized(isTrue(value));
  7. }
  8. value = props.remove(DDLConstants.MATERIALIZED_TABLE);
  9. if (value != null) {
  10. Table mattable = new Table();
  11. mattable.setName(value);
  12. table.setMaterializedTable(mattable);
  13. }
  14. value = props.remove(DDLConstants.UPDATABLE);
  15. if (value != null) {
  16. table.setSupportsUpdate(isTrue(value));
  17. }
  18. value = props.remove(DDLConstants.CARDINALITY);
  19. if (value != null) {
  20. table.setCardinality(Long.valueOf(value));
  21. }
  22. }

代码示例来源:origin: org.teiid/teiid-runtime

  1. "' 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$
  2. t.setSelectTransformation(transformation);
  3. t.setMaterialized(true);
  4. t.setProperty(MaterializationMetadataRepository.ALLOW_MATVIEW_MANAGEMENT, "true"); //$NON-NLS-1$
  5. return t;

代码示例来源:origin: teiid/teiid

  1. private static void setTableOptions(Table table) {
  2. Map<String, String> props = table.getProperties();
  3. setCommonProperties(table, props);
  4. String value = props.remove(DDLConstants.MATERIALIZED);
  5. if (value != null) {
  6. table.setMaterialized(isTrue(value));
  7. }
  8. value = props.remove(DDLConstants.MATERIALIZED_TABLE);
  9. if (value != null) {
  10. Table mattable = new Table();
  11. mattable.setName(value);
  12. table.setMaterializedTable(mattable);
  13. }
  14. value = props.remove(DDLConstants.UPDATABLE);
  15. if (value != null) {
  16. table.setSupportsUpdate(isTrue(value));
  17. }
  18. value = props.remove(DDLConstants.CARDINALITY);
  19. if (value != null) {
  20. table.setCardinality(Long.valueOf(value));
  21. }
  22. }

代码示例来源:origin: org.jboss.teiid/teiid-engine

  1. private static void setTableOptions(Table table) {
  2. Map<String, String> props = table.getProperties();
  3. setCommonProperties(table, props);
  4. String value = props.remove(DDLConstants.MATERIALIZED);
  5. if (value != null) {
  6. table.setMaterialized(isTrue(value));
  7. }
  8. value = props.remove(DDLConstants.MATERIALIZED_TABLE);
  9. if (value != null) {
  10. Table mattable = new Table();
  11. mattable.setName(value);
  12. table.setMaterializedTable(mattable);
  13. }
  14. value = props.remove(DDLConstants.UPDATABLE);
  15. if (value != null) {
  16. table.setSupportsUpdate(isTrue(value));
  17. }
  18. value = props.remove(DDLConstants.CARDINALITY);
  19. if (value != null) {
  20. table.setCardinality(Long.valueOf(value));
  21. }
  22. }

相关文章