Class JdbcTest.HrSchema

  • Enclosing class:
    JdbcTest

    public static class JdbcTest.HrSchema
    extends java.lang.Object
    A schema that contains two tables by reflection.

    Here is the SQL to create equivalent tables in Oracle:

     CREATE TABLE "emps" (
       "empid" INTEGER NOT NULL,
       "deptno" INTEGER NOT NULL,
       "name" VARCHAR2(10) NOT NULL,
       "salary" NUMBER(6, 2) NOT NULL,
       "commission" INTEGER);
     INSERT INTO "emps" VALUES (100, 10, 'Bill', 10000, 1000);
     INSERT INTO "emps" VALUES (200, 20, 'Eric', 8000, 500);
     INSERT INTO "emps" VALUES (150, 10, 'Sebastian', 7000, null);
     INSERT INTO "emps" VALUES (110, 10, 'Theodore', 11500, 250);
    
     CREATE TABLE "depts" (
       "deptno" INTEGER NOT NULL,
       "name" VARCHAR2(10) NOT NULL,
       "employees" ARRAY OF "Employee",
       "location" "Location");
     INSERT INTO "depts" VALUES (10, 'Sales', null, (-122, 38));
     INSERT INTO "depts" VALUES (30, 'Marketing', null, (0, 52));
     INSERT INTO "depts" VALUES (40, 'HR', null, null);
     
    • Constructor Detail

      • HrSchema

        public HrSchema()
    • Method Detail

      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • foo

        public org.apache.calcite.schema.QueryableTable foo​(int count)
      • view

        public org.apache.calcite.schema.TranslatableTable view​(java.lang.String s)