Record Class ParameterMutations.Add

java.lang.Object
java.lang.Record
com.inductiveautomation.ignition.designer.db.namedquery.workspace.ai.ParameterMutations.Add
Record Components:
name - the identifier (without leading : or surrounding {}).
kind - NamedQuery.ParameterType.Parameter or NamedQuery.ParameterType.QueryString; NamedQuery.ParameterType.Database is rejected at parse time.
dataType - the SQL data type when kind is NamedQuery.ParameterType.Parameter. QueryString parameters always carry DataType.String for storage but the field is meaningless in that case.
Enclosing class:
ParameterMutations

public static record ParameterMutations.Add(String name, NamedQuery.ParameterType kind, DataType dataType) extends Record
One row the agent has asked us to add to the parameter table.
  • Constructor Details

    • Add

      public Add(String name, NamedQuery.ParameterType kind, DataType dataType)
      Creates an instance of a Add record class.
      Parameters:
      name - the value for the name record component
      kind - the value for the kind record component
      dataType - the value for the dataType record component
  • Method Details

    • queryString

      public static ParameterMutations.Add queryString(String name)
      Convenience constructor that defaults the data type to DataType.String for QueryString rows.
    • parseDataType

      public static DataType parseDataType(@Nullable String raw)
      Parameters:
      raw - the data-type string from the agent's reply, e.g. "Int4". Falls back to DataType.String for null/blank/unknown values per the contract documented in NamedQueryAgent.
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • name

      public String name()
      Returns the value of the name record component.
      Returns:
      the value of the name record component
    • kind

      public NamedQuery.ParameterType kind()
      Returns the value of the kind record component.
      Returns:
      the value of the kind record component
    • dataType

      public DataType dataType()
      Returns the value of the dataType record component.
      Returns:
      the value of the dataType record component