mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
sqlite: create_table()
This commit is contained in:
parent
57af8570fe
commit
158aefc37f
@ -455,13 +455,11 @@ s := r'hello\nworld'
|
||||
println(s) // "hello\nworld"
|
||||
```
|
||||
|
||||
Strings can be easily converted to number types:
|
||||
Strings can be easily converted to integers:
|
||||
|
||||
```v
|
||||
s := '42'
|
||||
n := s.int() // 42
|
||||
b := s.byte()
|
||||
u := s.u32()
|
||||
```
|
||||
|
||||
### String interpolation
|
||||
|
@ -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…
Reference in New Issue
Block a user