Class NamingFolio

java.lang.Object
io.nosqlbench.cqlgen.binders.NamingFolio

public class NamingFolio extends Object
The purpose of this class is to put all the logic/complexity of name condensing into one place. Basically if you have identifiers that are globally unique within the active namespace, WITHOUT using fully qualified names, then it is easier for users to use short names. For example, if you have a column named "score" which is used as an int in one table and as a double in another, then you must include the type information to provide two distinct identifiers for the purpose of mapping bindings. This will be a pre-built inverted index of all field which need to have bindings assigned. A field reference is presumed to be unique within the scope from which the traversal to the working set has a single path. // name -> type -> table -> keyspace -> namespace
  • Field Details

  • Constructor Details

    • NamingFolio

      public NamingFolio(String namerspec)
    • NamingFolio

      public NamingFolio()
  • Method Details

    • addFieldRef

      public void addFieldRef(Map<String,String> labels)
    • addFieldRef

      public void addFieldRef(String column, String typedef, String table, String keyspace)
    • nameFor

      public String nameFor(NBLabeledElement labeled, String... fields)
      This will eventually elide extraneous fields according to knowledge of all known names by name, type, table, keyspace. For now it just returns everything in fully qualified form.
    • nameFor

      public String nameFor(NBLabeledElement labeled, Map<String,String> fields)
    • informNamerOfAllKnownNames

      public void informNamerOfAllKnownNames(CqlModel model)
    • getNames

      public Set<String> getNames()