@@ -11,14 +11,14 @@ methods:
1111 summary : Installs an SQLite database to device's internal storage.
1212 description : |
1313 Copies an SQLite database file to the device's internal storage (only) and
14- creates a persistent name that is available for the lifetime of the app.
14+ creates a persistent name that is available for the lifetime of the app.
1515 On Android, if the source file does not exist, an empty database is created.
1616
1717 Returns a reference to the opened database. If the destination file already
1818 exists, behaves as <Titanium.Database.open>.
1919
2020 This method is primarily used for iOS.
21-
21+
2222 With Android, as there is often minimal internal storage available, `install`
2323 may only be appropriate for small databases or for prototyping. When database
2424 files are to be stored on external storage (for example, SD Card), a combination of
@@ -34,8 +34,8 @@ methods:
3434 automatically backed up to iCloud and removed from the device in low
3535 storage situations. See
3636 [How do I prevent files from being backed up to iCloud?](https://developer.apple.com/library/ios/qa/qa1719/_index.html)
37- for details. To prevent this for database files, use the <Titanium.Database.DB.file>
38- object with the <Titanium.Filesystem.File.remoteBackup> property.
37+ for details. To prevent this for database files, use the <Titanium.Database.DB.file>
38+ object with the <Titanium.Filesystem.File.remoteBackup> property.
3939
4040 Always [close](Titanium.Database.DB.close) the database after use.
4141 returns :
@@ -45,7 +45,7 @@ methods:
4545 summary : |
4646 Path and filename of the database file to copy to internal storage.
4747 File location is relative to the script's context unless an absolute
48- path, such as one constructed with a <Titanium.Filesystem>
48+ path, such as one constructed with a <Titanium.Filesystem>
4949 constant, is used.
5050 type : String
5151 - name : dbName
@@ -129,10 +129,17 @@ methods:
129129 parameters :
130130 - name : dbName
131131 summary : |
132- The dbname previously passed to <Titanium.Database.install>. An absolute path
133- to the file, including one that is constructed with a <Titanium.Filesystem>
132+ The dbname previously passed to <Titanium.Database.install>. An absolute path
133+ to the file, including one that is constructed with a <Titanium.Filesystem>
134134 constant or <Titanium.Filesystem.directoryForSuite> method, may be used.
135135 type : String
136+ - name : flags
137+ summary : |
138+ Optional flag on Android to pass open flags. If not specified it will use
139+ CREATE_IF_NECESSARY | NO_LOCALIZED_COLLATORS.
140+ type : int
141+ platforms : [android]
142+ since : { android: "13.1.0" }
136143 examples :
137144 - title : Open a Database from Internal Storage (iOS)
138145 example : |
@@ -145,7 +152,7 @@ methods:
145152
146153 A file extension of `sql` is added, and the file is opened from the
147154 following location.
148-
155+
149156 On simulator
150157
151158 * `/Users/<user name>/Library/Application Support/iPhone Simulator/<iOS version>/Applications/<apple app id>/Library/Private Documents/mydb1Installed.sql` (Titanium 1.8.0.1)
@@ -217,3 +224,28 @@ properties:
217224 summary : Constant for requesting a column's value returned in string form.
218225 type : Number
219226 permission : read-only
227+
228+ - name : CREATE_IF_NECESSARY
229+ summary : Constant for database flag.
230+ type : Number
231+ permission : read-only
232+
233+ - name : NO_LOCALIZED_COLLATORS
234+ summary : Constant for database flag.
235+ type : Number
236+ permission : read-only
237+
238+ - name : ENABLE_WRITE_AHEAD_LOGGING
239+ summary : Constant for database flag.
240+ type : Number
241+ permission : read-only
242+
243+ - name : OPEN_READWRITE
244+ summary : Constant for database flag.
245+ type : Number
246+ permission : read-only
247+
248+ - name : OPEN_READONLY
249+ summary : Constant for database flag.
250+ type : Number
251+ permission : read-only
0 commit comments