mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-19 21:43:15 +03:00
Refactor names of column index transformation functions, for clarity.
Get generated columns working with ALTER TABLE RENAME COLUMN. FossilOrigin-Name: 27ab41c9102e7801ff829488fc123a8040da008bef373d6704efbe2f93e1da90
This commit is contained in:
@@ -1818,8 +1818,21 @@ struct Module {
|
||||
};
|
||||
|
||||
/*
|
||||
** information about each column of an SQL table is held in an instance
|
||||
** of this structure.
|
||||
** Information about each column of an SQL table is held in an instance
|
||||
** of the Column structure, in the Table.aCol[] array.
|
||||
**
|
||||
** Definitions:
|
||||
**
|
||||
** "table column index" This is the index of the column in the
|
||||
** Table.aCol[] array, and also the index of
|
||||
** the column in the original CREATE TABLE stmt.
|
||||
**
|
||||
** "storage column index" This is the index of the column in the
|
||||
** record BLOB generated by the OP_MakeRecord
|
||||
** opcode. The storage column index is less than
|
||||
** or equal to the table column index. It is
|
||||
** equal if and only if there are no VIRTUAL
|
||||
** columns to the left.
|
||||
*/
|
||||
struct Column {
|
||||
char *zName; /* Name of this column, \000, then the type */
|
||||
@@ -3952,13 +3965,13 @@ void sqlite3SelectAddColumnTypeAndCollation(Parse*,Table*,Select*,char);
|
||||
Table *sqlite3ResultSetOfSelect(Parse*,Select*,char);
|
||||
void sqlite3OpenMasterTable(Parse *, int);
|
||||
Index *sqlite3PrimaryKeyIndex(Table*);
|
||||
i16 sqlite3ColumnOfIndex(Index*, i16);
|
||||
i16 sqlite3TableColumnToIndex(Index*, i16);
|
||||
#ifdef SQLITE_OMIT_GENERATED_COLUMNS
|
||||
# define sqlite3ColumnOfTable(T,X) (X) /* No-op pass-through */
|
||||
# define sqlite3ColumnOfStorage(T,X) (X) /* No-op pass-through */
|
||||
# define sqlite3TableColumnToStorage(T,X) (X) /* No-op pass-through */
|
||||
# define sqlite3StorageColumnToTable(T,X) (X) /* No-op pass-through */
|
||||
#else
|
||||
i16 sqlite3ColumnOfTable(Table*, i16);
|
||||
i16 sqlite3ColumnOfStorage(Table*, i16);
|
||||
i16 sqlite3TableColumnToStorage(Table*, i16);
|
||||
i16 sqlite3StorageColumnToTable(Table*, i16);
|
||||
#endif
|
||||
void sqlite3StartTable(Parse*,Token*,Token*,int,int,int,int);
|
||||
#if SQLITE_ENABLE_HIDDEN_COLUMNS
|
||||
|
||||
Reference in New Issue
Block a user