Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(83)

Side by Side Diff: third_party/sqlite_google/preprocessed/sqlite3.h

Issue 924: sqlite3 pragma get/set user_version implemented (Closed) SVN Base: http://google-gears.googlecode.com/svn/contrib/dimitri.glazkov/database2/gears/
Patch Set: Removed starting a transaction, just report SQLITE_MISUSE now. Created 2 months, 3 weeks ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 ** 2001 September 15 2 ** 2001 September 15
3 ** 3 **
4 ** The author disclaims copyright to this source code. In place of 4 ** The author disclaims copyright to this source code. In place of
5 ** a legal notice, here is a blessing: 5 ** a legal notice, here is a blessing:
6 ** 6 **
7 ** May you do good and not evil. 7 ** May you do good and not evil.
8 ** May you find forgiveness for yourself and forgive others. 8 ** May you find forgiveness for yourself and forgive others.
9 ** May you share freely, never taking more than you give. 9 ** May you share freely, never taking more than you give.
10 ** 10 **
11 ************************************************************************* 11 *************************************************************************
12 ** This header file defines the interface that the SQLite library 12 ** This header file defines the interface that the SQLite library
13 ** presents to client programs. If a C-function, structure, datatype, 13 ** presents to client programs. If a C-function, structure, datatype,
14 ** or constant definition does not appear in this file, then it is 14 ** or constant definition does not appear in this file, then it is
15 ** not a published API of SQLite, is subject to change without 15 ** not a published API of SQLite, is subject to change without
16 ** notice, and should not be referenced by programs that use SQLite. 16 ** notice, and should not be referenced by programs that use SQLite.
17 ** 17 **
18 ** Some of the definitions that are in this file are marked as 18 ** Some of the definitions that are in this file are marked as
19 ** "experimental". Experimental interfaces are normally new 19 ** "experimental". Experimental interfaces are normally new
20 ** features recently added to SQLite. We do not anticipate changes 20 ** features recently added to SQLite. We do not anticipate changes
21 ** to experimental interfaces but reserve to make minor changes if 21 ** to experimental interfaces but reserve to make minor changes if
22 ** experience from use "in the wild" suggest such changes are prudent. 22 ** experience from use "in the wild" suggest such changes are prudent.
23 ** 23 **
24 ** The official C-language API documentation for SQLite is derived 24 ** The official C-language API documentation for SQLite is derived
25 ** from comments in this file. This file is the authoritative source 25 ** from comments in this file. This file is the authoritative source
26 ** on how SQLite interfaces are suppose to operate. 26 ** on how SQLite interfaces are suppose to operate.
27 ** 27 **
28 ** The name of this file under configuration management is "sqlite.h.in". 28 ** The name of this file under configuration management is "sqlite.h.in".
29 ** The makefile makes some minor changes to this file (such as inserting 29 ** The makefile makes some minor changes to this file (such as inserting
30 ** the version number) and changes its name to "sqlite3.h" as 30 ** the version number) and changes its name to "sqlite3.h" as
31 ** part of the build process. 31 ** part of the build process.
32 ** 32 **
33 ** @(#) $Id: sqlite.h.in,v 1.212 2007/06/14 20:57:19 drh Exp $ 33 ** @(#) $Id: sqlite.h.in,v 1.212 2007/06/14 20:57:19 drh Exp $
34 */ 34 */
35 #ifndef _SQLITE3_H_ 35 #ifndef _SQLITE3_H_
36 #define _SQLITE3_H_ 36 #define _SQLITE3_H_
37 #include <stdarg.h> /* Needed for the definition of va_list */ 37 #include <stdarg.h> /* Needed for the definition of va_list */
38 38
39 /* 39 /*
40 ** Make sure we can call this stuff from C++. 40 ** Make sure we can call this stuff from C++.
41 */ 41 */
42 #ifdef __cplusplus 42 #ifdef __cplusplus
43 extern "C" { 43 extern "C" {
44 #endif 44 #endif
45 45
46 /* 46 /*
47 ** Make sure these symbols where not defined by some previous header 47 ** Make sure these symbols where not defined by some previous header
48 ** file. 48 ** file.
49 */ 49 */
50 #ifdef SQLITE_VERSION 50 #ifdef SQLITE_VERSION
(...skipping 2567 matching lines...) Show 10 above Show 10 below
2618 ** 2618 **
2619 ** Close an open [sqlite3_blob | blob handle]. 2619 ** Close an open [sqlite3_blob | blob handle].
2620 */ 2620 */
2621 int sqlite3_blob_close(sqlite3_blob *); 2621 int sqlite3_blob_close(sqlite3_blob *);
2622 2622
2623 /* 2623 /*
2624 ** CAPI3REF: Return The Size Of An Open BLOB 2624 ** CAPI3REF: Return The Size Of An Open BLOB
2625 ** 2625 **
2626 ** Return the size in bytes of the blob accessible via the open 2626 ** Return the size in bytes of the blob accessible via the open
2627 ** [sqlite3_blob | blob-handle] passed as an argument. 2627 ** [sqlite3_blob | blob-handle] passed as an argument.
2628 */ 2628 */
2629 int sqlite3_blob_bytes(sqlite3_blob *); 2629 int sqlite3_blob_bytes(sqlite3_blob *);
2630 2630
2631 /* 2631 /*
2632 ** CAPI3REF: Read Data From A BLOB Incrementally 2632 ** CAPI3REF: Read Data From A BLOB Incrementally
2633 ** 2633 **
2634 ** This function is used to read data from an open 2634 ** This function is used to read data from an open
2635 ** [sqlite3_blob | blob-handle] into a caller supplied buffer. 2635 ** [sqlite3_blob | blob-handle] into a caller supplied buffer.
2636 ** n bytes of data are copied into buffer 2636 ** n bytes of data are copied into buffer
2637 ** z from the open blob, starting at offset iOffset. 2637 ** z from the open blob, starting at offset iOffset.
2638 ** 2638 **
2639 ** On success, SQLITE_OK is returned. Otherwise, an 2639 ** On success, SQLITE_OK is returned. Otherwise, an
2640 ** [SQLITE_ERROR | SQLite error code] or an 2640 ** [SQLITE_ERROR | SQLite error code] or an
2641 ** [SQLITE_IOERR_READ | extended error code] is returned. 2641 ** [SQLITE_IOERR_READ | extended error code] is returned.
2642 */ 2642 */
2643 int sqlite3_blob_read(sqlite3_blob *, void *z, int n, int iOffset); 2643 int sqlite3_blob_read(sqlite3_blob *, void *z, int n, int iOffset);
2644 2644
2645 /* 2645 /*
2646 ** CAPI3REF: Write Data Into A BLOB Incrementally 2646 ** CAPI3REF: Write Data Into A BLOB Incrementally
2647 ** 2647 **
2648 ** This function is used to write data into an open 2648 ** This function is used to write data into an open
2649 ** [sqlite3_blob | blob-handle] from a user supplied buffer. 2649 ** [sqlite3_blob | blob-handle] from a user supplied buffer.
2650 ** n bytes of data are copied from the buffer 2650 ** n bytes of data are copied from the buffer
2651 ** pointed to by z into the open blob, starting at offset iOffset. 2651 ** pointed to by z into the open blob, starting at offset iOffset.
2652 ** 2652 **
2653 ** If the [sqlite3_blob | blob-handle] passed as the first argument 2653 ** If the [sqlite3_blob | blob-handle] passed as the first argument
2654 ** was not opened for writing (the flags parameter to [sqlite3_blob_open()] 2654 ** was not opened for writing (the flags parameter to [sqlite3_blob_open()]
2655 *** was zero), this function returns [SQLITE_READONLY]. 2655 *** was zero), this function returns [SQLITE_READONLY].
2656 ** 2656 **
2657 ** This function may only modify the contents of the blob, it is 2657 ** This function may only modify the contents of the blob, it is
2658 ** not possible to increase the size of a blob using this API. If 2658 ** not possible to increase the size of a blob using this API. If
2659 ** offset iOffset is less than n bytes from the end of the blob, 2659 ** offset iOffset is less than n bytes from the end of the blob,
2660 ** [SQLITE_ERROR] is returned and no data is written. 2660 ** [SQLITE_ERROR] is returned and no data is written.
2661 ** 2661 **
2662 ** On success, SQLITE_OK is returned. Otherwise, an 2662 ** On success, SQLITE_OK is returned. Otherwise, an
2663 ** [SQLITE_ERROR | SQLite error code] or an 2663 ** [SQLITE_ERROR | SQLite error code] or an
2664 ** [SQLITE_IOERR_READ | extended error code] is returned. 2664 ** [SQLITE_IOERR_READ | extended error code] is returned.
2665 */ 2665 */
2666 int sqlite3_blob_write(sqlite3_blob *, const void *z, int n, int iOffset); 2666 int sqlite3_blob_write(sqlite3_blob *, const void *z, int n, int iOffset);
2667 2667
2668 #if !defined(SQLITE_OMIT_PRAGMA) && !defined(SQLITE_OMIT_PARSER)
2669
2670 /* 2668 /*
2671 ** CAPI3REF: Read User Version Value 2669 ** Gears-specific: Read User Version Value
2672 ** 2670 **
2673 ** This function reads the user version cookie and sets the value of 2671 ** This function reads the user version cookie and sets the value of
2674 ** user_version to it. 2672 ** user_version to it.
2675 ** 2673 **
2676 ** Returns SQLITE_OK on success. Otherwise, an error code is returned 2674 ** Returns SQLITE_OK on success. Otherwise, an error code is returned
2677 */ 2675 */
2678 int sqlite3_pragma_get_user_version(sqlite3*, int *user_version); 2676 int sqlite3_get_user_version(sqlite3*, int *user_version);
2679 2677
2680 /* 2678 /*
2681 ** CAPI3REF: Write User Version Value 2679 ** Gears-specific: Write User Version Value
2682 ** 2680 **
2683 ** This function writes the user version cookie. 2681 ** This function writes the user version cookie.
2684 ** 2682 **
2685 ** returns SQLITE_OK on success. Otherwise, an error code is returned 2683 ** returns SQLITE_OK on success. Otherwise, an error code is returned
2686 */ 2684 */
2687 int sqlite3_pragma_set_user_version(sqlite3*, int user_version); 2685 int sqlite3_set_user_version(sqlite3*, int user_version);
2688
2689 #endif /* SQLITE_OMIT_PRAGMA || SQLITE_OMIT_PARSER */
2690 2686
2691 /* 2687 /*
2692 ** Undo the hack that converts floating point types to integer for 2688 ** Undo the hack that converts floating point types to integer for
2693 ** builds on processors without floating point support. 2689 ** builds on processors without floating point support.
2694 */ 2690 */
2695 #ifdef SQLITE_OMIT_FLOATING_POINT 2691 #ifdef SQLITE_OMIT_FLOATING_POINT
2696 # undef double 2692 # undef double
2697 #endif 2693 #endif
2698 2694
2699 #ifdef __cplusplus 2695 #ifdef __cplusplus
2700 } /* End of the 'extern "C"' block */ 2696 } /* End of the 'extern "C"' block */
2701 #endif 2697 #endif
2702 #endif 2698 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld r292