mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-08 03:22:21 +03:00
The datatype of the i-th column in the result set is given by the
azColName(argc+1+i) parameter to the callback. (CVS 647) FossilOrigin-Name: bdb006b809feb0f29342eb5138c0884d34e95599
This commit is contained in:
18
src/expr.c
18
src/expr.c
@@ -12,7 +12,7 @@
|
||||
** This file contains routines used for analyzing expressions and
|
||||
** for generating VDBE code that evaluates expressions in SQLite.
|
||||
**
|
||||
** $Id: expr.c,v 1.73 2002/06/20 11:36:49 drh Exp $
|
||||
** $Id: expr.c,v 1.74 2002/06/26 02:45:04 drh Exp $
|
||||
*/
|
||||
#include "sqliteInt.h"
|
||||
#include <ctype.h>
|
||||
@@ -889,6 +889,22 @@ int sqliteExprType(Expr *p){
|
||||
p = p->pSelect->pEList->a[0].pExpr;
|
||||
break;
|
||||
|
||||
case TK_CASE: {
|
||||
if( p->pRight && sqliteExprType(p->pRight)==SQLITE_SO_NUM ){
|
||||
return SQLITE_SO_NUM;
|
||||
}
|
||||
if( p->pList ){
|
||||
int i;
|
||||
ExprList *pList = p->pList;
|
||||
for(i=1; i<pList->nExpr; i+=2){
|
||||
if( sqliteExprType(pList->a[i].pExpr)==SQLITE_SO_NUM ){
|
||||
return SQLITE_SO_NUM;
|
||||
}
|
||||
}
|
||||
}
|
||||
return SQLITE_SO_TEXT;
|
||||
}
|
||||
|
||||
default:
|
||||
assert( p->op==TK_ABORT ); /* Can't Happen */
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user