Skip to content

Commit 447b561

Browse files
committed
Updated func docs
1 parent 8d79de3 commit 447b561

File tree

11 files changed

+42
-16
lines changed

11 files changed

+42
-16
lines changed

inst/@octave_sqlite/close.m

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,18 +18,20 @@
1818

1919
## -*- texinfo -*-
2020
## @deftypefn {} {} close (@var{db})
21-
## Close the sqlite connection represented by the object @var{db}.
21+
## Close a sqlite connection
22+
##
23+
## Close the previously opened sqlite connection @var{db}.
2224
##
2325
## @subsubheading Inputs
2426
## @table @asis
2527
## @item @var{db}
26-
## Previously created octave_sqlite object
28+
## A previously created octave_sqlite object
2729
## @end table
2830
##
2931
## @subsubheading Outputs
3032
## None
3133
##
32-
## @seealso{sqlite}
34+
## @seealso{sqlite, isopen}
3335
## @end deftypefn
3436

3537
function close (db)

inst/@octave_sqlite/commit.m

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,9 @@
1818

1919
## -*- texinfo -*-
2020
## @deftypefn {} {} commit (@var{db})
21-
## Commit pending transactions of sqlite connection that has AutoCommit = off.
21+
## Commit changes to a database
22+
##
23+
## Commit pending transactions of sqlite connection that has AutoCommit = off set.
2224
##
2325
## @subsubheading Inputs
2426
## @table @asis

inst/@octave_sqlite/execute.m

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@
1818

1919
## -*- texinfo -*-
2020
## @deftypefn {} {} execute (@var{db}, @var{sqlquery})
21+
## Execute a SQL statement on a sqlite database
22+
##
2123
## Execute non select SQL query @var{sqlquery} on a sqlite database.
2224
##
2325
## @subsubheading Inputs
@@ -36,7 +38,7 @@
3638
## @example
3739
## @code {
3840
## # create sql connection
39-
## db = sqlite("mytest.db");
41+
## db = sqlite("mytest.db", "create");
4042
## # create table and then insert a row
4143
## execute(db, 'CREATE TABLE Test (Id INTEGER PRIMARY KEY AUTOINCREMENT, Name TEXT)');
4244
## execute(db, 'INSERT INTO Test (Name) VALUES ("Line1")');

inst/@octave_sqlite/fetch.m

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919
## -*- texinfo -*-
2020
## @deftypefn {} {@var{data} =} fetch (@var{db}, @var{sqlquery})
2121
## @deftypefnx {} {@var{data} =} fetch (@var{db}, @var{sqlquery}, @var{propertyname}, @var{propertyvalue} @dots{})
22+
## Run a SQL query on a sqlite database
23+
##
2224
## Return rows of data after running a SQL query on a sqlite database.
2325
##
2426
## @subsubheading Inputs

inst/@octave_sqlite/isopen.m

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,15 @@
1818

1919
## -*- texinfo -*-
2020
## @deftypefn {} {@var{yesno} =} isopen (@var{db})
21-
## Return true if the sqlite connection is open.
21+
## Check if a sqlite connection is open
22+
##
23+
## Return true if the sqlite connection is open, otherwise
24+
## return false.
2225
##
2326
## @subsubheading Inputs
2427
## @table @asis
2528
## @item @var{db}
26-
## previously opened sqlite database.
29+
## A previously opened sqlite database.
2730
## @end table
2831
##
2932
## @subsubheading Outputs

inst/@octave_sqlite/rollback.m

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,10 @@
1818

1919
## -*- texinfo -*-
2020
## @deftypefn {} {} rollback (@var{db})
21-
## Rollback pending transactions of sqlite connection.
21+
## Rollback changes to a database
22+
##
23+
## Rollback pending transactions of sqlite connection that has
24+
## AutoCommit = off set.
2225
##
2326
## @subsubheading Inputs
2427
## @table @asis

