use of org.teiid.translator.couchbase.CouchbaseMetadataProcessor in project teiid by teiid.
the class TestCouchbaseMetadataProcessor method testProcedures.
@Test
public void testProcedures() throws ResourceException {
CouchbaseMetadataProcessor metadataProcessor = new CouchbaseMetadataProcessor();
MetadataFactory mf = new MetadataFactory("vdb", 1, "couchbase", SystemMetadata.getInstance().getRuntimeTypeMap(), new Properties(), null);
metadataProcessor.addProcedures(mf, null);
helpTest("procedures.expected", mf);
}
use of org.teiid.translator.couchbase.CouchbaseMetadataProcessor in project teiid by teiid.
the class TestCouchbaseMetadataProcessor method testComplexJson.
@Test
public void testComplexJson() throws ResourceException {
CouchbaseMetadataProcessor mp = new CouchbaseMetadataProcessor();
MetadataFactory mf = new MetadataFactory("vdb", 1, "couchbase", SystemMetadata.getInstance().getRuntimeTypeMap(), new Properties(), null);
Table table = createTable(mf, KEYSPACE, KEYSPACE);
mp.scanRow(KEYSPACE, KEYSPACE_SOURCE, complexJson(), mf, table, KEYSPACE, false, new Dimension());
helpTest("complexJson.expected", mf);
}
use of org.teiid.translator.couchbase.CouchbaseMetadataProcessor in project teiid by teiid.
the class TestCouchbaseMetadataProcessor method testCustomerOrderWithTypedName.
@Test
public void testCustomerOrderWithTypedName() throws ResourceException {
CouchbaseMetadataProcessor mp = new CouchbaseMetadataProcessor();
mp.setTypeNameList("`test`:`type`,`beer-sample`:`type`,` travel-sample`:`type`");
MetadataFactory mf = new MetadataFactory("vdb", 1, "couchbase", SystemMetadata.getInstance().getRuntimeTypeMap(), new Properties(), null);
Table customer = createTable(mf, KEYSPACE, "Customer");
mp.scanRow(KEYSPACE, KEYSPACE_SOURCE, formCustomer(), mf, customer, customer.getName(), false, new Dimension());
Table order = createTable(mf, KEYSPACE, "Oder");
mp.scanRow(KEYSPACE, KEYSPACE_SOURCE, formOder(), mf, order, order.getName(), false, new Dimension());
helpTest("customerOrderTypedName.expected", mf);
}
use of org.teiid.translator.couchbase.CouchbaseMetadataProcessor in project teiid by teiid.
the class TestCouchbaseMetadataProcessor method testJsonNestedArray.
@Test
public void testJsonNestedArray() throws ResourceException {
CouchbaseMetadataProcessor mp = new CouchbaseMetadataProcessor();
MetadataFactory mf = new MetadataFactory("vdb", 1, "couchbase", SystemMetadata.getInstance().getRuntimeTypeMap(), new Properties(), null);
Table table = createTable(mf, KEYSPACE, KEYSPACE);
mp.scanRow(KEYSPACE, KEYSPACE_SOURCE, complexJsonNestedArray(), mf, table, KEYSPACE, false, new Dimension());
helpTest("complexJsonNestedArray.expected", mf);
}
use of org.teiid.translator.couchbase.CouchbaseMetadataProcessor in project teiid by teiid.
the class TestCouchbaseMetadataProcessor method testCustomerOrderMultiple.
@Test
public void testCustomerOrderMultiple() throws ResourceException {
CouchbaseMetadataProcessor mp = new CouchbaseMetadataProcessor();
MetadataFactory mf = new MetadataFactory("vdb", 1, "couchbase", SystemMetadata.getInstance().getRuntimeTypeMap(), new Properties(), null);
Table table = createTable(mf, KEYSPACE, KEYSPACE);
mp.scanRow(KEYSPACE, KEYSPACE_SOURCE, formCustomer(), mf, table, KEYSPACE, false, new Dimension());
mp.scanRow(KEYSPACE, KEYSPACE_SOURCE, formOder(), mf, table, KEYSPACE, false, new Dimension());
mp.scanRow(KEYSPACE, KEYSPACE_SOURCE, formCustomer(), mf, table, KEYSPACE, false, new Dimension());
mp.scanRow(KEYSPACE, KEYSPACE_SOURCE, formOder(), mf, table, KEYSPACE, false, new Dimension());
helpTest("customerOrder.expected", mf);
}
Aggregations