mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
make sqlite.DB public; make string.left/right private
This commit is contained in:
@ -8,12 +8,12 @@ module sqlite
|
||||
struct C.sqlite3
|
||||
struct C.sqlite3_stmt
|
||||
|
||||
struct DB {
|
||||
pub struct DB {
|
||||
mut:
|
||||
conn &C.sqlite3
|
||||
}
|
||||
|
||||
struct Row {
|
||||
pub struct Row {
|
||||
pub mut:
|
||||
vals []string
|
||||
}
|
||||
@ -39,6 +39,7 @@ fn C.sqlite3_open()
|
||||
fn C.sqlite3_step() int
|
||||
fn C.sqlite3_prepare_v2()
|
||||
fn C.sqlite3_finalize()
|
||||
fn C.sqlite3_column_count(voidptr) int
|
||||
|
||||
pub fn (db DB) q_string(query string) string {
|
||||
stmt := &C.sqlite3_stmt(0)
|
||||
@ -49,7 +50,6 @@ pub fn (db DB) q_string(query string) string {
|
||||
return res
|
||||
}
|
||||
|
||||
fn C.sqlite3_column_count(voidptr) int
|
||||
|
||||
pub fn (db DB) exec(query string) []Row {
|
||||
stmt := &C.sqlite3_stmt(0)
|
||||
|
Reference in New Issue
Block a user