4 // #include <dbi/dbi.h>
14 C.dbi_initialize(nil);
16 myVar := C.dbi_conn_new(C.CString("mysql"));
18 C.dbi_conn_set_option((unsafe.Pointer)(myVar), C.CString("host"), C.CString("localhost"));
19 C.dbi_conn_set_option((unsafe.Pointer)(myVar), C.CString("username"), C.CString("your_name"));
20 C.dbi_conn_set_option((unsafe.Pointer)(myVar), C.CString("username"), C.CString("your_name"));
21 C.dbi_conn_set_option((unsafe.Pointer)(myVar), C.CString("password"), C.CString("your_password"));
22 C.dbi_conn_set_option((unsafe.Pointer)(myVar), C.CString("dbname"), C.CString("your_dbname"));
23 C.dbi_conn_set_option((unsafe.Pointer)(myVar), C.CString("encoding"), C.CString("UTF-8"));
24 C.dbi_conn_connect((unsafe.Pointer)(myVar));