aboutsummaryrefslogtreecommitdiff
path: root/src/func.c
diff options
context:
space:
mode:
authordrh <drh@noemail.net>2017-12-16 20:20:37 +0000
committerdrh <drh@noemail.net>2017-12-16 20:20:37 +0000
commit2fc865c1153d739208657ea652f74426bf20f678 (patch)
treebaccd44ab9c4694428b24dfd064e872540f702a7 /src/func.c
parentebeffef36c5ad0e855cd208cc39989fc33511a6c (diff)
downloadsqlite-2fc865c1153d739208657ea652f74426bf20f678.tar.gz
sqlite-2fc865c1153d739208657ea652f74426bf20f678.zip
Add an experimental location(X) SQL function that attempt to return the
location of the payload within the database for the record that contains column X. location(X) returns NULL if X is not an ordinary table column or if SQLite cannot figure out the location because it is using a covering index. FossilOrigin-Name: 51be9558164301c5dd4df23ab8b3e67de0b522f8d36f79f3d84d45d3dc2a83a4
Diffstat (limited to 'src/func.c')
-rw-r--r--src/func.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/func.c b/src/func.c
index 7528fa8b4..f81c4865d 100644
--- a/src/func.c
+++ b/src/func.c
@@ -1799,6 +1799,8 @@ void sqlite3RegisterBuiltinFunctions(void){
#ifdef SQLITE_DEBUG
FUNCTION2(affinity, 1, 0, 0, noopFunc, SQLITE_FUNC_AFFINITY),
#endif
+ FUNCTION2(location, 1, 0, 0, noopFunc, SQLITE_FUNC_LOCATION|
+ SQLITE_FUNC_TYPEOF),
FUNCTION(ltrim, 1, 1, 0, trimFunc ),
FUNCTION(ltrim, 2, 1, 0, trimFunc ),
FUNCTION(rtrim, 1, 2, 0, trimFunc ),