Documentation Source Text

Check-in [2d231c8139]
Login

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

Overview
Comment:Updates to documentation on date/time functions and pragmas.
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 2d231c81393053110e1df540f1624fe334caaeb4
User & Date: drh 2010-11-21 01:36:40
Context
2010-11-23
15:57
Updates to the PRAGMA documentation. check-in: b5201ace8f user: drh tags: trunk
2010-11-21
01:36
Updates to documentation on date/time functions and pragmas. check-in: 2d231c8139 user: drh tags: trunk
2010-11-20
01:45
Improved sync pragma documentation. check-in: 3ae5d72cbd user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to pages/lang.in.

2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
[http://en.wikipedia.org/wiki/Julian_day | Julian day number]
expressed as a floating point value.
</p>

<h3>Modifiers</h3>

<p>^The time string can be followed by zero or more modifiers that 
alter the date and time string. ^Each modifier
is a transformation that is applied to the time value to its left.
^Modifiers are applied from left to right; order is important.
^(The available modifiers are as follows.</p>

<ol>
<li> NNN days
<li> NNN hours







|







2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
[http://en.wikipedia.org/wiki/Julian_day | Julian day number]
expressed as a floating point value.
</p>

<h3>Modifiers</h3>

<p>^The time string can be followed by zero or more modifiers that 
alter date and/or time. ^Each modifier
is a transformation that is applied to the time value to its left.
^Modifiers are applied from left to right; order is important.
^(The available modifiers are as follows.</p>

<ol>
<li> NNN days
<li> NNN hours

Changes to pages/pragma.in.

92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
...
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175



176
177
178
179
180
181
182
183
184
185
186
187
188
189


190

191
192
193

194


195
196
197
198
199
200
201
...
232
233
234
235
236
237
238



239
240
241
242
243
244
245

<tcl>Pragma {automatic_index} {
    <p>^(<b>PRAGMA automatic_index;
     <br>PRAGMA automatic_index = </b><i>boolean</i><b>;</b></p>

    <p>Query, set, or clear the [automatic indexing] capability.)^
    <p>^[Automatic indexing] is enabled by default.
     ^This pragma only influences the query plan as statements are
     prepared or reprepared.  Existing prepared statements must be
     reprepared for a change in the automatic_index setting to affect
     their operation.
}

Pragma {auto_vacuum} {
    <p><b>PRAGMA auto_vacuum;<br>
          PRAGMA auto_vacuum = </b>
           <i>0 | NONE | 1 | FULL | 2 | INCREMENTAL</i><b>;</b></p>

................................................................................
    returns the current auto_vacuum mode.</p>
}

Pragma cache_size {
    <p>^(<b>PRAGMA cache_size;
       <br>PRAGMA cache_size = </b><i>Number-of-pages</i><b>;</b></p>
    <p>Query or change the suggested maximum number of database disk pages
    that SQLite will hold in memory at once per open database file.)^  ^Whether
    or not this suggestion is honored is at the discretion of the
    [sqlite3_pcache_methods | Application Defined Page Cache].   ^In the
    default page cache implementation, the suggested cache size is honored
    as long as it is 10 or greater.  ^A suggested cache size of less
    than 10 are treated as if it were 10.
    ^Alternative application-defined page cache implementations
    may choose to interpret the suggested cache size in different ways
    or to ignore it all together.
    ^The default suggested cache size is 2000.</p>




    <p>^When you change the cache size using the cache_size pragma, the
    change only endures for the current session.  ^The cache size reverts
    to the default value when the database is closed and reopened.  Use
    the [default_cache_size]
    pragma to check the cache size permanently.</p>
}

Pragma case_sensitive_like {
    <p>^(<b>PRAGMA case_sensitive_like = </b><i>boolean</i><b>;</b>)^</p>
    <p>^The default behavior of the [LIKE] operator is to ignore case
    for ASCII characters. ^Hence, by default <b>'a' LIKE 'A'</b> is
    true.  ^The case_sensitive_like pragma installs a new application-defined
    LIKE function that can change


    this behavior.  ^When case_sensitive_like is enabled,

    <b>'a' LIKE 'A'</b> is false but <b>'a' LIKE 'a'</b> is still true.</p>

    <p>^This pragma only works if the [like | built-in like() SQL function]

    has not been overloaded using [sqlite3_create_function()].</p>


}

Pragma checkpoint_fullfsync {
    <p>^(<b>PRAGMA checkpoint_fullfsync
       <br>PRAGMA checkpoint_fullfsync = </b><i>boolean</i><b>;</b></p>
    <p>Query or change the fullfsync flag for [checkpoint] operations.)^
    ^If this flag is set, then the F_FULLFSYNC syncing method is used
................................................................................
LegacyPragma default_cache_size {
    ^(<b>PRAGMA default_cache_size;
       <br>PRAGMA default_cache_size = </b><i>Number-of-pages</i><b>;</b></p>
    <p>This pragma queries or sets the suggested maximum number of pages
    of disk cache that will be allocated per open database file.)^
    ^The difference between this pragma and [cache_size] is that the
    value set here persists across database connections.



    </p>
}

LegacyPragma empty_result_callbacks {
    <p><b>PRAGMA empty_result_callbacks;
       <br>PRAGMA empty_result_callbacks = </b><i>boolean</i><b>;</b></p>








<
<
<
<







 







|


|
|
<
|



>
>
>









|
|
|
|
|
>
>
|
>
|

<
>
|
>
>







 







>
>
>







92
93
94
95
96
97
98




99
100
101
102
103
104
105
...
155
156
157
158
159
160
161
162
163
164
165
166

167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193

194
195
196
197
198
199
200
201
202
203
204
...
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251

<tcl>Pragma {automatic_index} {
    <p>^(<b>PRAGMA automatic_index;
     <br>PRAGMA automatic_index = </b><i>boolean</i><b>;</b></p>

    <p>Query, set, or clear the [automatic indexing] capability.)^
    <p>^[Automatic indexing] is enabled by default.




}

Pragma {auto_vacuum} {
    <p><b>PRAGMA auto_vacuum;<br>
          PRAGMA auto_vacuum = </b>
           <i>0 | NONE | 1 | FULL | 2 | INCREMENTAL</i><b>;</b></p>

................................................................................
    returns the current auto_vacuum mode.</p>
}

Pragma cache_size {
    <p>^(<b>PRAGMA cache_size;
       <br>PRAGMA cache_size = </b><i>Number-of-pages</i><b>;</b></p>
    <p>Query or change the suggested maximum number of database disk pages
    that SQLite will hold in memory at once per open database file.)^  Whether
    or not this suggestion is honored is at the discretion of the
    [sqlite3_pcache_methods | Application Defined Page Cache].   ^In the
    default page cache implementation, the actual cache size is the
    greater of the suggested cache size and 10.

    Alternative application-defined page cache implementations
    may choose to interpret the suggested cache size in different ways
    or to ignore it all together.
    ^The default suggested cache size is 2000.</p>

    <p>^The suggested cache size is set to the absolute value of the
    <i>Number-of-pages</i> argument given to this pragma.</p>

    <p>^When you change the cache size using the cache_size pragma, the
    change only endures for the current session.  ^The cache size reverts
    to the default value when the database is closed and reopened.  Use
    the [default_cache_size]
    pragma to check the cache size permanently.</p>
}

Pragma case_sensitive_like {
    <p><b>PRAGMA case_sensitive_like = </b><i>boolean</i><b>;</b></p>
    <p>^(The default behavior of the [LIKE] operator is to ignore case
    for ASCII characters. Hence, by default <b>'a' LIKE 'A'</b> is
    true.)^  ^The case_sensitive_like pragma installs a new application-defined
    LIKE function that is either case sensitive or insensitive depending
    on the value of the case_sensitive_like pragma.
    ^When case_sensitive_like is disabled, the default LIKE behavior is
    expressed.  ^(When case_sensitive_like is enabled, case becomes
    significant.  So, for example,
    <b>'a' LIKE 'A'</b> is false but <b>'a' LIKE 'a'</b> is still true.)^</p>


    <p>^Each invocation of this pragma causes any application-defined
    LIKE and/or GLOB functions created using the [sqlite3_create_function()]
    family of interfaces to be replaced with the built-in LIKE and GLOB
    implementations.</p>
}

Pragma checkpoint_fullfsync {
    <p>^(<b>PRAGMA checkpoint_fullfsync
       <br>PRAGMA checkpoint_fullfsync = </b><i>boolean</i><b>;</b></p>
    <p>Query or change the fullfsync flag for [checkpoint] operations.)^
    ^If this flag is set, then the F_FULLFSYNC syncing method is used
................................................................................
LegacyPragma default_cache_size {
    ^(<b>PRAGMA default_cache_size;
       <br>PRAGMA default_cache_size = </b><i>Number-of-pages</i><b>;</b></p>
    <p>This pragma queries or sets the suggested maximum number of pages
    of disk cache that will be allocated per open database file.)^
    ^The difference between this pragma and [cache_size] is that the
    value set here persists across database connections.
    ^The value of the default cache size is stored in the 4-byte
    big-endian integer located at offset 48 in the header of the
    database file.
    </p>
}

LegacyPragma empty_result_callbacks {
    <p><b>PRAGMA empty_result_callbacks;
       <br>PRAGMA empty_result_callbacks = </b><i>boolean</i><b>;</b></p>