Skip to content

Commit

Permalink
[sqlite] remove unspecific code from backend
Browse files Browse the repository at this point in the history
  • Loading branch information
moritz committed May 3, 2012
1 parent 4abaacc commit fa853a9
Showing 1 changed file with 1 addition and 38 deletions.
39 changes: 1 addition & 38 deletions lib/DBDish/SQLite.pm6
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ class DBDish::SQLite::StatementHandle does DBDish::StatementHandle {
}
$!row_status = sqlite3_step($!statement_handle);

@row;
@row || Nil;
}

method finish() {
Expand Down Expand Up @@ -194,43 +194,6 @@ class DBDish::SQLite::Connection does DBDish::Connection {
$rows == 0 ?? '0E0' !! $rows;
}

method selectrow_arrayref(Str $statement, $attr?, *@bind is copy) {
my $sth = self.prepare($statement, $attr);
$sth.execute(@bind);
return $sth.fetchrow_arrayref;
}

method selectrow_hashref(Str $statement, $attr?, *@bind is copy) {
my $sth = self.prepare($statement, $attr);
$sth.execute(@bind);
return $sth.fetchrow_hashref;
}

method selectall_arrayref(Str $statement, $attr?, *@bind is copy) {
my $sth = self.prepare($statement, $attr);
$sth.execute(@bind);
return $sth.fetchall_arrayref;
}

method selectall_hashref(Str $statement, Str $key, $attr?, *@bind is copy) {
my $sth = self.prepare($statement, $attr);
$sth.execute(@bind);
return $sth.fetchall_hashref($key);
}

method selectcol_arrayref(Str $statement, $attr?, *@bind is copy) {
my @results;

my $sth = self.prepare($statement, $attr);
$sth.execute(@bind);
while (my $row = $sth.fetchrow_arrayref) {
@results.push($row[0]);
}

my $aref = @results;
return $aref;
}

method do(Str $sql, *@args) {
my $sth = self.prepare($sql);
$sth.execute(@args);
Expand Down

0 comments on commit fa853a9

Please sign in to comment.