-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #83 from grafana/81-remove-driver-packages
removed all driver packages
- Loading branch information
Showing
22 changed files
with
30 additions
and
662 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import sql from "k6/x/sql"; | ||
|
||
// ramsql is hypothetical, the actual driver name should be used instead. | ||
import driver from "k6/x/sql/driver/ramsql"; | ||
|
||
const db = sql.open(driver, "test_db"); | ||
|
||
export function setup() { | ||
db.exec(`CREATE TABLE IF NOT EXISTS namevalue ( | ||
id INTEGER PRIMARY KEY AUTOINCREMENT, | ||
name VARCHAR NOT NULL, | ||
value VARCHAR | ||
);`); | ||
} | ||
|
||
export function teardown() { | ||
db.close(); | ||
} | ||
|
||
export default function () { | ||
db.exec("INSERT INTO namevalue (name, value) VALUES('extension-name', 'xk6-foo');"); | ||
|
||
let results = sql.query(db, "SELECT * FROM namevalue WHERE name = $1;", "extension-name"); | ||
for (const row of results) { | ||
console.log(`name: ${row.name}, value: ${row.value}`); | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.