Perl
と ミルキィホームズ
が好きですtsucchi@surreal[620]$ reply
reply@surreal.local[0]>
reply@surreal.local[1]> 1 + 1
$res[0] = '2'
reply@surreal.local[2]> $a = 123
$res[1] = '123'
reply@surreal.local[3]> $b = 456
$res[2] = '456'
reply@surreal.local[4]> $a + $b
$res[3] = '579'
reply@surreal.local[5]> rand()
$res[4] = '0.0647113826862586'
reply@surreal.local[6]> exit
% reply-service1
1> Select('detective', { id => 1 });
$res[1] = {
id => 1,
name => 'シャーロック・シェリンフォード',
age => 15,
toys => 'サイコキネシス',
birthday => '3/31',
}
no strict 'vars'
[LoadClass]
よしな
にロードしてくれる物体こういうのが...
1> Select('detective', { id => 1 });
$res[1] = {
id => 1,
name => "\x{30b7}\x{30e3}\x{30fc}\x{30ed}\x{30c3}\x{30af}\x{30fb}\x{30b7}\x{30a7}\x{30ea}\x{30f3}\x{30d5}\x{30a9}\x{30fc}\x{30c9}",
age => 15,
toys => "\x{30b5}\x{30a4}\x{30b3}\x{30ad}\x{30cd}\x{30b7}\x{30b9}",
birthday => '3/31',
}
こうなる。超便利!
1> Select('detective', { id => 1 });
$res[1] = {
id => 1,
name => 'シャーロック・シェリンフォード',
age => 15,
toys => 'サイコキネシス',
birthday => '3/31',
}
export PS1="\!> "
[StandardPrompt]
prompt='reply@' . Show_dbname() . "[$history_count]> "
reply@myservice[10]>
use Otogiri;
use Otogiri::Plugin;
Otogiri->load_plugin('DeleteCascade');
my $db = Otogiri->new( connect_info => $connect_info );
$db->insert('parent_table', { id => 123, value => 'aaa' });
$db->insert('child_table', { parent_id => 123, value => 'bbb'}); # child.parent_id referes parent_table.id(FK)
$db->delete_cascade('parent_table', { id => 123 }); # both parent_table and child_table are deleted.
冒険☆ミルキィロード!!買いましょう!
Use a spacebar or arrow keys to navigate