nipotan method RSSフィード

 | 

2009-06-05

Mysql::Query::Parser  Mysql::Query::Parser - nipotan method を含むブックマーク はてなブックマーク -  Mysql::Query::Parser - nipotan method  Mysql::Query::Parser - nipotan method のブックマークコメント

The CPAN Search Site - search.cpan.org

use warnings;
use strict;
use Mysql::Query::Parser;
use Data::Dumper;

my $query = Mysql::Query::Parser->new;
my $sql = q|SELECT album FROM song_list WHERE artist = 'AEROSMITH'|;
my $result = $query->analyze_query($sql);
warn Dumper $result;
$VAR1 = {
          'info' => {
                      'table' => [
                                   'song_list '
                                 ],
                      'where' => {
                                   'where' => [
                                                {
                                                  'mark' => '=',
                                                  'value' => '\'AEROSMITH\'',
                                                  'key' => 'artist'
                                                }
                                              ]
                                 }
                    },
          'columns' => 'album'
        };

ふむ

use warnings;
use strict;
use Mysql::Query::Parser;
use Data::Dumper;

my $query = Mysql::Query::Parser->new;
my $sql = q|SELECT album FROM song_list WHERE title = 'Theme from Spiderman'|;
my $result = $query->analyze_query($sql);
warn Dumper $result;
$VAR1 = {
          'info' => {
                      'table' => [
                                   'Spiderman\''
                                 ]
                    },
          'columns' => 'album FROM song_list WHERE title = \'Theme'
        };

ふむむ

 |