aboutsummaryrefslogtreecommitdiff
path: root/src/vdbeInt.h
diff options
context:
space:
mode:
authordrh <>2022-02-28 13:38:28 +0000
committerdrh <>2022-02-28 13:38:28 +0000
commit74a12dd6fd1cd358d1cd264132096d1302ddcad0 (patch)
tree8d769702873bd7ec25cf1500b9c2548f85db8bd8 /src/vdbeInt.h
parent0150c81cd38eb72b282d86cff83c5690d6d5881b (diff)
downloadsqlite-74a12dd6fd1cd358d1cd264132096d1302ddcad0.tar.gz
sqlite-74a12dd6fd1cd358d1cd264132096d1302ddcad0.zip
Expand the comment on the definition of the Mem object to better explain the
meanings of the various flag bits. FossilOrigin-Name: f2f0426035d4e0334be000a3eb62bbd7d61fdab7c2ef9ba13cfdf6482396dd13
Diffstat (limited to 'src/vdbeInt.h')
-rw-r--r--src/vdbeInt.h37
1 files changed, 36 insertions, 1 deletions
diff --git a/src/vdbeInt.h b/src/vdbeInt.h
index 657c6f8cf..26a7bc0de 100644
--- a/src/vdbeInt.h
+++ b/src/vdbeInt.h
@@ -231,9 +231,44 @@ struct sqlite3_value {
*/
#define MEMCELLSIZE offsetof(Mem,db)
-/* One or more of the following flags are set to indicate the validOK
+/* One or more of the following flags are set to indicate the
** representations of the value stored in the Mem struct.
**
+** * MEM_Null An SQL NULL value
+**
+** * MEM_Null|MEM_Zero An SQL NULL with the virtual table
+** UPDATE no-change flag set
+**
+** * MEM_Null|MEM_Term| An SQL NULL, but also contains a
+** MEM_Subtype pointer accessible using
+** sqlite3_value_pointer().
+**
+** * MEM_Null|MEM_Cleared Special SQL NULL that compares non-equal
+** to other NULLs even using the IS operator.
+**
+** * MEM_Str A string, stored in Mem.z with
+** length Mem.n. Zero-terminated if
+** MEM_Term is set. This flag is
+** incompatible with MEM_Blob and
+** MEM_Null, but can appear with MEM_Int,
+** MEM_Real, and MEM_IntReal.
+**
+** * MEM_Blob A blob, stored in Mem.z length Mem.n.
+** Incompatible with MEM_Str, MEM_Null,
+** MEM_Int, MEM_Real, and MEM_IntReal.
+**
+** * MEM_Blob|MEM_Zero A blob in Mem.z of length Mem.n plus
+** MEM.u.i extra 0x00 bytes at the end.
+**
+** * MEM_Int Integer stored in Mem.u.i.
+**
+** * MEM_Real Real stored in Mem.u.r.
+**
+** * MEM_IntReal Real stored as an integer in Mem.u.i.
+**
+** * MEM_Undefined An undefined and/or uninitialized value.
+** Trying to use an Undefined value is an error.
+**
** If the MEM_Null flag is set, then the value is an SQL NULL value.
** For a pointer type created using sqlite3_bind_pointer() or
** sqlite3_result_pointer() the MEM_Term and MEM_Subtype flags are also set.