Skip to content

MitchellWeg/MonetDB.jl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

60 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MonetDB.jl

A pure Julia MonetDB connector.

Usage

Execute

MonetDB.connect("localhost", 50000, "monetdb", "monetdb", "demo")

df = MonetDB.execute(conn, "SELECT 1 AS \"foo\",2 AS \"bar\"")

1×2 DataFrame
 Row │ foo     bar
     │ String  String
─────┼────────────────
   11       2

Loading a DataFrame into a table

A DataFrame can be saved into a table:

MonetDB.connect("localhost", 50000, "monetdb", "monetdb", "demo")

MonetDB.load(conn, my_df, "my_table")

Prepared statements

MonetDB.connect("localhost", 50000, "monetdb", "monetdb", "demo")

prepared_statement = MonetDB.prepare(conn, "SELECT id, foo, bar FROM my_table WHERE bar = ?")

df = MonetDB.execute(conn, prepared_statement, ["there"])

Transaction

Additionally, a transaction can also be started:

MonetDB.connect("localhost", 50000, "monetdb", "monetdb", "demo")

MonetDB.transaction(conn) do
   MonetDB.execute(conn, "INSERT INTO my_table VALUES ('foo')")
end

About

A pure Julia MonetDB Connector.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages