Documentation Source Text
Check-in [9cbe2e4d08]
Not logged in

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

Overview
SHA1 Hash:9cbe2e4d08364a8796cd5ab7d4aad3b74c5e2179
Date: 2013-12-17 16:33:15
User: drh
Comment:Documentation for the printf() SQL function.
Tags And Properties
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to pages/changes.in

15
16
17
18
19
20
21

22
23
24
25
26
27
28
proc chng {date desc {options {}}} {
  global nChng aChng
  set aChng($nChng) [list $date $desc $options]
  incr nChng
}

chng {2014-02-?? (3.8.3)} {

<li>Added [SQLITE_DETERMINISTIC] as an optional bit in the 4th argument to the
    [sqlite3_create_function()] and related interfaces, providing applications with
    the ability to create new functions that can be factored out of inner loops when
    they have constant arguments.
<li>Add [SQLITE_READONLY_DBMOVED] error code, returned at the beginning of a
    transaction, to indicate that the underlying database file has been renamed
    or moved out from under SQLite.







>







15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
proc chng {date desc {options {}}} {
  global nChng aChng
  set aChng($nChng) [list $date $desc $options]
  incr nChng
}

chng {2014-02-?? (3.8.3)} {
<li>Added the [printf()] SQL function.
<li>Added [SQLITE_DETERMINISTIC] as an optional bit in the 4th argument to the
    [sqlite3_create_function()] and related interfaces, providing applications with
    the ability to create new functions that can be factored out of inner loops when
    they have constant arguments.
<li>Add [SQLITE_READONLY_DBMOVED] error code, returned at the beginning of a
    transaction, to indicate that the underlying database file has been renamed
    or moved out from under SQLite.

Changes to pages/lang.in

2273
2274
2275
2276
2277
2278
2279













2280
2281
2282
2283
2284
2285
2286
  ^The nullif(X,Y) function returns its first argument if the arguments are
  different and NULL if the arguments are the same.  ^The nullif(X,Y) function
  searches its arguments from left to right for an argument that defines a
  collating function and uses that collating function for all string
  comparisons.  ^If neither argument to nullif() defines a collating function
  then the BINARY is used.
}














funcdef {quote(X)} {} {
  ^The quote(X) function returns the text of an SQL literal which
  is the value of its argument suitable for inclusion into an SQL statement.
  ^Strings are surrounded by single-quotes with escapes on interior quotes
  as needed.  ^BLOBs are encoded as hexadecimal literals.
  ^Strings with embedded NUL characters cannot be represented as string







>
>
>
>
>
>
>
>
>
>
>
>
>







2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
  ^The nullif(X,Y) function returns its first argument if the arguments are
  different and NULL if the arguments are the same.  ^The nullif(X,Y) function
  searches its arguments from left to right for an argument that defines a
  collating function and uses that collating function for all string
  comparisons.  ^If neither argument to nullif() defines a collating function
  then the BINARY is used.
}

funcdef {printf(FORMAT,...)} {} {
  ^(The printf(FORMAT,...) SQL function works like the [sqlite3_mprintf()] C-language
  function and the printf() function from the standard C library.)^
  The first argument is a format string that specifies how to construct the output
  string using values taken from subsequent arguments.  ^If the FORMAT argument is
  missing or NULL then the result is NULL.  ^The %n format is silently ignored and
  does not consume an argument.  ^The %p format is an alias for %X.  ^The %z format
  is interchangable with %s.  ^(If there are too few arguments in the argument list,
  missing arguments are assumed to have a NULL value, which is translated into
  0 or 0.0 for numeric formats or an empty string for %s.)^
}
  

funcdef {quote(X)} {} {
  ^The quote(X) function returns the text of an SQL literal which
  is the value of its argument suitable for inclusion into an SQL statement.
  ^Strings are surrounded by single-quotes with escapes on interior quotes
  as needed.  ^BLOBs are encoded as hexadecimal literals.
  ^Strings with embedded NUL characters cannot be represented as string