1

I am trying to access the Information Schema views as defined in SQL92, and cannot find any in the CUBRID RDBMS. Has CUBRID implemented this specification and how can I access them?

CUBRID version: CUBRID 10.1, manual: https://www.cubrid.org/manual/en/10.1/

There is something called System Catalog: https://www.cubrid.org/manual/en/10.1/sql/catalog.html, is this possibly the same, and why is it not called "information_schema" as specified in the SQL92 specification?

When querying the database for my table book i get following:

SELECT * FROM db_class WHERE class_name LIKE 'book'; 

class_name = book
owner_name = DBA
class_type = CLASS
is_system_class = NO
partitioned = NO
is_reuse_oid_class = YES
collation = iso88591_bin
comment = 

Are there no schemas in CUBRID?

        Configuration configuration = new Configuration()
                .withJdbc(new Jdbc()
                                .withDriver(DRIVER)
                                .withUrl(URI))
                .withGenerator(new Generator()
                                .withGenerate(new Generate()
                                                .withDaos(true)
                                                .withImmutablePojos(true))
                                .withDatabase(new Database()
                                                .withName(DATABASE)
                                                // .withIncludes(".*")
                                                // .withExcludes("")
                                                .withInputSchema("jq"))
                                .withTarget(new Target()
                                                .withPackageName(PACKAGE)
                                                .withDirectory(DIRECTORY)
                                                .withClean(true)))
                .withLogging(Logging.TRACE);

        GenerationTool.generate(configuration);

I need it for code-generation with JOOQ, what catalog/schema do I have to specify?

1
  • anyone with enough points: please introduce the tag 'jooq', thanks
    – Erdinc Ay
    Aug 21, 2019 at 15:30

1 Answer 1

0

Fixed it. It works only if you fully remove any schema or catalog information:

        Configuration configuration = new Configuration()
                .withJdbc(new Jdbc()
                                .withDriver(DRIVER)
                                .withUser(USER)
                                .withPassword(PASSWORD)
                                .withUrl(URI))
                .withGenerator(new Generator()
                                .withGenerate(new Generate()
                                                .withDaos(true)
                                                .withPojos(true)
                                                .withImmutablePojos(true))
                                .withDatabase(new Database()
                                                .withName(DATABASE)
                                                .withIncludes(".*")
                                                .withExcludes("_?db_.*?"))
                                .withTarget(new Target()
                                                .withPackageName(PACKAGE)
                                                .withDirectory(DIRECTORY)
                                                .withClean(true)))
                .withLogging(Logging.TRACE);

        GenerationTool.generate(configuration);

This archived manual page of the CUBRID project was also helpful: https://web.archive.org/web/20160819080919/https://www.cubrid.org/wiki_apps/entry/jooq-cubrid-tutorial

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.