Documentation Source Text

Check-in [e265a59cf0]
Login

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

Overview
Comment:Further updates to the SQL function documentation.
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: e265a59cf0913d07cf7871c52e9532dd5e1f9a3e
User & Date: drh 2009-12-08 02:04:44
Context
2009-12-10
20:28
Enhance the requirements matrix generator to report duplicate text requirements. check-in: b6c54837b9 user: drh tags: trunk
2009-12-08
02:04
Further updates to the SQL function documentation. check-in: e265a59cf0 user: drh tags: trunk
2009-12-07
23:47
Updates and clarifications to the built-in SQL function documentation. Mark key sentences in that documentation as requirements. check-in: 34346a758d user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to pages/compile.in.

403
404
405
406
407
408
409




410
411
412
413
414
415
416

COMPILE_OPTION {SQLITE_ENABLE_UNLOCK_NOTIFY} {
  This option enables the [sqlite3_unlock_notify()] interface and
  its associated functionality.  See the documentation titled
  [Using the SQLite Unlock Notification Feature] for additional
  information.
}





COMPILE_OPTION {YYTRACKMAXSTACKDEPTH} {
  This option causes the LALR(1) parser stack depth to be tracked
  and reported using the [sqlite3_status]([SQLITE_STATUS_PARSER_STACK],...)
  interface.  SQLite's LALR(1) parser has a fixed stack depth
  (determined at compile-time using the [YYSTACKDEPTH] options).
  This option can be used to help determine if an application is







>
>
>
>







403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420

COMPILE_OPTION {SQLITE_ENABLE_UNLOCK_NOTIFY} {
  This option enables the [sqlite3_unlock_notify()] interface and
  its associated functionality.  See the documentation titled
  [Using the SQLite Unlock Notification Feature] for additional
  information.
}

COMPILE_OPTION {SQLITE_SOUNDEX} {
  This option enables the [soundex() SQL function].
}

COMPILE_OPTION {YYTRACKMAXSTACKDEPTH} {
  This option causes the LALR(1) parser stack depth to be tracked
  and reported using the [sqlite3_status]([SQLITE_STATUS_PARSER_STACK],...)
  interface.  SQLite's LALR(1) parser has a fixed stack depth
  (determined at compile-time using the [YYSTACKDEPTH] options).
  This option can be used to help determine if an application is

Changes to pages/lang.in.

1548
1549
1550
1551
1552
1553
1554
1555
1556
1557

1558
1559
1560
1561
1562
1563
1564
....
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
....
1728
1729
1730
1731
1732
1733
1734
1735

1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
  ^(Abs(X) return 0.0 if X is a string or blob
  that cannot be converted to a numeric value.)^  ^If X is the 
  integer -9223372036854775807 then abs(X) throws an integer overflow
  error since there is no equivalent positive 64-bit two complement value.
}

funcdef {changes()} {} {
  ^The change() function returns the number of database rows that were changed
  or inserted or deleted by the most recently complete SQL.  
  ^This is a wrapper around the [sqlite3_changes()] C/C++ function.

}

funcdef {coalesce(X,Y,...)} {} {
  ^The coalesce() function returns a copy of its first non-NULL argument, or
  NULL if all arguments are NULL.  ^Coalesce() must be at least 
  2 arguments.
}
................................................................................
  it has 2 or more arguments but operates as an 
  [maxAggFunc | aggregate function] if given
  only a single argument.
}

funcdef {nullif(X,Y)} {} {
  ^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 a string which is the value of
  its argument suitable for inclusion into another SQL statement.
  Strings are surrounded by single-quotes with escapes on interior quotes
  as needed.  BLOBs are encoded as hexadecimal literals.
}

funcdef {random()} {} {
  ^The random() function returns a pseudo-random integer
  between -9223372036854775808 and +9223372036854775807.
}

................................................................................
  ^If the Y argument is omitted, rtrim(X) removes spaces from the right
  side of X.
}

funcdef {soundex(X)} {} {
  ^The soundex(X) function returns a string that is the soundex encoding 
  of the string X.
  ^The string "?000" is returned if the argument is NULL.

  This function is omitted from SQLite by default.
  It is only available if the -DSQLITE_SOUNDEX=1 compiler option
  is used when SQLite is built.
}

funcdef {sqlite_source_id()} {} {
  ^The sqlite_source_id() function returns a string that identifies the
  specific version of the source code that was used to build the SQLite
  library.  ^The string returned by sqlite_source_id() begins with
  the date and time that the source code was checked in and is follows by







|
|
|
>







 







|









|
|







 







|
>
|
|
|







1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
....
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
....
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
  ^(Abs(X) return 0.0 if X is a string or blob
  that cannot be converted to a numeric value.)^  ^If X is the 
  integer -9223372036854775807 then abs(X) throws an integer overflow
  error since there is no equivalent positive 64-bit two complement value.
}

funcdef {changes()} {} {
  ^The changes() function returns the number of database rows that were changed
  or inserted or deleted by the most recently completed SQL statement.  
  ^The changes() SQL function is a wrapper around the [sqlite3_changes()]
  C/C++ function and hence follows the same rules for counting changes.
}

funcdef {coalesce(X,Y,...)} {} {
  ^The coalesce() function returns a copy of its first non-NULL argument, or
  NULL if all arguments are NULL.  ^Coalesce() must be at least 
  2 arguments.
}
................................................................................
  it has 2 or more arguments but operates as an 
  [maxAggFunc | aggregate function] if given
  only a single argument.
}

funcdef {nullif(X,Y)} {} {
  ^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 a string which is the value of
  its argument suitable for inclusion into another SQL statement.
  ^Strings are surrounded by single-quotes with escapes on interior quotes
  as needed.  ^BLOBs are encoded as hexadecimal literals.
}

funcdef {random()} {} {
  ^The random() function returns a pseudo-random integer
  between -9223372036854775808 and +9223372036854775807.
}

................................................................................
  ^If the Y argument is omitted, rtrim(X) removes spaces from the right
  side of X.
}

funcdef {soundex(X)} {} {
  ^The soundex(X) function returns a string that is the soundex encoding 
  of the string X.
  ^The string "?000" is returned if the argument is NULL or contains
  no ASCII alphabetic characters.
  ^(This function is omitted from SQLite by default.
  It is only available if the [SQLITE_SOUNDEX] compile-time option
  is used when SQLite is built.)^
}

funcdef {sqlite_source_id()} {} {
  ^The sqlite_source_id() function returns a string that identifies the
  specific version of the source code that was used to build the SQLite
  library.  ^The string returned by sqlite_source_id() begins with
  the date and time that the source code was checked in and is follows by