Skip to content

Commit e180c94

Browse files
committed
clean up
1 parent 31b8697 commit e180c94

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

examples/dbiish/dbiish.raku

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use JSON::Fast;
55
# sqlite3 mydb.db < create-db.sql
66

77
# Tell Humming-Bird::Plugin::DBIish where to look for your db.
8-
plugin 'DBIish', ['SQLite', :database<mydb.db>];
8+
plugin 'DBIish', ['SQLite', :database('mydb.db')];
99

1010
get '/users', sub ($request, $response) {
1111
my $sth = $request.db.execute(q:to/SQL/);

lib/Humming-Bird/Plugin/DBIish.rakumod

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,11 @@ method register($server, %routes, @middleware, @advice, **@args) {
3838
}
3939
}
4040
}
41-
42-
%databases{$database-name} = $dbiish.connect(|@database-args);
41+
42+
my $dh = $dbiish.install-driver(shift @database-args);
43+
44+
say @database-args;
45+
%databases{$database-name} = $dh.connect(|%(|@database-args));
4346

4447
CATCH {
4548
default {

0 commit comments

Comments
 (0)