Teng tips

1,716 views

Published on

Teng tips @Chiba.pm #1

Published in: Technology
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
1,716
On SlideShare
0
From Embeds
0
Number of Embeds
789
Actions
Shares
0
Downloads
2
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide
  • \n
  • (さらっと流す)\n\n佐藤健太と申します。\n仕事ではソフトウェア開発をやっていて、\nCとC++とJavaScriptとPerlを使うのが得意です。\nオープンソースの開発もやっていて、CPANというPerlのモジュールを公開するプラットフォームでいくつかのライブラリをモジュール化して公開しています。\n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • Teng tips

    1. 1. Teng tips Chiba.pm #1 id:karupaneruraMobile Factory, Inc.
    2. 2. Profile• twitter: @karupanerura• software developer• C/C++/JavaScript/Perl• CPAN Author
    3. 3. What is Teng?
    4. 4. O/R Mapper
    5. 5. tips
    6. 6. Teng#bulk_insert
    7. 7. $teng->bulk_insert( table => [ +{ foo => 1, bar => 2 }, +{ foo => 3, bar => 4 }, ],);
    8. 8. Teng#fast_insert
    9. 9. my $id = $teng->fast_insert( table => +{ foo => 1, bar => 2, },);
    10. 10. Teng::Plugin::Lookup#lookup
    11. 11. my $row = $teng->lookup( table => +{ foo => 1, },);# SQL: SELECT foo, bar FROM table WHERE foo = 1;
    12. 12. Teng#suppress_row_objectsTeng::Iterator#suppress_row_objects
    13. 13. Don’t row objet creation
    14. 14. more performance :)
    15. 15. column/+column search option
    16. 16. my $row = $teng->single( table => +{ foo => 1, }, +{ column => [qw/foo/], });
    17. 17. search withspecific columns
    18. 18. more performance :)
    19. 19. $ENV{TENG_SQL_COMMENT} Teng#sql_comment
    20. 20. /* hoge.pl line at 3 */SELECT foo, bar FROM table
    21. 21. DevOps :)
    22. 22. Teng#sql_builder + Teng#do
    23. 23. thank youfor listening

    ×