SQL: Implement :: cast operator (#38774)

`<expression>::<dataType>` is a simplified altenative syntax to
`CAST(<expression> AS <dataType> which exists in PostgreSQL and
provides an improved user experience and possibly more compact
SQL queries.

Fixes: #38717
This commit is contained in:
Marios Trivyzas 2019-02-12 16:50:21 +02:00
parent 12eac6ad4b
commit 032bcf99d6
No known key found for this signature in database
GPG key ID: 8817B46B0CF36A3F
13 changed files with 1099 additions and 954 deletions

View file

@ -126,9 +126,21 @@ include-tagged::{sql-specs}/arithmetic.sql-spec[multiply]
include-tagged::{sql-specs}/arithmetic.sql-spec[divide]
--------------------------------------------------
* https://en.wikipedia.org/wiki/Modulo_operation[Modulo] or Reminder(`%`)
* https://en.wikipedia.org/wiki/Modulo_operation[Modulo] or Remainder(`%`)
["source","sql",subs="attributes,callouts,macros"]
--------------------------------------------------
include-tagged::{sql-specs}/arithmetic.sql-spec[mod]
--------------------------------------------------
[[sql-operators-cast]]
=== Cast Operators
* Cast (`::`)
`::` provides an alternative syntax to the <<sql-functions-type-conversion-cast>> function.
["source","sql",subs="attributes,callouts,macros"]
--------------------------------------------------
include-tagged::{sql-specs}/docs.csv-spec[conversionStringToLongCastOperator]
--------------------------------------------------