inst/@octave_sqlite/sqlread.m

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,9 @@
1919
## -*- texinfo -*-
2020
## @deftypefn {} {@var{data} =} sqlread (@var{db}, @var{tablename})
2121
## @deftypefnx {} {@var{data} =} sqlread (@var{db}, @var{tablename}, @var{propertyname}, @var{propertyvalue} @dots{})
22-
## Return rows of data from table @var{tablename} in a sqlite database.
22+
## Read rows of data from a table
2323
##
24+
## Return rows of data from table @var{tablename} in a sqlite database.
2425
## This function is the equivalent of running SELECT * FROM @var{table}.
2526
##
2627
## @subsubheading Inputs
@@ -49,7 +50,7 @@
4950
## Select all rows of data from a database table
5051
## @example
5152
## @code {
52-
## # create sql connection
53+
## # create sql connection to an existing database
5354
## db = sqlite("mytest.db");
5455
## data = sqlread(db, 'TestTable');
5556
## }

inst/@octave_sqlite/sqlwrite.m

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,10 @@
2020
## @deftypefn {} {} sqlwrite (@var{db}, @var{tablename}, @var{data})
2121
## @deftypefnx {} {} sqlwrite (@var{db}, @var{tablename}, @var{data}, @var{columntypes})
2222
## @deftypefnx {} {} sqlwrite (@var{db}, @var{tablename}, @var{data}, @var{propertyname}, @var{propertyvalue} @dots{})
23-
## Insert rows of data from @var{tablename}.
23+
## Insert rows of data into a table.
2424
##
25-
## If the table does not exist it will be created, using the ColumnType properyy if available
25+
## Insert rows of data into a sqlite database table.
26+
## If the table does not exist it will be created, using the ColumnType property if available
2627
## otherwise, the type of input data will be used to determine field types.
2728
##
2829
## @subsubheading Inputs
@@ -53,8 +54,8 @@
5354
## @example
5455
## @code {
5556
## # create sql connection
56-
## db = sqlite("mytest.db");
57-
## # create table (if doesnt exist) and then insert 2 rows
57+
## db = sqlite("mytest.db", "create");
58+
## # create table (if it does not exist) and then insert 2 rows
5859
## t = dbtable([1;2],['Name1';'Name2'], 'VariableNames', @{'Id','Name'@});
5960
## # insert table data
6061
## sqlwrite(db, "Test", t, 'ColumnType', @{'numeric', 'text'@});

inst/dbtable.m

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,9 @@
1919
## @deftypefn {} {@var{table} =} dbtable()
2020
## @deftypefnx {} {@var{table} =} dbtable (@var{var1}, @dots{} @var{varn})
2121
## @deftypefnx {} {@var{table} =} dbtable (@dots{} @var{propertyname}, @var{propertyvalue})
22-
## Basic implementation of a table type to avoid dependencies on other packages.
22+
## Create a table of data
23+
##
24+
## dbtable is a basic implementation of a table type to avoid dependencies on other packages.
2325
##
2426
## @subsubheading Inputs
2527
## @table @asis

inst/readdbtable.m

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@
1818
## @deftypefn {} {@var{t} =} readdbtable (@var{filename})
1919
## Create a dbtable from a file
2020
##
21-
## Currently, this is using a very simplistic approach
21+
## Currently, this is using a very simplistic approach to read data from a CSV
22+
## formatted file only.
2223
##
2324
## @subsubheading Inputs
2425
## @table @asis

inst/struct2dbtable.m

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,13 @@
1818
## @deftypefn {} {@var{t} =} struct2dbtable (@var{astruct})
1919
## Create a dbtable from a struct
2020
##
21+
## This function uses the field names and data of the fields to create a table
22+
## representation of the struct.
23+
##
24+
## Each fieldname will be a variable in the table. The data for each variable
25+
## will be the data of the fieldname, and is expected to be a uniform size for
26+
## all fields in the struct.
27+
##
2128
## @subsubheading Inputs
2229
## @table @asis
2330
## @item @var{astruct}

0 commit comments

Comments
 (0)