-- MySQL dump 10.13 Distrib 5.1.34, for Win32 (ia32) -- -- Host: localhost Database: cpv -- ------------------------------------------------------ -- Server version 5.1.34-community /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; /*!40101 SET NAMES utf8 */; /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; /*!40103 SET TIME_ZONE='+00:00' */; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; -- -- Table structure for table `ivcurve` -- DROP TABLE IF EXISTS `ivcurve`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `ivcurve` ( `idivcurve` int(11) NOT NULL AUTO_INCREMENT, `platform` varchar(45) DEFAULT NULL, `time` datetime DEFAULT NULL, `guid` varchar(36) NOT NULL, `type` int(11) NOT NULL, `DUT` varchar(45) DEFAULT NULL, `location` varchar(45) DEFAULT NULL, `user` int(11) DEFAULT NULL, `notes` text, `Aperture` double DEFAULT NULL, PRIMARY KEY (`idivcurve`), KEY `user` (`user`), KEY `users` (`user`), CONSTRAINT `users` FOREIGN KEY (`user`) REFERENCES `users` (`idusers`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE=InnoDB AUTO_INCREMENT=15 DEFAULT CHARSET=latin1; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `ivcurve` -- LOCK TABLES `ivcurve` WRITE; /*!40000 ALTER TABLE `ivcurve` DISABLE KEYS */; INSERT INTO `ivcurve` VALUES (13,'test','2009-01-01 12:34:56','d768a715-61cb-11de-820f-f783a9c9f058',1,'0987654321','SF',1,'NOTES\r!!!',123456),(14,'test','2009-01-01 12:34:56','3ad428be-61cf-11de-820f-f783a9c9f058',1,'0987654321','SF',1,'NOTES\r!!!',123456); /*!40000 ALTER TABLE `ivcurve` ENABLE KEYS */; UNLOCK TABLES; -- -- Table structure for table `ivcurve_alignment` -- DROP TABLE IF EXISTS `ivcurve_alignment`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `ivcurve_alignment` ( `idivcurve_alignment` int(11) NOT NULL AUTO_INCREMENT, `idivcurve` int(11) DEFAULT NULL, `index` int(11) DEFAULT '0', `azimuth` double DEFAULT NULL, `elevation` double DEFAULT NULL, `psmx` double DEFAULT NULL, `psmy` double DEFAULT NULL, `DNI` double DEFAULT NULL, `GNI` double DEFAULT NULL, `voltage` double DEFAULT NULL, `current` double DEFAULT NULL, `TS` datetime DEFAULT NULL, `TC1` double DEFAULT NULL, `TC2` double DEFAULT NULL, `TC3` double DEFAULT NULL, `TC4` double DEFAULT NULL, PRIMARY KEY (`idivcurve_alignment`), KEY `ivcurve_alignment` (`idivcurve`), CONSTRAINT `ivcurve_alignment` FOREIGN KEY (`idivcurve`) REFERENCES `ivcurve` (`idivcurve`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB AUTO_INCREMENT=18 DEFAULT CHARSET=latin1; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `ivcurve_alignment` -- LOCK TABLES `ivcurve_alignment` WRITE; /*!40000 ALTER TABLE `ivcurve_alignment` DISABLE KEYS */; INSERT INTO `ivcurve_alignment` VALUES (14,13,0,1,2,3,4,5,6,7,8,'2001-01-01 00:00:00',10,11,12,13),(15,13,1,1,2,3,4,5,6,7,8,'2001-01-01 12:23:45',10,11,12,13),(16,14,0,1,2,3,4,5,6,7,8,'2001-01-01 00:00:00',10,11,12,13),(17,14,1,1,2,3,4,5,6,7,8,'2001-01-01 12:23:45',10,11,12,13); /*!40000 ALTER TABLE `ivcurve_alignment` ENABLE KEYS */; UNLOCK TABLES; -- -- Table structure for table `ivcurve_analysis` -- DROP TABLE IF EXISTS `ivcurve_analysis`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `ivcurve_analysis` ( `idivcurve_analysis` int(11) NOT NULL AUTO_INCREMENT, `idivcurve` int(11) DEFAULT NULL, `Gsh` double DEFAULT NULL, `Rse` double DEFAULT NULL, `Isc` double DEFAULT NULL, `Voc` double DEFAULT NULL, `Pmax` double DEFAULT NULL, `Imp` double DEFAULT NULL, `Vmp` double DEFAULT NULL, `FF` double DEFAULT NULL, `Eff` double DEFAULT NULL, `meanGni` double DEFAULT NULL, `meanDni` double DEFAULT NULL, `GniMp` double DEFAULT NULL, `DniMp` double DEFAULT NULL, `GshR2` double DEFAULT NULL, `RseR2` double DEFAULT NULL, PRIMARY KEY (`idivcurve_analysis`), KEY `ivcurve` (`idivcurve`), KEY `ivcurve_analysis` (`idivcurve`), CONSTRAINT `ivcurve_analysis` FOREIGN KEY (`idivcurve`) REFERENCES `ivcurve` (`idivcurve`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB AUTO_INCREMENT=32 DEFAULT CHARSET=latin1; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `ivcurve_analysis` -- LOCK TABLES `ivcurve_analysis` WRITE; /*!40000 ALTER TABLE `ivcurve_analysis` DISABLE KEYS */; INSERT INTO `ivcurve_analysis` VALUES (30,13,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15),(31,14,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15); /*!40000 ALTER TABLE `ivcurve_analysis` ENABLE KEYS */; UNLOCK TABLES; -- -- Table structure for table `ivcurve_hardware` -- DROP TABLE IF EXISTS `ivcurve_hardware`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `ivcurve_hardware` ( `idivcurve_hardware` int(11) NOT NULL, `idivcurve` int(11) DEFAULT NULL, `smuMake` varchar(45) DEFAULT NULL, `smuModel` varchar(45) DEFAULT NULL, `smuSerial` varchar(45) DEFAULT NULL COMMENT ' ', `daqMake` varchar(45) DEFAULT NULL, `daqModel` varchar(45) DEFAULT NULL, `daqSerial` varchar(45) DEFAULT NULL, `gniMake` varchar(45) DEFAULT NULL, `gniModel` varchar(45) DEFAULT NULL, `gniSerial` varchar(45) DEFAULT NULL, `gniCal` double DEFAULT NULL COMMENT ' ', `dniMake` varchar(45) DEFAULT NULL, `dniModel` varchar(45) DEFAULT NULL, `dniSerial` varchar(45) DEFAULT NULL, `dniCal` double DEFAULT NULL COMMENT ' ', `psmMake` varchar(45) DEFAULT NULL, `psmModel` varchar(45) DEFAULT NULL, `psmSerial` varchar(45) DEFAULT NULL, PRIMARY KEY (`idivcurve_hardware`), KEY `ivcurve` (`idivcurve`), KEY `ivcurve_hardware` (`idivcurve`), CONSTRAINT `ivcurve_hardware` FOREIGN KEY (`idivcurve`) REFERENCES `ivcurve` (`idivcurve`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=latin1; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `ivcurve_hardware` -- LOCK TABLES `ivcurve_hardware` WRITE; /*!40000 ALTER TABLE `ivcurve_hardware` DISABLE KEYS */; /*!40000 ALTER TABLE `ivcurve_hardware` ENABLE KEYS */; UNLOCK TABLES; -- -- Table structure for table `ivcurve_params` -- DROP TABLE IF EXISTS `ivcurve_params`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `ivcurve_params` ( `idivcurve_params` int(11) NOT NULL AUTO_INCREMENT, `idivcurve` int(11) DEFAULT NULL, `startV` double DEFAULT NULL, `endV` double DEFAULT NULL, `numPoints` int(11) DEFAULT NULL, `iComp` double DEFAULT NULL, `numSweeps` int(11) DEFAULT NULL, `settle` double DEFAULT NULL, `idle` double DEFAULT NULL, `measure` double DEFAULT NULL, `dc` double DEFAULT NULL, PRIMARY KEY (`idivcurve_params`), KEY `idivcurve` (`idivcurve`), KEY `ivcurve_params` (`idivcurve`), CONSTRAINT `ivcurve_params` FOREIGN KEY (`idivcurve`) REFERENCES `ivcurve` (`idivcurve`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=latin1; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `ivcurve_params` -- LOCK TABLES `ivcurve_params` WRITE; /*!40000 ALTER TABLE `ivcurve_params` DISABLE KEYS */; INSERT INTO `ivcurve_params` VALUES (2,13,-0.05,5,101,10,1,0.0008,0.099,0.0002,0.01),(3,14,-0.05,5,101,10,1,0.0008,0.099,0.0002,0.01); /*!40000 ALTER TABLE `ivcurve_params` ENABLE KEYS */; UNLOCK TABLES; -- -- Table structure for table `ivcurve_sweep` -- DROP TABLE IF EXISTS `ivcurve_sweep`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `ivcurve_sweep` ( `idivcurve_sweep` int(11) NOT NULL AUTO_INCREMENT, `idivcurve` int(11) NOT NULL, `time` double DEFAULT NULL, `voltage` double DEFAULT NULL, `current` double DEFAULT NULL, `power` double DEFAULT NULL, `DNI` double DEFAULT NULL, `GNI` double DEFAULT NULL, `azimuth` double DEFAULT NULL, `elevation` double DEFAULT NULL, `psmX` double DEFAULT NULL, `psmY` double DEFAULT NULL, `TC1` double DEFAULT NULL, `TC2` double DEFAULT NULL, `TC3` double DEFAULT NULL, `TC4` double DEFAULT NULL, PRIMARY KEY (`idivcurve_sweep`), KEY `idivcurve` (`idivcurve`), KEY `ivcurve_sweep` (`idivcurve`), CONSTRAINT `ivcurve_sweep` FOREIGN KEY (`idivcurve`) REFERENCES `ivcurve` (`idivcurve`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB AUTO_INCREMENT=42 DEFAULT CHARSET=latin1; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `ivcurve_sweep` -- LOCK TABLES `ivcurve_sweep` WRITE; /*!40000 ALTER TABLE `ivcurve_sweep` DISABLE KEYS */; INSERT INTO `ivcurve_sweep` VALUES (34,13,7,8,9,14,5,6,10,11,12,13,1,2,3,4),(35,13,7,8,9,14,5,6,10,11,12,13,1,2,3,4),(36,13,7,8,9,14,5,6,10,11,12,13,1,2,3,4),(37,13,7,8,9,14,5,6,10,11,12,13,1,2,3,4),(38,14,7,8,9,14,5,6,10,11,12,13,1,2,3,4),(39,14,7,8,9,14,5,6,10,11,12,13,1,2,3,4),(40,14,7,8,9,14,5,6,10,11,12,13,1,2,3,4),(41,14,7,8,9,14,5,6,10,11,12,13,1,2,3,4); /*!40000 ALTER TABLE `ivcurve_sweep` ENABLE KEYS */; UNLOCK TABLES; -- -- Table structure for table `ivcurve_type` -- DROP TABLE IF EXISTS `ivcurve_type`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `ivcurve_type` ( `idivcurve_type` int(11) unsigned NOT NULL AUTO_INCREMENT, `type` varchar(45) NOT NULL, `desc` varchar(512) DEFAULT NULL, PRIMARY KEY (`idivcurve_type`,`type`) ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=latin1; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `ivcurve_type` -- LOCK TABLES `ivcurve_type` WRITE; /*!40000 ALTER TABLE `ivcurve_type` DISABLE KEYS */; INSERT INTO `ivcurve_type` VALUES (1,'DarkIV',NULL),(2,'LightIV',NULL); /*!40000 ALTER TABLE `ivcurve_type` ENABLE KEYS */; UNLOCK TABLES; -- -- Table structure for table `params` -- DROP TABLE IF EXISTS `params`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `params` ( `idparams` int(11) NOT NULL AUTO_INCREMENT, `name` varchar(45) NOT NULL, `value` varchar(45) NOT NULL, `TS` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `user` varchar(45) DEFAULT NULL, `note` text, PRIMARY KEY (`idparams`) ) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=latin1; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `params` -- LOCK TABLES `params` WRITE; /*!40000 ALTER TABLE `params` DISABLE KEYS */; INSERT INTO `params` VALUES (1,'dbversion','0.1','2009-05-25 06:33:23',NULL,NULL),(2,'platform','1a219ec1-48f6-11de-a68f-53187c264c0a','2009-05-25 06:34:30',NULL,NULL),(3,'dbversion','0.4','2009-06-25 22:12:51',NULL,NULL),(4,'registree','DEVELOPMENT','2009-06-25 22:23:50',NULL,NULL),(5,'dbserial','1234567890','2009-06-25 22:23:50',NULL,NULL); /*!40000 ALTER TABLE `params` ENABLE KEYS */; UNLOCK TABLES; -- -- Table structure for table `program_params` -- DROP TABLE IF EXISTS `program_params`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `program_params` ( `idparams` int(11) NOT NULL AUTO_INCREMENT, `name` varchar(45) NOT NULL, `value` text NOT NULL, `TS` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `user` varchar(45) DEFAULT NULL, `note` text, PRIMARY KEY (`idparams`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `program_params` -- LOCK TABLES `program_params` WRITE; /*!40000 ALTER TABLE `program_params` DISABLE KEYS */; /*!40000 ALTER TABLE `program_params` ENABLE KEYS */; UNLOCK TABLES; -- -- Table structure for table `tags` -- DROP TABLE IF EXISTS `tags`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `tags` ( `idtags` int(11) NOT NULL, `tag` varchar(45) DEFAULT NULL, `desc` text, PRIMARY KEY (`idtags`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `tags` -- LOCK TABLES `tags` WRITE; /*!40000 ALTER TABLE `tags` DISABLE KEYS */; /*!40000 ALTER TABLE `tags` ENABLE KEYS */; UNLOCK TABLES; -- -- Table structure for table `users` -- DROP TABLE IF EXISTS `users`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `users` ( `idusers` int(11) NOT NULL AUTO_INCREMENT, `login` varchar(45) NOT NULL, `firstname` varchar(45) DEFAULT NULL, `lastname` varchar(45) DEFAULT NULL, `enabled` int(11) NOT NULL, `role` int(11) NOT NULL DEFAULT '0', PRIMARY KEY (`idusers`) ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `users` -- LOCK TABLES `users` WRITE; /*!40000 ALTER TABLE `users` DISABLE KEYS */; INSERT INTO `users` VALUES (1,'jed',NULL,NULL,1,0); /*!40000 ALTER TABLE `users` ENABLE KEYS */; UNLOCK TABLES; -- -- Dumping routines for database 'cpv' -- /*!50003 DROP PROCEDURE IF EXISTS `addDarkIVCurve` */; /*!50003 SET @saved_cs_client = @@character_set_client */ ; /*!50003 SET @saved_cs_results = @@character_set_results */ ; /*!50003 SET @saved_col_connection = @@collation_connection */ ; /*!50003 SET character_set_client = utf8 */ ; /*!50003 SET character_set_results = utf8 */ ; /*!50003 SET collation_connection = utf8_general_ci */ ; /*!50003 SET @saved_sql_mode = @@sql_mode */ ; /*!50003 SET sql_mode = 'STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ; DELIMITER ;; /*!50003 CREATE*/ /*!50020 DEFINER=`cpv`@`%`*/ /*!50003 PROCEDURE `addDarkIVCurve`( IN in_platform varchar(45), IN in_time datetime, IN in_DUT varchar(45), IN in_location varchar(45), IN in_user varchar(45), IN in_notes text(65535), IN in_Aperture double, IN in_sweepData TEXT, IN in_AnalysisData TEXT, IN in_AlignmentData TEXT, IN in_SweepParams TEXT ) BEGIN /***************************** USAGE CALL addDarkIVCurve( 'test', 20090101123456, '0987654321', 'SF', 'jed', 'NOTES\r!!!', 123456, '(@idIVCurve,1,2,3,4,5,6,7,8,9,10,11,12,13,14), (@idIVCurve,1,2,3,4,5,6,7,8,9,10,11,12,13,14), (@idIVCurve,1,2,3,4,5,6,7,8,9,10,11,12,13,14), (@idIVCurve,1,2,3,4,5,6,7,8,9,10,11,12,13,14)', '(@idIVCurve,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15)', '(@idIVCurve,0,1,2,3,4,5,6,7,8,20010101,10,11,12,13), (@idIVCurve,1,1,2,3,4,5,6,7,8,20010101122345,10,11,12,13)', '(@idIVCurve,-.05,5,101,10,1,.0008,.099,.0002,.01)' ) ********************************/ SELECT @type:=idivcurve_type FROM ivcurve_type WHERE type='DarkIV'; SELECT @USER:=idusers FROM users WHERE users.login = in_user; INSERT INTO ivcurve (`guid`,`type`, `time`, `platform`,`DUT`, `location`,`user`,`notes`,`aperture`) VALUES (UUID(),@type, in_time, in_platform,in_DUT,in_location,@USER,in_notes,in_aperture); SET @idIVCurve = LAST_INSERT_ID(); SELECT @guid:=guid FROM ivcurve WHERE idivcurve=LAST_INSERT_ID(); CALL addSweepData(@idIVCurve, in_SweepData); CALL addSweepAnalysis(@idIVCurve, in_AnalysisData); CALL addSweepAlignments(@idIVCurve, in_Alignmentdata); CALL addSweepParams(@idIVCurve, in_SweepParams); SELECT @guid; END */;; DELIMITER ; /*!50003 SET sql_mode = @saved_sql_mode */ ; /*!50003 SET character_set_client = @saved_cs_client */ ; /*!50003 SET character_set_results = @saved_cs_results */ ; /*!50003 SET collation_connection = @saved_col_connection */ ; /*!50003 DROP PROCEDURE IF EXISTS `addSweepAlignments` */; /*!50003 SET @saved_cs_client = @@character_set_client */ ; /*!50003 SET @saved_cs_results = @@character_set_results */ ; /*!50003 SET @saved_col_connection = @@collation_connection */ ; /*!50003 SET character_set_client = utf8 */ ; /*!50003 SET character_set_results = utf8 */ ; /*!50003 SET collation_connection = utf8_general_ci */ ; /*!50003 SET @saved_sql_mode = @@sql_mode */ ; /*!50003 SET sql_mode = 'STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ; DELIMITER ;; /*!50003 CREATE*/ /*!50020 DEFINER=`cpv`@`%`*/ /*!50003 PROCEDURE `addSweepAlignments`( in_idIVCurve INT, in_alignments TEXT ) BEGIN /* Usage: CALL addSweepAlignments( 2, ' (@idIVCurve,0,1,2,3,4,5,6,7,8,20010101,10,11,12,13), (@idIVCurve,1,1,2,3,4,5,6,7,8,20010101122345,10,11,12,13) ' ); */ SET @idIVCurve = in_idIVCurve; SET @qry = CONCAT( 'INSERT INTO `cpv`.`ivcurve_alignment` ( `idivcurve`, `index`, `azimuth`, `elevation`, `psmx`, `psmy`, `DNI`, `GNI`, `voltage`, `current`, `TS`, `TC1`, `TC2`, `TC3`, `TC4` ) VALUES ', in_alignments); PREPARE stmt FROM @qry; EXECUTE stmt; DROP PREPARE stmt; END */;; DELIMITER ; /*!50003 SET sql_mode = @saved_sql_mode */ ; /*!50003 SET character_set_client = @saved_cs_client */ ; /*!50003 SET character_set_results = @saved_cs_results */ ; /*!50003 SET collation_connection = @saved_col_connection */ ; /*!50003 DROP PROCEDURE IF EXISTS `addSweepAnalysis` */; /*!50003 SET @saved_cs_client = @@character_set_client */ ; /*!50003 SET @saved_cs_results = @@character_set_results */ ; /*!50003 SET @saved_col_connection = @@collation_connection */ ; /*!50003 SET character_set_client = utf8 */ ; /*!50003 SET character_set_results = utf8 */ ; /*!50003 SET collation_connection = utf8_general_ci */ ; /*!50003 SET @saved_sql_mode = @@sql_mode */ ; /*!50003 SET sql_mode = 'STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ; DELIMITER ;; /*!50003 CREATE*/ /*!50020 DEFINER=`cpv`@`%`*/ /*!50003 PROCEDURE `addSweepAnalysis`( in_idivcurve int, in_AnalysisData TEXT ) BEGIN /* Usage: CALL addSweepAnalysis( 2, ' (@idIVCurve,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15), (@idIVCurve,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15) ' ); */ SET @idIVCurve = in_idIVCurve; SET @qry = CONCAT( 'INSERT INTO ivcurve_analysis ( idivcurve, Gsh, Rse, Isc, Voc, Pmax, Imp, Vmp, FF, Eff, meanGni, meanDni, GniMp, DniMp, GshR2, RseR2 ) VALUES ', in_AnalysisData); PREPARE stmt FROM @qry; EXECUTE stmt; DROP PREPARE stmt; END */;; DELIMITER ; /*!50003 SET sql_mode = @saved_sql_mode */ ; /*!50003 SET character_set_client = @saved_cs_client */ ; /*!50003 SET character_set_results = @saved_cs_results */ ; /*!50003 SET collation_connection = @saved_col_connection */ ; /*!50003 DROP PROCEDURE IF EXISTS `addSweepData` */; /*!50003 SET @saved_cs_client = @@character_set_client */ ; /*!50003 SET @saved_cs_results = @@character_set_results */ ; /*!50003 SET @saved_col_connection = @@collation_connection */ ; /*!50003 SET character_set_client = utf8 */ ; /*!50003 SET character_set_results = utf8 */ ; /*!50003 SET collation_connection = utf8_general_ci */ ; /*!50003 SET @saved_sql_mode = @@sql_mode */ ; /*!50003 SET sql_mode = 'STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ; DELIMITER ;; /*!50003 CREATE*/ /*!50020 DEFINER=`cpv`@`%`*/ /*!50003 PROCEDURE `addSweepData`( IN idIVCurve INT, IN sweepData TEXT ) BEGIN /* Usage: CALL addSweepData( 2, ' (@idIVCurve,1,2,3,4,5,6,7,8,9,10,11,12,13,14), (@idIVCurve,1,2,3,4,5,6,7,8,9,10,11,12,13,14) ' ); */ SET @idIVCurve = idIVCurve; SET @qry = CONCAT( 'INSERT INTO `cpv`.`ivcurve_sweep` ( `idivcurve`, `TC1`,`TC2`,`TC3`,`TC4`, `DNI`,`GNI`, `time`,`voltage`,`current`, `azimuth`,`elevation`, `psmx`,`psmy`, `power` ) VALUES ', sweepData); PREPARE stmt FROM @qry; EXECUTE stmt; DROP PREPARE stmt; # SELECT LAST_INSERT_ID(); END */;; DELIMITER ; /*!50003 SET sql_mode = @saved_sql_mode */ ; /*!50003 SET character_set_client = @saved_cs_client */ ; /*!50003 SET character_set_results = @saved_cs_results */ ; /*!50003 SET collation_connection = @saved_col_connection */ ; /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; /*!40101 SET SQL_MODE=@OLD_SQL_MODE */; /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; /*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; -- Dump completed on 2009-06-26 5:19:05