DBIX :: Class :: Resultado :: ExternalTtribute

O Grande Novo DBIX :: Class :: Result :: ExternalTtribute!
Baixe Agora

DBIX :: Class :: Resultado :: ExternalTtribute Classificação e resumo

Propaganda

  • Rating:
  • Licença:
  • Perl Artistic License
  • Nome do editor:
  • Nicolas Oudard
  • Site do editor:
  • http://search.cpan.org/~noudard/

DBIX :: Class :: Resultado :: ExternalTtribute Tag


DBIX :: Class :: Resultado :: ExternalTtribute Descrição

O Grande Novo DBIX :: Class :: Result :: ExternalTtribute! DBIX :: Result :: ExternalTtribute é um module.synopsisuse conectado modelo para armazenar o atributo.Para exemplo o resultado do artista: Pacote T :: App :: Main :: Resultado :: Artista; Use base QW / DBIX :: Class :: Core /; __Package __-> tabela ('artista'); __Package __-> Add_Columns ("ID", {data_type => "inteiro", is_auto_increment => 1, is_nullable => 0}, "nome", {data_type => "varchar", default_value => "", is_nullable => 0 , tamanho => 255}); __Package __-> set_primary_key ('ID'); __Package __-> load_components (QW / Resultado :: ExternalTtribute :: Columndata /); __Package __-> init_external_attribute (Artist_Attribute => 'T :: App :: Main :: Result :: ArtistAttribute', 'Artist_ID'); __Package __-> register_relationships_column_data (); use um resultado do atributo do artista: pacote T :: App :: Main :: Resultado :: ArtistAttribute; Use base QW / DBIX :: Class :: Core /; __Package __-> tabela ('artist_attribute'); __Package __-> add_columsts ("artist_id", {data_type => "inteiro", is_nullable => 0}, "year_old", {data_type => "inteiro", is_nullable => 1}); __Package __-> set_primary_key ('artist_id'); __Package __-> load_components (QW / Resultado :: Columndata /); __Package __-> pertence_to (artista => "t :: app :: main :: result: :: artista", 'artist_id'); 1; com esta configuração, você pode chamar métodos: $ artista-> get_column_data => obter apenas colunas de artista resultado $ artist-> get_column_data_with_attribute => obter colunas de artista e artistatura resultado exceto artist_id #update com atributos artists $ artist-> update ({nome => "me", year_old => 15}); #criate with artist atribui meu $ RH = T :: App :: Principal :: Resultado :: Artista-> Preparar_Params_With_Attribute ({nome => "me", year_old => 15}); $ esquema-> ResultSet ('Artist') -> Criar ($ RH); Requisitos: · Perl.


DBIX :: Class :: Resultado :: ExternalTtribute Software Relacionado