Permalink
Browse files

quote-identifier

  • Loading branch information...
1 parent 44c09e2 commit 1cb4082d043b7e716defd633a23b97500dd2af38 @moritz moritz committed Sep 29, 2012
Showing with 16 additions and 0 deletions.
  1. +12 −0 lib/DBDish.pm6
  2. +4 −0 lib/DBDish/mysql.pm6
View
@@ -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
View
@@ -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> {

0 comments on commit 1cb4082

Please sign in to comment.