Skip to content

Commit e1729d0

Browse files
committed
Updated the README.md with new changes and documents readdlmsql function
1 parent a1cb079 commit e1729d0

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,14 @@ inspect).
4040

4141
For the general user, a simple `query(querystring)` is enough to return a single resultset in a DataFrame. Results are stored in the passed SQLiteDB type's resultset field. (i.e. `sqlitedb.resultset`). Results are stored by default to avoid immediate garbarge collection and provide access for the user even if the resultset returned by query isn't stored in a variable.
4242

43-
* `* createtable(input::TableInput,conn::SQLiteDB=sqlitedb;name::String="",delim::Char='\0',header::Bool=true,types::Array{DataType,1}=DataType[],infer::Bool=true)`
43+
* `createtable(input::TableInput,conn::SQLiteDB=sqlitedb;name::String="",delim::Char='\0',header::Bool=true,types::Array{DataType,1}=DataType[],infer::Bool=true)`
4444

4545
`createtable` takes either a `DataFrame` argument or file name string. The DataFrame or file is converted to an SQLite table in the specified `SQLiteDB`. By default, the resulting table will have the same name as the DataFrame variable or file name, unless specifically passed with the `name` keyword argument. The `delim`, `header`, `types`, and `infer` keyword arguments are for use with files. `delime` specifies the file delimiter, (comma ',', tab '\t', etc.). `header` specifies whether the file has a header or not and generates column names if needed. `types` allows the user to specify the column types to be read in, while `infer` allows an algorithm to figure out each columns type before commiting to the SQLite table. Note that if the `types` argument is empty and `infer=false`, then all values will be passed as Strings/text, which ends up being very fast, but obviously without any resulting type information.
4646

47+
* `readdlmsql(input::String,conn::SQLiteDB=sqlitedb;sql::String="select * from file",name::String="file",delim::Char='\0',header::Bool=true,types::Array{DataType,1}=DataType[],infer::Bool=true)`
48+
49+
`readdlmsql` is pretty simple, and is really just a wrapper around a `createtable` call + `query` call. Arguments are specified similar to `createtable`, with an additional `sql::String` keyword argument where a user can specify a query string to run on the created table to return in a DataFrame. Cousin function to `sqldf` R package's `read.csv.sql` function.
50+
4751
* `droptable(conn::SQLiteDB=sqlitedb,table::String)`
4852

4953
`droptable` is pretty self-explanatory. It's really just a convenience wrapper around `query` to execute a DROP TABLE command.
@@ -54,8 +58,6 @@ inspect).
5458

5559

5660

57-
`createtable` specifying a delimted (csv,tsv,etc.) file for the table to be created from. `readdlmsql` will then be possible, allowing a raw file to be read and a DataFrame to be returned according to a given SQL statement.
58-
5961
#### Types
6062
* `SQLiteDB`
6163

0 commit comments

Comments
 (0)