Give SQL.pm a quote_identifier wrapper.
This commit is contained in:
parent
86b5157e4d
commit
1ce5e4ebab
1 changed files with 18 additions and 0 deletions
|
|
@ -861,6 +861,24 @@ sub quoteAndJoin {
|
|||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 quoteIdentifier ( string )
|
||||
|
||||
Returns a string quoted as an identifier to be used as a table name, column name, etc.
|
||||
|
||||
=head3 string
|
||||
|
||||
Any scalar variable that needs to be escaped to be inserted into the database.
|
||||
|
||||
=cut
|
||||
|
||||
sub quoteIdentifier {
|
||||
my $self = shift;
|
||||
my $value = shift;
|
||||
return $self->dbh->quote_identifier($value);
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 read ( sql [ , placeholders ] )
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue