use of org.jaxdb.www.ddlx_0_5.xLygluGCXAA.$Table in project java-bigtable by googleapis.
the class BigtableEmulatorRuleTest method testTableAdminClient.
@Test
public void testTableAdminClient() {
Table table = tableAdminStub.createTable(CreateTableRequest.newBuilder().setParent("projects/fake-project/instances/fake-instance").setTableId("fake-table").setTable(Table.newBuilder().putColumnFamilies("cf", ColumnFamily.getDefaultInstance())).build());
assertThat(table.getName()).isEqualTo("projects/fake-project/instances/fake-instance/tables/fake-table");
}
use of org.jaxdb.www.ddlx_0_5.xLygluGCXAA.$Table in project molgenis-emx2 by molgenis.
the class CrossSchemaReferenceExample method create.
public static void create(Schema schema1, Schema schema2) {
Table parent = schema1.create(table("Parent", column("name").setPkey(), column("hobby")));
parent.insert(row("name", "parent1", "hobby", "stamps"));
Table child = schema2.create(table("Child", column("name").setPkey(), column("parent").setType(REF).setRefSchema(schema1.getName()).setRefTable("Parent")));
child.insert(row("name", "child1", "parent", "parent1"));
Table pet = schema1.create(table("Pet", column("name").setPkey(), column("species")));
pet.insert(row("name", "pooky", "species", "cat"));
pet.insert(row("name", "spike", "species", "dog"));
Table petLover = schema2.create(table("PetLover", column("name").setPkey(), column("pets").setType(REF_ARRAY).setRefSchema(schema1.getName()).setRefTable("Pet")));
petLover.insert(row("name", "x", "pets", new String[] { "pooky", "spike" }));
Table cat = schema2.create(table("Mouse").setImportSchema(schema1.getName()).setInherit("Pet"));
cat.insert(row("name", "mickey", "species", "mouse"));
}
use of org.jaxdb.www.ddlx_0_5.xLygluGCXAA.$Table in project molgenis-emx2 by molgenis.
the class JsonLdExample method create.
public static void create(Schema schema) {
Table personTable = schema.create(table("Person").setSemantics("https://schema.org/docs/jsonldcontext.jsonld#Person").add(column("name").setPkey().setSemantics("https://schema.org/docs/jsonldcontext.jsonld#name"), column("jobTitle").setSemantics("https://schema.org/docs/jsonldcontext.jsonld#jobTitle").setRequired(true), column("telephone").setSemantics("https://schema.org/docs/jsonldcontext.jsonld#telephone"), column("url").setSemantics("https://schema.org/docs/jsonldcontext.jsonld#url")));
personTable.insert(row("name", "Jane Doe", "jobTitle", "Professor", "telephone", "(425) 123-4567", "url", "http://www.janedoe.com"), row("id", "2", "name", "Mary Stone", "jobTitle", "Cook"));
Table recipeTable = schema.create(table("Recipe").setSemantics("https://schema.org/docs/jsonldcontext.jsonld#Recipe").add(column("name").setPkey().setSemantics("https://schema.org/docs/jsonldcontext.jsonld#name"), column("author").setType(REF).setRefTable("Person").setSemantics("https://schema.org/docs/jsonldcontext.jsonld#author").setRequired(true), column("datePublished").setType(DATE).setSemantics("https://schema.org/docs/jsonldcontext.jsonld#datePublished").setRequired(true), column("prepTime").setSemantics("https://schema.org/docs/jsonldcontext.jsonld#prepTime").setRequired(true)));
recipeTable.insert(row("name", "Mary's Cookies", "author", "Mary Stone", "datePublished", "2018-03-10", "prepTime", "PT20M"));
}
use of org.jaxdb.www.ddlx_0_5.xLygluGCXAA.$Table in project molgenis-emx2 by molgenis.
the class ProductComponentPartsExample method populate.
public static void populate(Schema schema) {
Table partTable = schema.getTable(PART);
Row part1 = new Row().setString(NAME, FORMS).setInt(WEIGHT, 100);
Row part2 = new Row().setString(NAME, LOGIN).setInt(WEIGHT, 50);
partTable.insert(part1);
partTable.insert(part2);
Table componentTable = schema.getTable(COMPONENT);
Row component1 = new Row().setString(NAME, EXPLORER).setRefArray(PARTS, FORMS, LOGIN);
Row component2 = new Row().setString(NAME, NAVIGATOR).setRefArray(PARTS, LOGIN);
componentTable.insert(component1);
componentTable.insert(component2);
Table productTable = schema.getTable(PRODUCT);
Row product1 = new Row().setString(NAME, "molgenis").setRefArray(COMPONENTS, EXPLORER, NAVIGATOR);
productTable.insert(product1);
}
Aggregations