/ Check-in [4fe2db1d]
Login
SQLite training in Houston TX on 2019-11-05 (details)
Part of the 2019 Tcl Conference

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Clarifications to the documentation for the sqlite3_aggregate_context() API. Also, shorten an over-length source line in sqlite.h.in.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 4fe2db1d866c80fe51f7fddbf9ce6753fb55b5f6
User & Date: drh 2013-03-18 17:18:18
Context
2013-03-19
16:12
Bring makefiles and build scripts into alignment with the sessions branch. No changes to code. check-in: d1f41089 user: drh tags: trunk
2013-03-18
17:18
Clarifications to the documentation for the sqlite3_aggregate_context() API. Also, shorten an over-length source line in sqlite.h.in. check-in: 4fe2db1d user: drh tags: trunk
11:39
Version 3.7.16 check-in: 66d5f2b7 user: drh tags: trunk, release, version-3.7.16
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/sqlite.h.in.

  3989   3989   */
  3990   3990   #ifndef SQLITE_OMIT_DEPRECATED
  3991   3991   SQLITE_DEPRECATED int sqlite3_aggregate_count(sqlite3_context*);
  3992   3992   SQLITE_DEPRECATED int sqlite3_expired(sqlite3_stmt*);
  3993   3993   SQLITE_DEPRECATED int sqlite3_transfer_bindings(sqlite3_stmt*, sqlite3_stmt*);
  3994   3994   SQLITE_DEPRECATED int sqlite3_global_recover(void);
  3995   3995   SQLITE_DEPRECATED void sqlite3_thread_cleanup(void);
  3996         -SQLITE_DEPRECATED int sqlite3_memory_alarm(void(*)(void*,sqlite3_int64,int),void*,sqlite3_int64);
         3996  +SQLITE_DEPRECATED int sqlite3_memory_alarm(void(*)(void*,sqlite3_int64,int),
         3997  +                      void*,sqlite3_int64);
  3997   3998   #endif
  3998   3999   
  3999   4000   /*
  4000   4001   ** CAPI3REF: Obtaining SQL Function Parameter Values
  4001   4002   **
  4002   4003   ** The C-language implementation of SQL functions and aggregates uses
  4003   4004   ** this set of interface routines to access the parameter values on
................................................................................
  4069   4070   ** called once for each invocation of the xStep callback and then one
  4070   4071   ** last time when the xFinal callback is invoked.  ^(When no rows match
  4071   4072   ** an aggregate query, the xStep() callback of the aggregate function
  4072   4073   ** implementation is never called and xFinal() is called exactly once.
  4073   4074   ** In those cases, sqlite3_aggregate_context() might be called for the
  4074   4075   ** first time from within xFinal().)^
  4075   4076   **
  4076         -** ^The sqlite3_aggregate_context(C,N) routine returns a NULL pointer if N is
  4077         -** less than or equal to zero or if a memory allocate error occurs.
         4077  +** ^The sqlite3_aggregate_context(C,N) routine returns a NULL pointer 
         4078  +** when first called if N is less than or equal to zero or if a memory
         4079  +** allocate error occurs.
  4078   4080   **
  4079   4081   ** ^(The amount of space allocated by sqlite3_aggregate_context(C,N) is
  4080   4082   ** determined by the N parameter on first successful call.  Changing the
  4081   4083   ** value of N in subsequent call to sqlite3_aggregate_context() within
  4082   4084   ** the same aggregate function instance will not resize the memory
  4083         -** allocation.)^
         4085  +** allocation.)^  Within the xFinal callback, it is customary to set
         4086  +** N=0 in calls to sqlite3_aggregate_context(C,N) so that no 
         4087  +** pointless memory allocations occur.
  4084   4088   **
  4085   4089   ** ^SQLite automatically frees the memory allocated by 
  4086   4090   ** sqlite3_aggregate_context() when the aggregate query concludes.
  4087   4091   **
  4088   4092   ** The first parameter must be a copy of the
  4089   4093   ** [sqlite3_context | SQL function context] that is the first parameter
  4090   4094   ** to the xStep or xFinal callback routine that implements the aggregate