on master help sign in
Mention unsafeDefault in insert.rst (#91)
commit07daf4ff65d27c6054b08f450e221efa90ffc397 authorShane <shane.obrien@circuithub.com> dateWed 30 Jun 2021, 01:28 (5 years ago) parentc6ffdab
1 file changed+4−4
docs/concepts/insert.rst+4−4
docs/concepts/insert.rst+4−4
@@ -110,16 +110,16 @@ Default values
110110It is fairly common to define tables with default values. While Rel8 does not
111111have specific functionality for ``DEFAULT``, there are a few options:
112112
113−``unsafeLiteral "DEFAULT"``
113+``unsafeDefault``
114114~~~~~~~~~~~~~~~~~~~~~~~~~~~
115115
116116Rel8 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
118118construct the ``DEFAULT`` expression::
119119
120120 insert Insert
121121 { into = orderSchema
122− , rows = [ Order { orderId = unsafeLiteral "DEFAULT", ... } ]
122+ , rows = [ Order { orderId = unsafeDefault, ... } ]
123123 , onConflict = Abort
124124 , returning = Projection orderId
125125 }
@@ -131,7 +131,7 @@ construct the ``DEFAULT`` expression::
131131 special in SQL, and cannot be combined like other expressions. For example,
132132 the innocuous expression::
133133
134− unsafeLiteral "DEFAULT" + 1
134+ unsafeDefault + 1
135135
136136 will lead to a runtime crash.
137137