Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
quote-identifier
  • Loading branch information
moritz committed Sep 29, 2012
1 parent 44c09e2 commit 1cb4082
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
12 changes: 12 additions & 0 deletions lib/DBDish.pm6
Expand Up @@ -112,6 +112,18 @@ role DBDish::Connection does DBDish::ErrorHandling {
$sth.execute(@params);
}

=begin pod
=head5 quote-identifier
Returns the string parameter as a quoted identifier
=end pod

method quote-identifier(Str:D $name) {
# a first approximation
qq["$name"];
}

=begin pod
=head5 disconnect
The C<disconnect> method
Expand Down
4 changes: 4 additions & 0 deletions lib/DBDish/mysql.pm6
Expand Up @@ -264,6 +264,10 @@ class DBDish::mysql::Connection does DBDish::Connection {
mysql_close($!mysql_client);
True
}

method quote-identifer(Str:D $name) {
qq[`$name`];
}
}

class DBDish::mysql:auth<mberends>:ver<0.0.1> {
Expand Down

0 comments on commit 1cb4082

Please sign in to comment.