on master help sign in
Mention unsafeDefault in insert.rst (#91)
07daf4fShane
docs/concepts/insert.rst+4−4
@@ -110,16 +110,16 @@ Default values
110It is fairly common to define tables with default values. While Rel8 does not
110It is fairly common to define tables with default values. While Rel8 does not
111have specific functionality for ``DEFAULT``, there are a few options:
111have specific functionality for ``DEFAULT``, there are a few options:
112
112
113−``unsafeLiteral "DEFAULT"``
113+``unsafeDefault``
114~~~~~~~~~~~~~~~~~~~~~~~~~~~
114~~~~~~~~~~~~~~~~~~~~~~~~~~~
115
115
116Rel8 does not have any special support for ``DEFAULT``. If you need to use
116Rel8 does not have any special support for ``DEFAULT``. If you need to use
117−default column values in inserts, you can use ``unsafeLiteral "DEFAULT"`` to
117+default column values in inserts, you can use ``unsafeDefault`` to
118construct the ``DEFAULT`` expression::
118construct the ``DEFAULT`` expression::
119
119
120 insert Insert
120 insert Insert
121 { into = orderSchema
121 { into = orderSchema
122− , rows = [ Order { orderId = unsafeLiteral "DEFAULT", ... } ]
122+ , rows = [ Order { orderId = unsafeDefault, ... } ]
123 , onConflict = Abort
123 , onConflict = Abort
124 , returning = Projection orderId
124 , returning = Projection orderId
125 }
125 }
@@ -131,7 +131,7 @@ construct the ``DEFAULT`` expression::
131 special in SQL, and cannot be combined like other expressions. For example,
131 special in SQL, and cannot be combined like other expressions. For example,
132 the innocuous expression::
132 the innocuous expression::
133
133
134− unsafeLiteral "DEFAULT" + 1
134+ unsafeDefault + 1
135
135
136 will lead to a runtime crash.
136 will lead to a runtime crash.
137
137