Class CqlModel

java.lang.Object
io.nosqlbench.cqlgen.model.CqlModel

public class CqlModel extends Object

This model contains definition level details for schema elements which are parsed from the Antlr4 CQL grammar. Key elements include:

  • keyspace definitions, organized by keyspace name
  • type definitions, organized by keyspace name
  • table definitions with included column definitions, organized by keyspace name

Because keyspace, table, and type elements are handled sometimes in different ways, these are stored in separate data structures, mapped by the logical keyspace name. This means that you will see table definitions for named keyspaces even if those named keyspaces are not represented in the keyspace definitions. This allows for sub-selecting of rendered elements by logical name without requiring a fully-interconnected keyspace->table->column object graph.

  • Constructor Details

  • Method Details

    • getStats

      public CGSchemaStats getStats()
    • hasStats

      public boolean hasStats()
    • getComputedStats

      public ComputedSchemaStats getComputedStats()
    • setKeyspaceAttributes

      public void setKeyspaceAttributes(CGSchemaStats schemaStats)
    • getErrors

      public List<String> getErrors()
    • refKeyspace

      public CqlKeyspaceDef refKeyspace(String ksname)
    • getKeyspaceDefs

      public List<CqlKeyspaceDef> getKeyspaceDefs()
    • getTypeDefs

      public List<CqlType> getTypeDefs()
    • removeKeyspaceDef

      public void removeKeyspaceDef(String ksname)
    • getSummaryLine

      public String getSummaryLine()
    • getTableDefs

      public List<CqlTable> getTableDefs()
    • renameColumn

      public void renameColumn(CqlColumnBase extant, String newColName)
    • isEmpty

      public boolean isEmpty()
    • getReferenceErrors

      public List<String> getReferenceErrors()
    • addKeyspace

      public void addKeyspace(CqlKeyspaceDef keyspace)
    • addType

      public void addType(String ksname, CqlType usertype)
    • addTable

      public void addTable(String ksname, CqlTable table)