Skip to content

Commit bdd0527

Browse files
committed
Merge branch 'release/1.0.0'
2 parents 8b1a367 + 36fce4b commit bdd0527

File tree

4 files changed

+8094
-1
lines changed

4 files changed

+8094
-1
lines changed
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
### Summary
2+
3+
<!-- Meaningful description of the issue -->
4+
5+
**Expected result:** [What you expect to happen]
6+
7+
**Observed result:** [What actually happens]
8+
9+
### Recipe to Reproduce
10+
11+
1. [First Step]
12+
2. [Second Step]
13+
3. [and so on...]
14+
15+
### Versions
16+
17+
**LiveCode version:**
18+
19+
### Additional Information
20+
21+
<!--
22+
23+
Please provide any additional information that might be necessary to reproduce the issue.
24+
25+
-->
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
### Requirements
2+
3+
- Filling out this template is mandatory. Please provide sufficient information so that the request can be reviewed in a timely manner.
4+
- Please thoroughly test your code to ensure against regressions.
5+
6+
### Description of the Change or Addition
7+
8+
<!--
9+
10+
This description should give a good idea of what your code will be doing, it should make the design of your change easily comprehensible.
11+
12+
-->
13+
14+
### Possible Side-Effects
15+
16+
<!-- What are the possible negative impacts of your code change? -->
17+
18+
### Verification
19+
20+
<!--
21+
22+
How did you verify that all new functionality has the expected effects without introducing any regressions?
23+
24+
-->

README.md

Lines changed: 90 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,92 @@
11
# LiveCode SQLite library
22

3-
A LiveCode SQLite library borrowed from revIgniter.
3+
This SQLite library is borrowed from revIgniter's database library
4+
and includes all features as described in the revIgniter User Guide
5+
(see chapter [Database Library](https://revigniter.com/userGuide/database/index.html)).
6+
It is meant to be used with desktop and mobile apps.
7+
8+
### Requirements
9+
10+
LiveCode version 9 or higher
11+
12+
### How to use this library:
13+
14+
Place the library in the message path, then call the rigLoadDatabase
15+
function to connect to your database like:
16+
17+
get rigLoadDatabase(tParams, tReturn, tActiveGroup, tOptions)
18+
19+
- **tParams** can optionally be a path
20+
to a database or an array of database settings like the settings
21+
in revIgniter's database.lc.
22+
- **tReturn** is an optional boolean which determines if the
23+
database ID should be returned.
24+
- **tActiveGroup** is optional and is used to give the database
25+
configuration group a name.
26+
- **tOptions** the optional fourth parameter is a comma delimited
27+
list of SQLite options. It can be empty or can contain "binary",
28+
"extensions" or both. Note: This parameter is needless if all
29+
settings are included in the first parameter.
30+
31+
Alternatively you can connect to an in-memory database or to a
32+
new database. Build an initial table using the rigNewTableStructure()
33+
function and connect using the rigConnectDB handler like:
34+
35+
put "INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT" into tInitTableA["recipe"][1]["ID"]
36+
put "varchar(255,0) DEFAULT NULL" into tInitTableA["recipe"][2]["Name"]
37+
put "TEXT" into tInitTableA["recipe"][3]["Directions"]
38+
39+
put rigNewTableStructure(tInitTableA) into tInitTable
40+
41+
rigConnectDB tDBfilePath, tInitTable tReturn tActiveGroup tOptions
42+
43+
- **tDBfilePath** the value of this optional parameter can be
44+
empty or a file path or "memory" or "mem" or "in-memory" or
45+
"in-mem" or "inmemory" or "inmem" for creating an in-memory
46+
database. If it is empty the user is prompted to choose the
47+
folder where the database is located. To create a new database
48+
the dialog needs to be canceled.
49+
- **tInitTable** is optional and includes the array data to build
50+
the initial table.
51+
- **tReturn** is a boolean which determines if the database ID should
52+
be returned.
53+
- **tActiveGroup** is optional and is used to give the database
54+
configuration group a name.
55+
- **tOptions** is a comma delimited list of SQLite options. It can
56+
be empty or can contain "binary", "extensions" or both.
57+
58+
### How to convert a query result array to a datagrid array:
59+
60+
This library provides a handler which converts database query result arrays
61+
to datagrid arrays.
62+
63+
queryResultArrayToDgArray @pArray pFields
64+
65+
- **pArray** is the database query result index named "resultarray"
66+
- **pFields** is the database query result index "fieldnames" which
67+
contains the table field names in a numbered array
68+
69+
Here is an example:
70+
71+
# ALL QUERY DATA
72+
put rigDbGet("recipe") into tQuery
73+
74+
# THE QUERY RESULT ARRAY
75+
put tQuery["resultarray"] into tDataGridArray
76+
77+
# CONVERT RESULT ARRAY TO DATGRID ARRAY
78+
queryResultArrayToDgArray tDataGridArray, tQuery["fieldnames"]
79+
80+
# POPULATE DATAGRID
81+
set the dgData of grp "myDatagrid" to tDataGridArray
82+
83+
### License
84+
85+
For the license terms see the LICENSE file.
86+
87+
### Meta
88+
89+
Version: 1.0.0
90+
Web Site: <https://revigniter.com/>
91+
92+
Author: Ralf Bitter

0 commit comments

Comments
 (0)