perfsonar_ps :: client :: Stato :: SQL

un modulo che fornisce metodi per interagire direttamente con un database di stato MA direttamente
Scarica ora

perfsonar_ps :: client :: Stato :: SQL Classifica e riepilogo

Annuncio pubblicitario

  • Rating:
  • Licenza:
  • Other/Proprietary Li...
  • Prezzo:
  • FREE
  • Nome editore:
  • Aaron Brown
  • Sito web dell'editore:
  • http://search.cpan.org/~perfsonar/

perfsonar_ps :: client :: Stato :: SQL Tag


perfsonar_ps :: client :: Stato :: SQL Descrizione

Un modulo che fornisce metodi per interagire direttamente con un database MA di stato perfsonar_ps :: client :: Stato :: SQL è un modulo Perl che consente di interagire con il backend SQL MA SQL direttamente utilizzando un set standard di metodi. L'API fornita è identica all'API per interagire con il MAS tramite la sua interfaccia dei servizi Web. Pertanto, un client scritto da leggere o aggiornare uno stato MA può essere facilmente modificato per interagire direttamente con il database sottostante consentendo interazioni più efficienti se necessario. Il modulo deve essere considerato come oggetto, in cui ogni istanza dell'oggetto rappresenta una connessione a un singolo database. Ogni metodo può quindi essere invocato sull'oggetto per il database specifico.Synopsis usa perfsonar_ps :: client :: Stato :: SQL; My $ Status_Client = nuovo perfsonar_ps :: client :: Stato :: SQL ("DBI: SQLite: dbname = status.db"); se (non definito $ status_client) {stampa "problema creazione di client per lo stato mA \ n"; uscita (-1); } My ($ Stato, $ res) = $ status_client-> aperto; se ($ Stato! = 0) {stampa "PROBLEMA APERTURA Stato MA: $ res \ n"; uscita (-1); } ($ stato, $ res) = $ status_client-> getall (); Se ($ Stato! = 0) {Stampa "Problema Ottenere il database completo: $ res \ n"; uscita (-1); } My @links = (); foreach My $ ID (Keys% {$ res res}) {stampa "link id: $ id \ n"; Foreach My $ link (@ {$ res res -> {$ id}}) {stampa "\ t". $ link-> getstarttime. "-". $ link-> gettingtime. "\n"; Stampa "\ T-knowledge level:". $ link-> getknowledge. "\n"; Stampa "\ T-operstatus:". $ link-> getoperstatus. "\n"; Stampa "\ T-adminstatus:". $ link-> getAdminstatus. "\n"; } spingere @Links, $ ID; } ($ stato, $ res) = $ status_client-> getlinkstatus (\ @ collegamenti ","); Se (Stato $! = 0) {Stampa "Problema Ottenere lo stato più recente del collegamento: $ res \ n"; uscita (-1); } Foreach My $ ID (Keys% {$ res res}) {stampa "ID link: $ id \ n"; Foreach My $ link (@ {$ res -> {$ id}}) {stampa "-operstatus:". $ link-> getoperstatus. "\n"; Stampa "-Adminstatus:". $ link-> getAdminstatus. "\n"; }} ($ stato, $ res) = $ status_client-> getlinkhistory (\ @ collegamenti); IF ($ Stato! = 0) {Stampa "Problema Ottenere la cronologia dei collegamenti: $ res \ n"; uscita (-1); } Foreach My $ ID (Keys% {$ res res}) {stampa "ID link: $ id \ n"; Foreach My $ link (@ {$ res -> {$ id}}) {stampa "-operstatus:". $ link-> getoperstatus. "\n"; Stampa "-Adminstatus:". $ link-> getAdminstatus. "\n"; } } Requisiti: · Perl.


perfsonar_ps :: client :: Stato :: SQL Software correlato