21 lines
534 B
MySQL
21 lines
534 B
MySQL
|
DELIMITER $$
|
||
|
CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn2008`.`unary_scan_insert`(v_name VARCHAR(45), v_parent INT, v_type VARCHAR(45))
|
||
|
BEGIN
|
||
|
|
||
|
/**
|
||
|
* Inserta un nuevo nodo de tipo unary_scan. Se puede indicar el padre.
|
||
|
*
|
||
|
* @v_name: Nombre del nodo.
|
||
|
* @v_parent: Nodo padre.
|
||
|
* @v_type: Tipo del nodo a crear.
|
||
|
**/
|
||
|
|
||
|
DECLARE v_unary INT;
|
||
|
|
||
|
CALL unary_insert(v_unary, v_parent);
|
||
|
|
||
|
INSERT INTO unary_scan(name, unary_id, type) VALUES(v_name, v_unary, v_type);
|
||
|
|
||
|
END$$
|
||
|
DELIMITER ;
|