-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
This New branch is building upon the sqlite_test PR as it passed the testsuite #13
base: dev
Are you sure you want to change the base?
Changes from 56 commits
526ca48
9ea3bd1
ccb0995
9f01623
8c81230
120f262
031dc3c
d5091ee
fa48076
2760adc
f6e27db
535ff8b
0e92556
766149a
43b80c5
6152c9d
106173a
967e798
421f10d
5eadd8e
2d1ed6c
fc02a02
fdef69c
b18efea
6cf9c35
d5d8fc8
68060cd
b859b4c
8cc1492
44544a2
aadd240
993c107
7d2b331
a8054b2
3913dea
a5315fd
75389c8
584f321
fb64e28
2fe8cc1
7f4a4b6
d0cb58f
2ba693d
a3b06ba
37250d0
53e1006
f69c868
f71cc67
4bc4225
a801308
4b86aba
16bbbbd
d2571d2
fd52e17
71efece
41e8e02
666bc10
503bbe9
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Updated authors and compat entries. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,19 @@ | ||
name = "DBConnector" | ||
uuid = "5242bac9-aa14-4800-b46b-fcd14df13057" | ||
version = "1.0.0" | ||
authors = ["Jacob Zelko <[email protected]>", "Fareeda Abdelazeez"] | ||
version = "0.1.0" | ||
|
||
[deps] | ||
DBInterface = "a10d1c49-ce27-4219-8d33-6db1a4562965" | ||
JDBC = "6042db11-3c3d-5e84-8dba-9cbf74c9ba48" | ||
LibPQ = "194296ae-ab2e-5f79-8cd4-7183a0a5a0d1" | ||
MySQL = "39abe10b-433b-5dbd-92d4-e302a9df00cd" | ||
ODBC = "be6f12e9-ca4f-5eb2-a339-a4f995cc0291" | ||
SQLite = "0aa819cd-b072-5ff4-a722-6bc24af294d9" | ||
|
||
[compat] | ||
DBInterface = "2.5" | ||
LibPQ = "1.15" | ||
MySQL = "1.4" | ||
SQLite = "1.6" | ||
julia = "1.6" | ||
|
||
[extras] | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,31 @@ | ||
using Documenter, Example | ||
using Documenter | ||
|
||
makedocs(modules = [Example], sitename = "Example.jl") | ||
makedocs(; | ||
modules = [DBConnector], | ||
authors = "Jacob Zelko (aka TheCedarPrince) <[email protected]> and contributors", | ||
repo = "https://github.com/JuliaHealth/DBConnector.jl/blob/{commit}{path}#L{line}", | ||
sitename = "DBConnector.jl", | ||
format = Documenter.HTML(; | ||
prettyurls = get(ENV, "CI", "false") == "true", | ||
canonical = "https://JuliaHealth.github.io/DBConnector.jl", | ||
assets = String[], | ||
edit_link = "dev", | ||
footer = "Created by [Jacob Zelko](https://jacobzelko.com) & [Georgia Tech Research Institute](https://www.gtri.gatech.edu). [License](https://github.com/JuliaHealth/OMOPCDMCohortCreator.jl/blob/main/LICENSE)" | ||
), | ||
pages = [ | ||
"Home" => "index.md", | ||
"Tutorials" => [ | ||
"SQLite.md", | ||
"MySQL.md", | ||
"postgreSQL.md" | ||
], | ||
"API" => "api.md", | ||
"Contributing" => "contributing.md" | ||
], | ||
) | ||
|
||
deploydocs(repo = "github.com/quinnj/Example.jl.git", push_preview = true) | ||
deploydocs(; | ||
repo = "github.com/JuliaHealth/DBConnector.jl", | ||
push_preview = true, | ||
devbranch = "main", | ||
) |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
# MySQL Connection Tutorial | ||
|
||
```@contents | ||
Pages = ["MySQL.md"] | ||
``` | ||
|
||
This tutorial presents a step by step guide on using DBConnector to connect a MySQL database. | ||
|
||
### Prerequisites | ||
|
||
Basic knowledge of Julia (such as installing packages into environments and working with the Julia REPL and Julia files) is necessary; you can learn all [that here](https://pkgdocs.julialang.org/v1/getting-started/). | ||
|
||
Get your database's : | ||
|
||
1- username | ||
2- password | ||
3- host | ||
5- Database name | ||
|
||
optional: | ||
- port (3306 by default) | ||
- unix_socket | ||
- client_flag | ||
- opts=opts | ||
|
||
|
||
## Environment Set-Up | ||
|
||
For this tutorial, you will need to activate an environment; to get into package mode within your Julia REPL, write `]`: | ||
|
||
```julia-repl | ||
pkg> activate TUTORIAL | ||
``` | ||
|
||
|
||
### Packages | ||
|
||
|
||
|
||
You will need the following packages for this tutorial which you can install in package mode: | ||
|
||
"]" sets package mode | ||
|
||
```julia-repl | ||
TUTORIAL> add DBConnector | ||
``` | ||
|
||
"Backspace" to return to Julia mode | ||
|
||
``` | ||
using DBConnector | ||
|
||
conn= _dbconnect(MySQL.Connection, host, user, password, db=db) | ||
|
||
``` | ||
In case you want to use the optional strings: | ||
|
||
``` | ||
using DBConnector | ||
|
||
conn= _dbconnect(MySQL.Connection, host, user, password, db="the database name", port = 3306, unix_socket=unix_socket, client_flag=client_flag, opts=opts ) | ||
|
||
``` | ||
|
||
Now you are connected! | ||
|
||
Note: It produces error only in case the path is incorrect credentials | ||
|
||
### Packages Used in Analysis | ||
|
||
Package descriptions: | ||
|
||
- [`SQLite`](https://github.com/JuliaDatabases/SQLite.jl) - A Julia interface to the SQLite library |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
# SQLite Connection Tutorial | ||
|
||
```@contents | ||
Pages = ["SQLite.md"] | ||
``` | ||
|
||
This tutorial presents a step by step guide on using DBConnector to connect a SQLite database. | ||
|
||
### Prerequisites | ||
|
||
Basic knowledge of Julia (such as installing packages into environments and working with the Julia REPL and Julia files) is necessary; you can learn all [that here](https://pkgdocs.julialang.org/v1/getting-started/). | ||
|
||
Get your database's file path | ||
|
||
## Environment Set-Up | ||
|
||
For this tutorial, you will need to activate an environment; to get into package mode within your Julia REPL, write `]`: | ||
|
||
```julia-repl | ||
pkg> activate TUTORIAL | ||
``` | ||
|
||
|
||
### Packages | ||
|
||
|
||
|
||
You will need the following packages for this tutorial which you can install in package mode: | ||
|
||
"]" sets package mode | ||
|
||
```julia-repl | ||
TUTORIAL> add DBConnector | ||
``` | ||
|
||
"Backspace" to return to Julia mode | ||
|
||
``` | ||
conn= _dbconnect(SQLite.DB, "../test/data/sqlite.db") | ||
``` | ||
Now you are connected! and if the file wasn't exist it will be created! | ||
|
||
Note: It produces error only in case the path is incorrect | ||
|
||
### Packages Used in Analysis | ||
|
||
Package descriptions: | ||
|
||
- [`SQLite`](https://github.com/JuliaDatabases/SQLite.jl) - A Julia interface to the SQLite library |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
# PostgreSQL Connection Tutorial | ||
|
||
```@contents | ||
Pages = ["PostgreSQL.md"] | ||
``` | ||
|
||
This tutorial presents a step by step guide on using DBConnector to connect to PostgreSQL database using LibPQ library. | ||
|
||
### Prerequisites | ||
|
||
Basic knowledge of Julia (such as installing packages into environments and working with the Julia REPL and Julia files) is necessary; you can learn all [that here](https://pkgdocs.julialang.org/v1/getting-started/). | ||
|
||
Get your database's : | ||
|
||
1- username | ||
2- password | ||
3- host | ||
5- Database name | ||
|
||
optional: | ||
- port (5432 by default) | ||
- unix_socket | ||
- client_flag | ||
- opts=opts | ||
|
||
|
||
## Environment Set-Up | ||
|
||
For this tutorial, you will need to activate an environment; to get into package mode within your Julia REPL, write `]`: | ||
|
||
```julia-repl | ||
pkg> activate TUTORIAL | ||
``` | ||
|
||
|
||
### Packages | ||
|
||
|
||
|
||
You will need the following packages for this tutorial which you can install in package mode: | ||
|
||
"]" sets package mode | ||
|
||
```julia-repl | ||
TUTORIAL> add DBConnector | ||
``` | ||
|
||
"Backspace" to return to Julia mode | ||
|
||
``` | ||
using DBConnector | ||
|
||
conn= _dbconnect(LibPQ.Connection, host, user, password, db=db) | ||
|
||
``` | ||
In case you want to use the optional strings: | ||
|
||
``` | ||
using DBConnector | ||
|
||
conn= _dbconnect(LibPQ.Connection, host, user, password, db="the database name", port = 5432, unix_socket=unix_socket, client_flag=client_flag, opts=opts ) | ||
|
||
``` | ||
|
||
Now you are connected! | ||
|
||
Note: It produces error only in case the path is incorrect credentials | ||
|
||
### Packages Used in Analysis | ||
|
||
Package descriptions: | ||
|
||
- [`LibPQ`](https://github.com/chris-b1/LibPQ.jl#dbinterface) - A Julia interface to the LibPQ library |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,18 @@ | ||
# Example | ||
# Welcome to the `DBConnector.jl` Docs | ||
|
||
> Get your credentials and connect to databases in one step with DBConnector! | ||
|
||
|
||
To get started, visit the section as well as visit the visit the [Tutorials](@ref) section to see all the functions available. | ||
If you want to contribute, please check out our guide! | ||
|
||
## Main Features 🔧 | ||
|
||
The biggest features of this package are: | ||
|
||
- "SQLite" functions [SQLite](@ref) a database | ||
- "MySQL" functions to [MySQL](@ref) a database | ||
- "PostgreSQL" functions to [postgreSQL](@ref) database connections | ||
|
||
|
||
Example Julia package repo. | ||
|
||
```@autodocs | ||
Modules = [Example] | ||
``` |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# Tutorials | ||
|
||
```@contents | ||
Pages = ["tutorials.md"] | ||
``` | ||
|
||
These tutorials are designed to equip new users with how to get started with DBConnector | ||
|
||
- "SQLite" functions [SQLite](@ref) a database | ||
- "MySQL" functions to [MySQL](@ref) a database | ||
- "PostgreSQL" functions to [postgreSQL](@ref) database connections |
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I overhauled this a little to deprecate some support for ODBC and JDBC connections as well as add a proper import. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Had to change the syntax to get this to re-trigger but it is now working.