Interface SqlNameMatcher

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.lang.String bestString()
      Returns the most recent match.
      java.util.Set<java.lang.String> createSet()
      Creates a set that has the same case-sensitivity as this matcher.
      RelDataTypeField field​(RelDataType rowType, java.lang.String fieldName)
      Finds a field with a given name, using the current case-sensitivity, returning null if not found.
      int frequency​(java.lang.Iterable<java.lang.String> names, java.lang.String name)
      Returns how many times a string occurs in a collection.
      <K extends java.util.List<java.lang.String>,​V>
      V
      get​(java.util.Map<K,​V> map, java.util.List<java.lang.String> prefixNames, java.util.List<java.lang.String> names)
      Looks up an item in a map.
      boolean isCaseSensitive()
      Returns whether name matching is case-sensitive.
      boolean matches​(java.lang.String string, java.lang.String name)
      Returns a name matches another.
    • Method Detail

      • isCaseSensitive

        boolean isCaseSensitive()
        Returns whether name matching is case-sensitive.
      • matches

        boolean matches​(java.lang.String string,
                        java.lang.String name)
        Returns a name matches another.
        Parameters:
        string - Name written in code
        name - Name of object we are trying to match
        Returns:
        Whether matches
      • get

        <K extends java.util.List<java.lang.String>,​V> V get​(java.util.Map<K,​V> map,
                                                                   java.util.List<java.lang.String> prefixNames,
                                                                   java.util.List<java.lang.String> names)
        Looks up an item in a map.
      • bestString

        java.lang.String bestString()
        Returns the most recent match.

        In the default implementation, throws UnsupportedOperationException.

      • field

        RelDataTypeField field​(RelDataType rowType,
                               java.lang.String fieldName)
        Finds a field with a given name, using the current case-sensitivity, returning null if not found.
        Parameters:
        rowType - Row type
        fieldName - Field name
        Returns:
        Field, or null if not found
      • frequency

        int frequency​(java.lang.Iterable<java.lang.String> names,
                      java.lang.String name)
        Returns how many times a string occurs in a collection.

        Similar to Collections.frequency(java.util.Collection<?>, java.lang.Object).

      • createSet

        java.util.Set<java.lang.String> createSet()
        Creates a set that has the same case-sensitivity as this matcher.