org.apache.cassandra.cql3.selection

## Interface Selectable

- All Superinterfaces:
    AssignmentTestable
  All Known Implementing Classes:
    ColumnDefinition, Selectable.WithCast, Selectable.WithFieldSelection, Selectable.WithFunction, Selectable.WithTerm, Selectable.WithToJSonFunction, Selectable.WritetimeOrTTL

      public interface Selectable
      extends AssignmentTestable

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Interface and Description
    --- | ---
    `static class` | `Selectable.Raw`
    `static class` | `Selectable.WithCast`
    `static class` | `Selectable.WithFieldSelection`
    `static class` | `Selectable.WithFunction`
    `static class` | `Selectable.WithTerm`
    `static class` | `Selectable.WithToJSonFunction`
    `static class` | `Selectable.WritetimeOrTTL`

    - ### Nested classes/interfaces inherited from interface org.apache.cassandra.cql3.AssignmentTestable

      `AssignmentTestable.TestResult`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Default Methods
    Modifier and Type | Method and Description
    --- | ---
    `default int` | `addAndGetIndex(ColumnDefinition def, java.util.List<ColumnDefinition> l)`
    `AbstractType<?>` | `getExactTypeIfKnown(java.lang.String keyspace)` The type of the `Selectable` if it can be infered.
    `Selector.Factory` | `newSelectorFactory(CFMetaData cfm, AbstractType<?> expectedType, java.util.List<ColumnDefinition> defs, VariableSpecifications boundNames)`
    `default AssignmentTestable.TestResult` | `testAssignment(java.lang.String keyspace, ColumnSpecification receiver)`

- - ### Method Detail

    - #### newSelectorFactory

          Selector.Factory newSelectorFactory(CFMetaData cfm,
                                              AbstractType<?> expectedType,
                                              java.util.List<ColumnDefinition> defs,
                                              VariableSpecifications boundNames)

    - #### getExactTypeIfKnown

          AbstractType<?> getExactTypeIfKnown(java.lang.String keyspace)

      The type of the `Selectable` if it can be infered.
      Parameters:
        `keyspace` - the keyspace on which the statement for which this is a `Selectable` is on.
      Returns:
        the type of this `Selectable` if inferrable, or `null` otherwise (for instance, the type isn't inferable for a bind marker. Even for literals, the exact type is not inferrable since they are valid for many different types and so this will return `null` too).

    - #### testAssignment

          default AssignmentTestable.TestResult testAssignment(java.lang.String keyspace,
                                                               ColumnSpecification receiver)

      Specified by:
        `testAssignment` in interface `AssignmentTestable`
      Returns:
        whether this object can be assigned to the provided receiver. We distinguish between 3 values: - EXACT_MATCH if this object is exactly of the type expected by the receiver - WEAKLY_ASSIGNABLE if this object is not exactly the expected type but is assignable nonetheless - NOT_ASSIGNABLE if it's not assignable Most caller should just call the isAssignable() method on the result, though functions have a use for testing "strong" equality to decide the most precise overload to pick when multiple could match.

    - #### addAndGetIndex

          default int addAndGetIndex(ColumnDefinition def,
                                     java.util.List<ColumnDefinition> l)

Copyright © 2018 The Apache Software Foundation