/ Check-in [a554bf6c]
Login

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

Overview
Comment:Fix typo in vdbe.c from previous commit. (CVS 1448)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: a554bf6c7075839f760a2ff944ac61b32cab0821
User & Date: danielk1977 2004-05-24 09:15:39
Context
2004-05-24
12:39
Non-aggregate SQL functions use sqlite_value* instead of const char * for argument values. (CVS 1449) check-in: 1e47d738 user: danielk1977 tags: trunk
09:15
Fix typo in vdbe.c from previous commit. (CVS 1448) check-in: a554bf6c user: danielk1977 tags: trunk
09:10
Add the sqlite3_value_*() access functions. (CVS 1447) check-in: 4bf925fc user: danielk1977 tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/vdbe.c.

39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
...
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
...
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
...
730
731
732
733
734
735
736

737
738
739
740
741
742
743
**
** Various scripts scan this source file in order to generate HTML
** documentation, headers files, or other derived files.  The formatting
** of the code in this file is, therefore, important.  See other comments
** in this file for details.  If in doubt, do not deviate from existing
** commenting and indentation practices when changing or adding code.
**
** $Id: vdbe.c,v 1.324 2004/05/24 09:10:11 danielk1977 Exp $
*/
#include "sqliteInt.h"
#include "os.h"
#include <ctype.h>
#include "vdbeInt.h"

/*
................................................................................
  return 0;
}

/*
** Return the number of bytes of data that will be returned by the
** equivalent sqlite3_value_data16() call.
*/
int sqlite3_value_bytes(sqlite3_value *pVal){
  if( sqlite3_value_data16(pVal) ){
    return ((Mem *)pVal)->n;
  }
  return 0;
}

/*
................................................................................
  return pVal->i;
}

/*
** Return the value of the sqlite_value* argument coerced to a 64-bit
** IEEE float.
*/
double sqlite3_value_float(sqlite3_value*){
  pVal = &pVm->pTos[(1-vals)+i];
  Realify(pVal, flagsToEnc(pMem->flags));
  return pVal->r;
}

/*
** Return the number of bytes of data that will be returned by the
** equivalent sqlite3_column_data() call.
*/
int sqlite3_column_bytes(sqlite3_stmt *pStmt, int i){
................................................................................

  vals = sqlite3_data_count(pStmt);
  if( i>=vals || i<0 ){
    sqlite3Error(pVm->db, SQLITE_RANGE, 0);
    return 0;
  }


  return sqlite3_value_float(pVal);
}

/*
** Return the name of the Nth column of the result set returned by SQL
** statement pStmt.
*/







|







 







|







 







|
|
|
|







 







>







39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
...
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
...
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
...
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
**
** Various scripts scan this source file in order to generate HTML
** documentation, headers files, or other derived files.  The formatting
** of the code in this file is, therefore, important.  See other comments
** in this file for details.  If in doubt, do not deviate from existing
** commenting and indentation practices when changing or adding code.
**
** $Id: vdbe.c,v 1.325 2004/05/24 09:15:39 danielk1977 Exp $
*/
#include "sqliteInt.h"
#include "os.h"
#include <ctype.h>
#include "vdbeInt.h"

/*
................................................................................
  return 0;
}

/*
** Return the number of bytes of data that will be returned by the
** equivalent sqlite3_value_data16() call.
*/
int sqlite3_value_bytes16(sqlite3_value *pVal){
  if( sqlite3_value_data16(pVal) ){
    return ((Mem *)pVal)->n;
  }
  return 0;
}

/*
................................................................................
  return pVal->i;
}

/*
** Return the value of the sqlite_value* argument coerced to a 64-bit
** IEEE float.
*/
double sqlite3_value_float(sqlite3_value *pVal){
  Mem *pMem = (Mem *)pVal;
  Realify(pMem, flagsToEnc(pMem->flags));
  return pMem->r;
}

/*
** Return the number of bytes of data that will be returned by the
** equivalent sqlite3_column_data() call.
*/
int sqlite3_column_bytes(sqlite3_stmt *pStmt, int i){
................................................................................

  vals = sqlite3_data_count(pStmt);
  if( i>=vals || i<0 ){
    sqlite3Error(pVm->db, SQLITE_RANGE, 0);
    return 0;
  }

  pVal = &pVm->pTos[(1-vals)+i];
  return sqlite3_value_float(pVal);
}

/*
** Return the name of the Nth column of the result set returned by SQL
** statement pStmt.
*/