/ Check-in [9da4fb59]
Login

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

Overview
Comment:Update comments on the fossildelta extension. No changes to code.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 9da4fb59b28686630d63a79988b458726332cf06cc0e6e84d7c0a7600f5fcab0
User & Date: drh 2019-02-25 14:52:43
Context
2019-02-25
18:43
Enhance the command-line shell to accept bound parameters, using the TEMP table named "$Parameters" to look up the values for bound parameters. check-in: 7c941ce5 user: drh tags: trunk
18:07
Merge latest trunk changes into this branch. check-in: 5c1cf308 user: dan tags: reuse-schema
14:52
Update comments on the fossildelta extension. No changes to code. check-in: 9da4fb59 user: drh tags: trunk
14:16
Fix a typo in the documentation for sqlite3_total_changes(). check-in: 8474c156 user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to ext/misc/fossildelta.c.

   596    596       }
   597    597     }
   598    598     /* ERROR: unterminated delta */
   599    599     return -1;
   600    600   }
   601    601   
   602    602   /*
   603         -** SQL functions:  fossildelta_create(X,Y)
          603  +** SQL functions:  delta_create(X,Y)
   604    604   **
   605    605   ** Return a delta for carrying X into Y.
   606    606   */
   607    607   static void deltaCreateFunc(
   608    608     sqlite3_context *context,
   609    609     int argc,
   610    610     sqlite3_value **argv
................................................................................
   631    631       }else{
   632    632         sqlite3_result_blob(context, aOut, nOut, sqlite3_free);
   633    633       }
   634    634     }
   635    635   }
   636    636   
   637    637   /*
   638         -** SQL functions:  fossildelta_apply(X,D)
          638  +** SQL functions:  delta_apply(X,D)
   639    639   **
   640    640   ** Return the result of applying delta D to input X.
   641    641   */
   642    642   static void deltaApplyFunc(
   643    643     sqlite3_context *context,
   644    644     int argc,
   645    645     sqlite3_value **argv
................................................................................
   674    674         sqlite3_result_blob(context, aOut, nOut, sqlite3_free);
   675    675       }
   676    676     }
   677    677   }
   678    678   
   679    679   
   680    680   /*
   681         -** SQL functions:  fossildelta_output_size(D)
          681  +** SQL functions:  delta_output_size(D)
   682    682   **
   683    683   ** Return the size of the output that results from applying delta D.
   684    684   */
   685    685   static void deltaOutputSizeFunc(
   686    686     sqlite3_context *context,
   687    687     int argc,
   688    688     sqlite3_value **argv
................................................................................
   700    700       sqlite3_result_error(context, "corrupt fossil delta", -1);
   701    701       return;
   702    702     }else{
   703    703       sqlite3_result_int(context, nOut);
   704    704     }
   705    705   }
   706    706   
   707         -/* The deltaparse(DELTA) table-valued function parses the DELTA in
   708         -** its input and returns a table that describes that delta.
          707  +/*****************************************************************************
          708  +** Table-valued SQL function:   delta_parse(DELTA)
          709  +**
          710  +** Schema:
          711  +**
          712  +**     CREATE TABLE delta_parse(
          713  +**       op TEXT,
          714  +**       a1 INT,
          715  +**       a2 ANY,
          716  +**       delta HIDDEN BLOB
          717  +**     );
          718  +**
          719  +** Given an input DELTA, this function parses the delta and returns
          720  +** rows for each entry in the delta.  The op column has one of the
          721  +** values SIZE, COPY, INSERT, CHECKSUM, ERROR.
          722  +**
          723  +** Assuming no errors, the first row has op='SIZE'.  a1 is the size of
          724  +** the output in bytes and a2 is NULL.
          725  +**
          726  +** After the initial SIZE row, there are zero or more 'COPY' and/or 'INSERT'
          727  +** rows.  A COPY row means content is copied from the source into the
          728  +** output.  Column a1 is the number of bytes to copy and a2 is the offset
          729  +** into source from which to begin copying.  An INSERT row means to
          730  +** insert text into the output stream.  Column a1 is the number of bytes
          731  +** to insert and column is a BLOB that contains the text to be inserted.
          732  +**
          733  +** The last row of a well-formed delta will have an op value of 'CHECKSUM'.
          734  +** The a1 column will be the value of the checksum and a2 will be NULL.
          735  +**
          736  +** If the input delta is not well-formed, then a row with an op value
          737  +** of 'ERROR' is returned.  The a1 value of the ERROR row is the offset
          738  +** into the delta where the error was encountered and a2 is NULL.
   709    739   */
   710    740   typedef struct deltaparsevtab_vtab deltaparsevtab_vtab;
   711    741   typedef struct deltaparsevtab_cursor deltaparsevtab_cursor;
   712    742   struct deltaparsevtab_vtab {
   713    743     sqlite3_vtab base;  /* Base class - must be first */
   714    744     /* No additional information needed */
   715    745   };