Skip to content
Search
DSL · Pg query

current_timestamp

Definition

/**
 * SQL standard CURRENT_TIMESTAMP function.
 *
 * Returns the current date and time (at the start of the transaction).
 * Useful as a column default value or in SELECT queries.
 *
 * Example: column('created_at', column_type_timestamp())->default(current_timestamp())
 * Example: select()->select(current_timestamp()->as('now'))
 */
current_timestamp() : SQLValueFunctionExpression

Contributors

Built in the open.

Join us on GitHub
scroll back to top