ADSQLFunction

public enum ADSQLFunction: String

Defines the type of functions that can be called in a SQL expression.

  • Trims any white spaces off of the left side of a string.

    Declaration

    Swift

    case ltrim = "ltrim"
  • Trims any white spaces off both sides of a string.

    Declaration

    Swift

    case trim = "trim"
  • Tests to see if one string contains another.

    Declaration

    Swift

    case instr = "instr"
  • Replaces all instances of one string inside another.

    Declaration

    Swift

    case replace = "replace"
  • Converts the string to upper case.

    Declaration

    Swift

    case upper = "upper"
  • Returns the length of the string in characters.

    Declaration

    Swift

    case length = "length"
  • Trims any white spaces off of the right side of the string.

    Declaration

    Swift

    case rtrim = "rtrim"
  • Converts the string to lower case.

    Declaration

    Swift

    case lower = "lower"
  • Returns the requested portion of the string.

    Declaration

    Swift

    case substr = "substr"
  • abs

    Returns the absolute value of a number.

    Declaration

    Swift

    case abs = "abs"
  • max

    Returns the maximum value of a group of numbers.

    Declaration

    Swift

    case max = "max"
  • Rounds the given number.

    Declaration

    Swift

    case round = "round"
  • avg

    Returns the average of a group of numbers.

    Declaration

    Swift

    case avg = "avg"
  • min

    Returns the minimum value of a group of numbers.

    Declaration

    Swift

    case min = "min"
  • sum

    Returns the sum of a group of numbers.

    Declaration

    Swift

    case sum = "sum"
  • Returns the number of records in a group.

    Declaration

    Swift

    case count = "count"
  • Returns a random number

    Declaration

    Swift

    case random = "random"
  • Returns the date in this format: YYYY-MM-DD.

    Declaration

    Swift

    case date = "date"
  • Returns the current date in Julian notation.

    Declaration

    Swift

    case julianday = "julianday"
  • Formats the date as a string based on a set of formatting instructions.

    Declaration

    Swift

    case strftime = "strftime"
  • Returns the current date and time in the YYYY-MM-DD HH:MM:SS format.

    Declaration

    Swift

    case datetime = "datetime"
  • now

    Returns the current date and time.

    Declaration

    Swift

    case now = "now"
  • Returns the time as HH:MM:SS

    Declaration

    Swift

    case time = "time"
  • Accepts two or more arguments and returns the first non-null argument

    Declaration

    Swift

    case coalesce = "coalesce"
  • Returns the ID of the last row inserted into any table.

    Declaration

    Swift

    case lastInsertedRowID = "last_insert_rowid"
  • Accepts two or more arguments and returns the first non-null argument.

    Declaration

    Swift

    case ifNull = "ifnull"
  • Returns NULL if any of the passed values are null.

    Declaration

    Swift

    case nullIf = "nullif"
  • Handles an internal check operation.

    Declaration

    Swift

    case check = "@check"
  • Undocumented

    Declaration

    Swift

    public enum ADSQLFunction: String
  • Attempts to return a function type for the given string value.

    Declaration

    Swift

    public static func get(fromString text: String) -> ADSQLFunction?

    Parameters

    text

    The name of a function.

    Return Value

    The function type or nil if not found.