diff options
author | mistachkin <mistachkin@noemail.net> | 2013-09-24 19:07:48 +0000 |
---|---|---|
committer | mistachkin <mistachkin@noemail.net> | 2013-09-24 19:07:48 +0000 |
commit | bbff2180161a86873249d332dc72a8aaf4e22f89 (patch) | |
tree | 09b35ca0c564eacc3448303adcc127f24fb1ba2e /src/vdbeapi.c | |
parent | 9a5cbbc4a53b4ab409a56352cad15d0e86726a3d (diff) | |
parent | 6284d0216044049566cd7911dd6e1f070b2ba257 (diff) | |
download | sqlite-bbff2180161a86873249d332dc72a8aaf4e22f89.tar.gz sqlite-bbff2180161a86873249d332dc72a8aaf4e22f89.zip |
Merge updates from trunk.
FossilOrigin-Name: 435ce3b3fc0cffb4d7e6f2694c3100066e19f9ed
Diffstat (limited to 'src/vdbeapi.c')
-rw-r--r-- | src/vdbeapi.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/vdbeapi.c b/src/vdbeapi.c index 52c6b2a79..d51256217 100644 --- a/src/vdbeapi.c +++ b/src/vdbeapi.c @@ -510,6 +510,7 @@ int sqlite3_step(sqlite3_stmt *pStmt){ return rc; } + /* ** Extract the user data from a sqlite3_context structure and return a ** pointer to it. @@ -535,6 +536,19 @@ sqlite3 *sqlite3_context_db_handle(sqlite3_context *p){ } /* +** Return the current time for a statement +*/ +sqlite3_int64 sqlite3StmtCurrentTime(sqlite3_context *p){ + Vdbe *v = p->pVdbe; + int rc; + if( v->iCurrentTime==0 ){ + rc = sqlite3OsCurrentTimeInt64(p->s.db->pVfs, &v->iCurrentTime); + if( rc ) v->iCurrentTime = 0; + } + return v->iCurrentTime; +} + +/* ** The following is the implementation of an SQL function that always ** fails with an error message stating that the function is used in the ** wrong context. The sqlite3_overload_function() API might construct |