Index: sql/connection.h |
diff --git a/sql/connection.h b/sql/connection.h |
index 65020a04ebb86e0842f1048d119e2d88185b4fbf..c673e2b084cd41e913b361f9136a5a36844e2b78 100644 |
--- a/sql/connection.h |
+++ b/sql/connection.h |
@@ -24,6 +24,16 @@ namespace sql { |
class Statement; |
+// Possible return values from ColumnType in a statement. These should match |
+// the values in sqlite3.h. |
+enum ColType { |
+ COLUMN_TYPE_INTEGER = 1, |
+ COLUMN_TYPE_FLOAT = 2, |
+ COLUMN_TYPE_TEXT = 3, |
+ COLUMN_TYPE_BLOB = 4, |
+ COLUMN_TYPE_NULL = 5, |
+}; |
+ |
// Uniquely identifies a statement. There are two modes of operation: |
// |
// - In the most common mode, you will use the source file and line number to |
@@ -289,6 +299,9 @@ class SQL_EXPORT Connection { |
// Returns true if a column with the given name exists in the given table. |
bool DoesColumnExist(const char* table_name, const char* column_name) const; |
+ // Returns the type/affinity of the given column in the given table. |
+ ColType GetColumnType(char* table_name, int column_index) const; |
+ |
// Returns sqlite's internal ID for the last inserted row. Valid only |
// immediately after an insert. |
int64 GetLastInsertRowId() const; |