/ Check-in [d70b0fd4]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Add a couple of requirements marks.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: d70b0fd4c94f2b70cf31c2ab9ef7a2fb2e71c182
User & Date: drh 2015-02-27 00:33:15
Context
2015-02-27
20:28
New requirements marks and a few new test cases to go with them. No changes to code. check-in: 8c2b29d9 user: drh tags: trunk
19:40
Merge updates from trunk. check-in: acf76843 user: mistachkin tags: expShell
00:33
Add a couple of requirements marks. check-in: d70b0fd4 user: drh tags: trunk
2015-02-26
21:04
Fix potential memory leaks in the misc 'compress' extension. check-in: 3bc34fd4 user: mistachkin tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/vdbeapi.c.

166
167
168
169
170
171
172




173
174
175
176
177
178
179
const void *sqlite3_value_text16be(sqlite3_value *pVal){
  return sqlite3ValueText(pVal, SQLITE_UTF16BE);
}
const void *sqlite3_value_text16le(sqlite3_value *pVal){
  return sqlite3ValueText(pVal, SQLITE_UTF16LE);
}
#endif /* SQLITE_OMIT_UTF16 */




int sqlite3_value_type(sqlite3_value* pVal){
  static const u8 aType[] = {
     SQLITE_BLOB,     /* 0x00 */
     SQLITE_NULL,     /* 0x01 */
     SQLITE_TEXT,     /* 0x02 */
     SQLITE_NULL,     /* 0x03 */
     SQLITE_INTEGER,  /* 0x04 */







>
>
>
>







166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
const void *sqlite3_value_text16be(sqlite3_value *pVal){
  return sqlite3ValueText(pVal, SQLITE_UTF16BE);
}
const void *sqlite3_value_text16le(sqlite3_value *pVal){
  return sqlite3ValueText(pVal, SQLITE_UTF16LE);
}
#endif /* SQLITE_OMIT_UTF16 */
/* EVIDENCE-OF: R-12793-43283 Every value in SQLite has one of five
** fundamental datatypes: 64-bit signed integer 64-bit IEEE floating
** point number string BLOB NULL
*/
int sqlite3_value_type(sqlite3_value* pVal){
  static const u8 aType[] = {
     SQLITE_BLOB,     /* 0x00 */
     SQLITE_NULL,     /* 0x01 */
     SQLITE_TEXT,     /* 0x02 */
     SQLITE_NULL,     /* 0x03 */
     SQLITE_INTEGER,  /* 0x04 */

Changes to test/capi3.test.

448
449
450
451
452
453
454

455










456
457

458
459
460
461
462
463
464
  set ::idxlist [list]
  set numcols [sqlite3_data_count $STMT]
  for {set i 0} {$i < $numcols} {incr i} {lappend ::idxlist $i}

# types
do_test $test.1 {
  set types [list]

  foreach i $idxlist {lappend types [sqlite3_column_type $STMT $i]}










  set types
} $types


# Integers
do_test $test.2 {
  set ints [list]
  foreach i $idxlist {lappend ints [sqlite3_column_int64 $STMT $i]}
  set ints
} $ints







>
|
>
>
>
>
>
>
>
>
>
>


>







448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
  set ::idxlist [list]
  set numcols [sqlite3_data_count $STMT]
  for {set i 0} {$i < $numcols} {incr i} {lappend ::idxlist $i}

# types
do_test $test.1 {
  set types [list]
  foreach i $idxlist {
    set x [sqlite3_column_type $STMT $i]
    # EVIDENCE-OF: R-12793-43283 Every value in SQLite has one of five
    # fundamental datatypes: 64-bit signed integer 64-bit IEEE floating
    # point number string BLOB NULL
    if {[lsearch {INTEGER FLOAT TEXT BLOB NULL} $x]<0} {
      set types ERROR
      break
    } else {
      lappend types $x
    }
  }
  set types
} $types
 

# Integers
do_test $test.2 {
  set ints [list]
  foreach i $idxlist {lappend ints [sqlite3_column_int64 $STMT $i]}
  set ints
} $ints