Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Break Mem.flags into Mem.type and Mem.enc. (CVS 1466) |
---|---|
Downloads: | Tarball | ZIP archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
68ef17028621681f5d091e77d5df84f6 |
User & Date: | drh 2004-05-26 23:43:12.000 |
Context
2004-05-27
| ||
01:04 | Add TCL test bindings and some more test cases for the new query API. (CVS 1467) (check-in: d72adf0c52 user: danielk1977 tags: trunk) | |
2004-05-26
| ||
23:43 | Break Mem.flags into Mem.type and Mem.enc. (CVS 1466) (check-in: 68ef170286 user: drh tags: trunk) | |
23:25 | Refactoring of the vdbe Mem functions and the APIs that deal with them. The code will not compile in its current state. (CVS 1465) (check-in: bba6684d50 user: drh tags: trunk) | |
Changes
Changes to src/vdbeInt.h.
︙ | ︙ | |||
126 127 128 129 130 131 132 | ** in a Mem struct is returned by the MemType(Mem*) macro. The type is ** one of SQLITE3_NULL, SQLITE3_INTEGER, SQLITE3_REAL, SQLITE3_TEXT or ** SQLITE3_BLOB. */ struct Mem { i64 i; /* Integer value */ int n; /* Number of characters in string value, including '\0' */ | | > > | | > > < < < < < < < < < < < < < < < < | > > | | | | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | | 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 | ** in a Mem struct is returned by the MemType(Mem*) macro. The type is ** one of SQLITE3_NULL, SQLITE3_INTEGER, SQLITE3_REAL, SQLITE3_TEXT or ** SQLITE3_BLOB. */ struct Mem { i64 i; /* Integer value */ int n; /* Number of characters in string value, including '\0' */ u16 flags; /* Some combination of MEM_Null, MEM_Str, MEM_Dyn, etc. */ u8 type; /* One of MEM_Null, MEM_Str, etc. */ u8 enc; /* TEXT_Utf8, TEXT_Utf16le, or TEXT_Utf16be */ double r; /* Real value */ char *z; /* String or BLOB value */ char zShort[NBFS]; /* Space for short strings */ }; typedef struct Mem Mem; /* One or more of the following flags are set to indicate the validOK ** representations of the value stored in the Mem struct. ** ** If the MEM_Null flag is set, then the value is an SQL NULL value. ** No other flags may be set in this case. ** ** If the MEM_Str flag is set then Mem.z points at a string representation. ** Usually this is encoded in the same unicode encoding as the main ** database (see below for exceptions). If the MEM_Term flag is also ** set, then the string is nul terminated. The MEM_Int and MEM_Real ** flags may coexist with the MEM_Str flag. ** ** Multiple of these values can appear in Mem.flags. But only one ** at a time can appear in Mem.type. */ #define MEM_Null 0x0001 /* Value is NULL */ #define MEM_Str 0x0002 /* Value is a string */ #define MEM_Int 0x0004 /* Value is an integer */ #define MEM_Real 0x0008 /* Value is a real number */ #define MEM_Blob 0x0010 /* Value is a BLOB */ /* Whenever Mem contains a valid string or blob representation, one of ** the following flags must be set to determine the memory management ** policy for Mem.z. The MEM_Term flag tells us whether or not the ** string is \000 or \u0000 terminated */ #define MEM_Term 0x0020 /* String rep is nul terminated */ #define MEM_Dyn 0x0040 /* Need to call sqliteFree() on Mem.z */ #define MEM_Static 0x0080 /* Mem.z points to a static string */ #define MEM_Ephem 0x0100 /* Mem.z points to an ephemeral string */ #define MEM_Short 0x0200 /* Mem.z points to Mem.zShort */ /* The following MEM_ value appears only in AggElem.aMem.s.flag fields. ** It indicates that the corresponding AggElem.aMem.z points to a ** aggregate function context that needs to be finalized. */ #define MEM_AggCtx 0x0400 /* Mem.z points to an agg function context */ /* ** The "context" argument for a installable function. A pointer to an ** instance of this structure is the first argument to the routines used ** implement the SQL functions. ** ** There is a typedef for this structure in sqlite.h. So all routines, |
︙ | ︙ |