static ImmutableList buildTablesColumnMetaData()

in src/main/java/software/amazon/documentdb/jdbc/DocumentDbDatabaseMetaDataResultSets.java [197:365]


    static ImmutableList<JdbcColumnMetaData> buildTablesColumnMetaData(
            final String schemaName) {
        if (tablesColumnMetaData == null) {
            // 1. TABLE_CAT String => table catalog (may be null)
            // 2. TABLE_SCHEM String => table schema (may be null)
            // 3. TABLE_NAME String => table name
            // 4. TABLE_TYPE String => table type. Typical types are "TABLE", "VIEW", "SYSTEM TABLE", "GLOBAL TEMPORARY", "LOCAL TEMPORARY", "ALIAS", "SYNONYM".
            // 5. REMARKS String => explanatory comment on the table
            // 6. TYPE_CAT String => the types catalog (may be null)
            // 7. TYPE_SCHEM String => the types schema (may be null)
            // 8. TYPE_NAME String => type name (may be null)
            // 9. SELF_REFERENCING_COL_NAME String => name of the designated "identifier" column of a typed table (may be null)
            // 10. REF_GENERATION String => specifies how values in SELF_REFERENCING_COL_NAME are created. Values are "SYSTEM", "USER", "DERIVED". (may be null)
            int ordinal = 0;
            tablesColumnMetaData = ImmutableList.<JdbcColumnMetaData>builder()
                    .add(new JdbcColumnMetaData(
                            ordinal++,
                            true, //caseSensitive,
                            ResultSetMetaData.columnNullable, //nullable,
                            false, //signed,
                            64, //displaySize,
                            "TABLE_CAT", //label,
                            "TABLE_CAT", //columnName,
                            schemaName, //schemaName,
                            0, //precision,
                            0, //scale,
                            Types.VARCHAR, //type.id,
                            JdbcType.VARCHAR.name(), //type.name,
                            String.class.getName()) //columnClassName
                    )
                    .add(new JdbcColumnMetaData(
                            ordinal++,
                            true, //caseSensitive,
                            ResultSetMetaData.columnNullable, //nullable,
                            false, //signed,
                            64, //displaySize,
                            "TABLE_SCHEM", //label,
                            "TABLE_SCHEM", //columnName,
                            schemaName, //schemaName,
                            0, //precision,
                            0, //scale,
                            Types.VARCHAR, //type.id,
                            JdbcType.VARCHAR.name(), //type.name,
                            String.class.getName()) //columnClassName
                    )
                    .add(new JdbcColumnMetaData(
                            ordinal++,
                            true, //caseSensitive,
                            ResultSetMetaData.columnNoNulls, //nullable,
                            false, //signed,
                            64, //displaySize,
                            "TABLE_NAME", //label,
                            "TABLE_NAME", //columnName,
                            schemaName, //schemaName,
                            0, //precision,
                            0, //scale,
                            Types.VARCHAR, //type.id,
                            JdbcType.VARCHAR.name(), //type.name,
                            String.class.getName()) //columnClassName
                    )
                    .add(new JdbcColumnMetaData(
                            ordinal++,
                            false, //caseSensitive,
                            ResultSetMetaData.columnNoNulls, //nullable,
                            false, //signed,
                            64, //displaySize,
                            "TABLE_TYPE", //label,
                            "TABLE_TYPE", //columnName,
                            schemaName, //schemaName,
                            0, //precision,
                            0, //scale,
                            Types.VARCHAR, //type.id,
                            JdbcType.VARCHAR.name(), //type.name,
                            String.class.getName()) //columnClassName
                    )
                    .add(new JdbcColumnMetaData(
                            ordinal++,
                            true, //caseSensitive,
                            ResultSetMetaData.columnNoNulls, //nullable,
                            false, //signed,
                            64, //displaySize,
                            "REMARKS", //label,
                            "REMARKS", //columnName,
                            schemaName, //schemaName,
                            0, //precision,
                            0, //scale,
                            Types.VARCHAR, //type.id,
                            JdbcType.VARCHAR.name(), //type.name,
                            String.class.getName()) //columnClassName
                    )
                    .add(new JdbcColumnMetaData(
                            ordinal++,
                            true, //caseSensitive,
                            ResultSetMetaData.columnNullable, //nullable,
                            false, //signed,
                            64, //displaySize,
                            "TYPE_CAT", //label,
                            "TYPE_CAT", //columnName,
                            schemaName, //schemaName,
                            0, //precision,
                            0, //scale,
                            Types.VARCHAR, //type.id,
                            JdbcType.VARCHAR.name(), //type.name,
                            String.class.getName()) //columnClassName
                    )
                    .add(new JdbcColumnMetaData(
                            ordinal++,
                            true, //caseSensitive,
                            ResultSetMetaData.columnNullable, //nullable,
                            false, //signed,
                            64, //displaySize,
                            "TYPE_SCHEM", //label,
                            "TYPE_SCHEM", //columnName,
                            schemaName, //schemaName,
                            0, //precision,
                            0, //scale,
                            Types.VARCHAR, //type.id,
                            JdbcType.VARCHAR.name(), //type.name,
                            String.class.getName()) //columnClassName
                    )
                    .add(new JdbcColumnMetaData(
                            ordinal++,
                            true, //caseSensitive,
                            ResultSetMetaData.columnNullable, //nullable,
                            false, //signed,
                            64, //displaySize,
                            "TYPE_NAME", //label,
                            "TYPE_NAME", //columnName,
                            schemaName, //schemaName,
                            0, //precision,
                            0, //scale,
                            Types.VARCHAR, //type.id,
                            JdbcType.VARCHAR.name(), //type.name,
                            String.class.getName()) //columnClassName
                    )
                    .add(new JdbcColumnMetaData(
                            ordinal++,
                            true, //caseSensitive,
                            ResultSetMetaData.columnNullable, //nullable,
                            false, //signed,
                            64, //displaySize,
                            "SELF_REFERENCING_COL_NAME", //label,
                            "SELF_REFERENCING_COL_NAME", //columnName,
                            schemaName, //schemaName,
                            0, //precision,
                            0, //scale,
                            Types.VARCHAR, //type.id,
                            JdbcType.VARCHAR.name(), //type.name,
                            String.class.getName()) //columnClassName
                    )
                    .add(new JdbcColumnMetaData(
                            ordinal, // not incremented
                            false, //caseSensitive,
                            ResultSetMetaData.columnNullable, //nullable,
                            false, //signed,
                            64, //displaySize,
                            "REF_GENERATION", //label,
                            "REF_GENERATION", //columnName,
                            schemaName, //schemaName,
                            0, //precision,
                            0, //scale,
                            Types.VARCHAR, //type.id,
                            JdbcType.VARCHAR.name(), //type.name,
                            String.class.getName()) //columnClassName
                    )
                    .build();
        }
        return tablesColumnMetaData;
    }