mirror of
https://github.com/vlang/v.git
synced 2025-08-03 09:47:15 -04:00
18 lines
303 B
V
18 lines
303 B
V
// vtest build: !(macos || windows)
|
|
import db.mysql
|
|
|
|
fn main() {
|
|
mut conn := mysql.connect(
|
|
host: 'localhost'
|
|
port: 3306
|
|
username: 'root'
|
|
password: ''
|
|
dbname: 'mysql'
|
|
)!
|
|
res := conn.query('show tables')!
|
|
for row in res.rows() {
|
|
println(row.vals.join(', '))
|
|
}
|
|
conn.close()!
|
|
}
|