Skip to content

Commit

Permalink
Merge pull request #83 from grafana/81-remove-driver-packages
Browse files Browse the repository at this point in the history
removed all driver packages
  • Loading branch information
szkiba authored Oct 17, 2024
2 parents 2e5f992 + 264db36 commit 7bc830c
Show file tree
Hide file tree
Showing 22 changed files with 30 additions and 662 deletions.
12 changes: 0 additions & 12 deletions drivers/azuresql/register.go

This file was deleted.

13 changes: 0 additions & 13 deletions drivers/clickhouse/register.go

This file was deleted.

13 changes: 0 additions & 13 deletions drivers/mysql/register.go

This file was deleted.

39 changes: 0 additions & 39 deletions drivers/mysql/register_test.go

This file was deleted.

26 changes: 0 additions & 26 deletions drivers/mysql/testdata/script.js

This file was deleted.

13 changes: 0 additions & 13 deletions drivers/postgres/register.go

This file was deleted.

45 changes: 0 additions & 45 deletions drivers/postgres/register_test.go

This file was deleted.

24 changes: 0 additions & 24 deletions drivers/postgres/testdata/script.js

This file was deleted.

13 changes: 0 additions & 13 deletions drivers/sqlite3/register.go

This file was deleted.

15 changes: 0 additions & 15 deletions drivers/sqlite3/register_test.go

This file was deleted.

26 changes: 0 additions & 26 deletions drivers/sqlite3/testdata/script.js

This file was deleted.

13 changes: 0 additions & 13 deletions drivers/sqlserver/register.go

This file was deleted.

27 changes: 0 additions & 27 deletions examples/azuresql_test.js

This file was deleted.

28 changes: 0 additions & 28 deletions examples/clickhouse_test.js

This file was deleted.

27 changes: 27 additions & 0 deletions examples/example.js
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}`);
}
}
27 changes: 0 additions & 27 deletions examples/mssql_test.js

This file was deleted.

Loading

0 comments on commit 7bc830c

Please sign in to comment.