mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-11 01:42:22 +03:00
The sqlite3_column_decltype() routine should return NULL, not an empty string,
if the column has no declared type. FossilOrigin-Name: 605eba4a756e7185119088e2242f82691d078b01
This commit is contained in:
12
src/util.c
12
src/util.c
@@ -110,11 +110,15 @@ int sqlite3Strlen30(const char *z){
|
||||
}
|
||||
|
||||
/*
|
||||
** The string z[] is followed immediately by another string. Return
|
||||
** a poiner to that other string.
|
||||
** Return the declared type of a column. Or return zDflt if the column
|
||||
** has no declared type.
|
||||
**
|
||||
** The column type is an extra string stored after the zero-terminator on
|
||||
** the column name if and only if the COLFLAG_HASTYPE flag is set.
|
||||
*/
|
||||
const char *sqlite3StrNext(const char *z){
|
||||
return z + strlen(z) + 1;
|
||||
char *sqlite3ColumnType(Column *pCol, char *zDflt){
|
||||
if( (pCol->colFlags & COLFLAG_HASTYPE)==0 ) return zDflt;
|
||||
return pCol->zName + strlen(pCol->zName) + 1;
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user