µ¥ÀÌÅÍ :: ObjectDriver.

°£´ÜÇÏ°í Åõ¸íÇÑ µ¥ÀÌÅÍ ÀÎÅÍÆäÀ̽º, ij½Ì Æ÷ÇÔ
Áö±Ý ´Ù¿î·Îµå

µ¥ÀÌÅÍ :: ObjectDriver. ¼øÀ§ ¹× ¿ä¾à

±¤°í

  • Rating:
  • ƯÇã:
  • Perl Artistic License
  • °¡°Ý:
  • FREE
  • °Ô½ÃÀÚ À̸§:
  • Benjamin Trott
  • °Ô½ÃÀÚ À¥»çÀÌÆ®:
  • http://search.cpan.org/~btrott/

µ¥ÀÌÅÍ :: ObjectDriver. ű×


µ¥ÀÌÅÍ :: ObjectDriver. ¼³¸í

ij½ÌÀÌÀÖ´Â °£´ÜÇÏ°í Åõ¸íÇÑ µ¥ÀÌÅÍ ÀÎÅÍÆäÀ̽º Data :: ObjectDriver´Â °´Ã¼ °ü°èÇü ¸ÅÆÛÀÔ´Ï´Ù. Áï, °´Ã¼ ÁöÇâ µðÀÚÀÎ °³³äÀ» °ü°èÇü µ¥ÀÌÅͺ£À̽º¿¡ ¸ÊÇÎÇÕ´Ï´Ù. I.Data:BjectDriver´Â 6 °³ ºÐ¸® µÈ MT :: objectDriver Ŭ·¡½º¿¡¼­ Inspeed WegoÀÇ Mt :: ObjectDriver Ŭ·¡½º¿¡¼­ ¿µ°¨À» ¾ò¾ú½À´Ï´Ù. Á¦Ç°. ±×·¯³ª ±×°ÍÀº ij½Ì ¹× ÆÄƼ¼Ç ·¹À̾ Ãß°¡µÇ¾î µ¥ÀÌÅÍ°¡ ÀúÀåµÈ À§Ä¡¸¦ ¾Ë¾Æ¾ß ÇÒ ÇÊ¿ä¾øÀÌ ¿©·¯ ¹°¸®Àû µ¥ÀÌÅͺ£À̽º¸¦ ÅëÇØ µ¥ÀÌÅ͸¦ Àü°³ ÇÒ ¼ö ÀÖ½À´Ï´Ù. ÇöÀç ¾ËÆÄ ÄÚµå·Î °£Áֵ˴ϴÙ. API´Â ´ëºÎºÐ °íÁ¤µÇ¾î ÀÖÁö¸¸ ¹Ì·¡ÀÇ ÀÛÀº º¯È­¸¦ º¼ ¼ö ÀÖ½À´Ï´Ù. ±×°ÍÀÌ °¡Ä¡°¡ÀÖ´Â °Í¿¡ ´ëÇØ, º¯°æÀ»À§ÇÑ °¡Àå ÁÁ¾ÆÇÏ´Â ¿µ¿ªÀº °Ë»ö ¹æ¹ý¿¡ ´ëÇÑ ±¸¹®¿¡ ÀÖÀ¸¸ç, °ÅÁÖ È£È¯¼ºÀÇ ¹æ½ÄÀ¸·Î ¸¹Àº ºÎºÐÀ» ²÷Áö ¾ÊÀ» °ÍÀÔ´Ï´Ù .Snopsis ## µ¥ÀÌÅͺ£À̽º µå¶óÀ̹ö Äڵ带 ¼³Á¤ÇÕ´Ï´Ù. ½Ä¹° µå¶óÀ̹ö ÆÐÅ°Áö; ÇÏÀ§ µå¶óÀ̹ö {data :: objectriver :: driver :: dbi-> new (dsn => dbi : mysql : dbname ', username =>'username ', password => password')} ## Ŭ·¡½º ¼³Á¤ ±ÍÇÏÀÇ Á¶¸®¹ý ¹× ¼ººÐÀÇ ¹°Ã¼. ÆÐÅ°Áö Á¶¸®¹ý; ±âº» QW (data :: ObjectDriver :: baseObject)¸¦ »ç¿ëÇϽʽÿÀ. __package __-> install_properties ({columns => [ 'recipe_id', 'title', dataSource => 'recipe', primary_key => 'recipe_id', driver => fooddriver-> driver,}); ÆÐÅ°Áö ¼ººÐ; ±âº» QW (data :: ObjectDriver :: baseObject)¸¦ »ç¿ëÇϽʽÿÀ. __package __-> install_properties ({columns => [ingredient_id ','recipe_id ','name ','anguredient ', dataSource =>'ingredient ', primary_key => [recipe_id', 'ingredient_id', driver => ½ÄÇ° ¿îÀüÀÚ -> µå¶óÀ̹ö,}); ## ±×¸®°í Áö±Ý, ±×µéÀ» »ç¿ëÇϽʽÿÀ! ³» $ recipe = recipe-> new; $ recipe-> Á¦¸ñ ( '¹Ù³ª³ª ¹ÐÅ© ½¦ÀÌÅ©'); $ recipe-> ÀúÀå; ³» $ INGREDIENT = ¼ººÐ -> »õ·Î¿î; $ INREDIENT-> RECIPE_ID ($ recipe-> id); $ INREDIENT-> À̸§ ( '¹Ù³ª³ª'); $ ¼ººÐ -> ¼ö·® (5); $ INREDIENT-> ÀúÀå; ## ´õ ¸¹Àº ¹Ù³ª³ª°¡ ÇÊ¿äÇÕ´Ï´Ù! $ ¼ººÐ -> ¼ö·® (10); $ INREDIENT-> ÀúÀå; ## ¼Ó±â »ý¼ºÀÚ MY $ INGREDIENT = ¼ººÐ -> »õ (recipe_id => $ recipe-> id, name => milk), ¼ö·® => 2); ¿ä±¸ »çÇ× : ¡¤ Perl.


µ¥ÀÌÅÍ :: ObjectDriver. °ü·Ã ¼ÒÇÁÆ®¿þ¾î