Built-in Function Call

AttentionThis page documents an earlier version. Go to the latest (v2.1)version.

Synopsis

Function call expression applies the specified function to to given arguments between parentheses and return the result of the computation.

Syntax

  1. function_call ::= function_name '(' [ arguments ... ] ')'

Builtin Functions

FunctionReturn TypeArgument TypeDescription
BlobAs<Type><Type>(BLOB)Converts a value from BLOB
<Type>AsBlobBLOB(<Type>)Converts a value to BLOB
DateOfTIMESTAMP(TIMEUUID)Conversion
MaxTimeUuidTIMEUUID(TIMESTAMP)Returns the associated max time uuid
MinTimeUuidTIMEUUID(TIMESTAMP)Returns the associated min time uuid
NowTIMEUUID()Returns the UUID of the current timestamp
TTLBIGINT()Seek time-to-live of a column
ToDateDATE(TIMESTAMP)Conversion
ToDateDATE(TIMEUUID)Converts TIMEUUID to DATE
ToTimeTIME(TIMESTAMP)Conversion
ToTimeTIME(TIMEUUIDConversion
ToTimestamp(TIMESTAMP)(DATE)Conversion
ToTimestamp(TIMESTAMP)(TIMEUUID)Conversion
ToUnixTimestampBIGINT(DATE)Conversion
ToUnixTimestampBIGINT(TIMESTAMP)Conversion
ToUnixTimestampBIGINT(TIMEUUID)Conversion
UnixTimestampOfBIGINT(TIMEUUID)Conversion
WriteTimeBIGINT()Returns the time when the column was written

Aggregate Functions

FunctionDescription
COUNTReturns number of selected rows
SUMReturns sums of column values
AVGReturns the average of column values
MINReturns the minimum value of column values
MAXReturns the maximum value of column values

Semantics

  • The argument datatypes must be convertible to the expected type for that argument that was specified by the function definition.
  • Function execution will return a value of the specified type by the function definition.
  • Yugabyte allows function calls to be used any where that expression is allowed.

See Also

All Expressions