Documentation Source Text

Check-in [71bdfb826a]
Login

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

Overview
Comment:Add documentation on the changes() and total_changes() SQL functions.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 71bdfb826a8703e070f60dbab1f957c4564bada2
User & Date: drh 2009-04-02 02:23:59.000
Context
2009-04-02
20:17
Improvements and clarifications to the auto_vacuum pragma documentation. (check-in: ae7cc4efbb user: drh tags: trunk)
02:23
Add documentation on the changes() and total_changes() SQL functions. (check-in: 71bdfb826a user: drh tags: trunk)
2009-03-31
15:13
Update the coverage statistics on the testing document. (check-in: 1801a39523 user: drh tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to pages/lang.in.
1393
1394
1395
1396
1397
1398
1399






1400
1401
1402
1403
1404
1405
1406
<table border=0 cellpadding=10>
<tcl>
funcdef {abs(X)} {} {
  Return the absolute value of the numeric
  argument <i>X</i>.  Return NULL if <i>X</i> is NULL.  Return 0.0 if
  <i>X</i> is not a numeric value.
}







funcdef {coalesce(X,Y,...)} {} {
  Return a copy of the first non-NULL argument.  If
  all arguments are NULL then NULL is returned.  There must be at least 
  2 arguments.
}








>
>
>
>
>
>







1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
<table border=0 cellpadding=10>
<tcl>
funcdef {abs(X)} {} {
  Return the absolute value of the numeric
  argument <i>X</i>.  Return NULL if <i>X</i> is NULL.  Return 0.0 if
  <i>X</i> is not a numeric value.
}

funcdef {changes()} {} {
  Return 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,...)} {} {
  Return a copy of the first non-NULL argument.  If
  all arguments are NULL then NULL is returned.  There must be at least 
  2 arguments.
}

1572
1573
1574
1575
1576
1577
1578







1579
1580
1581
1582
1583
1584
1585
  are returned.
  The left-most character of <i>X</i> is number 1.  If <i>Y</i> is negative
  the the first character of the substring is found by counting from the
  right rather than the left.  If <i>X</i> is string
  then characters indices refer to actual UTF-8 characters.  If
  <i>X</i> is a BLOB then the indices refer to bytes.
}








funcdef {trim(X) trim(X,Y)} {} {
  Return a string formed by removing any and all
  characters that appear in <i>Y</i> from both ends of <i>X</i>.
  If the <i>Y</i> argument is omitted, spaces are removed.
}








>
>
>
>
>
>
>







1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
  are returned.
  The left-most character of <i>X</i> is number 1.  If <i>Y</i> is negative
  the the first character of the substring is found by counting from the
  right rather than the left.  If <i>X</i> is string
  then characters indices refer to actual UTF-8 characters.  If
  <i>X</i> is a BLOB then the indices refer to bytes.
}

funcdef {total_changes()} {} {
  Return the number of row changes caused by INSERT, UPDATE or DELETE
  statements since the current database connection was opened.
  This function is a wrapper around the [sqlite3_total_changes()]
  C/C++ interface.
}

funcdef {trim(X) trim(X,Y)} {} {
  Return a string formed by removing any and all
  characters that appear in <i>Y</i> from both ends of <i>X</i>.
  If the <i>Y</i> argument is omitted, spaces are removed.
}