54 |
54 |
55 -- Calls DBD.{Driver}.New(...) |
55 -- Calls DBD.{Driver}.New(...) |
56 return connection_class.New(name, username, password, host, port) |
56 return connection_class.New(name, username, password, host, port) |
57 end |
57 end |
58 |
58 |
|
59 -- Help function to do prepare and execute in |
|
60 -- a single step |
59 function Do(dbh, sql, ...) |
61 function Do(dbh, sql, ...) |
60 local sth,err = dbh:prepare(sql) |
62 local sth,err = dbh:prepare(sql) |
61 |
63 |
62 if not sth then |
64 if not sth then |
63 return false, err |
65 return false, err |