mirror of
https://github.com/vlang/v.git
synced 2025-09-15 23:42:28 +03:00
sqlite: create_table()
This commit is contained in:
parent
57af8570fe
commit
158aefc37f
2 changed files with 7 additions and 5 deletions
|
@ -23,7 +23,7 @@ pub struct DB {
|
|||
pub mut:
|
||||
is_open bool
|
||||
mut:
|
||||
conn &C.sqlite3
|
||||
conn &C.sqlite3
|
||||
}
|
||||
|
||||
pub fn (db DB) str() string {
|
||||
|
@ -178,3 +178,7 @@ pub fn (db DB) exec_param(query string, param string) []Row {
|
|||
*/
|
||||
pub fn (db DB) insert<T>(x T) {
|
||||
}
|
||||
|
||||
pub fn (db DB) create_table(table_name string, rows []string) {
|
||||
db.exec('create table $table_name (' + rows.join(',\n') + ')')
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue