Skip to content
Snippets Groups Projects
Select Git revision
  • 54880b5de1512fa53609efd13c92fb82c21c4367
  • main default protected
  • djaosdb
  • 1.2.23
  • 1.0
5 results

creation.py

Blame
  • Code owners
    Assign users and groups as approvers for specific file changes. Learn more.
    insertEntityDataType.sql 1023 B
    
    
    DROP PROCEDURE IF EXISTS db_5_0.insertEntityDataType;
    DELIMITER //
    
    CREATE PROCEDURE db_5_0.insertEntityDataType(in PropertyID INT UNSIGNED, in DataType VARCHAR(255))
    BEGIN
        DECLARE InternalPropertyID INT UNSIGNED DEFAULT NULL;
    
        SELECT internal_id INTO InternalPropertyID FROM entity_ids WHERE id=PropertyID;
    
        INSERT INTO data_type (domain_id, entity_id, property_id, datatype) SELECT 0, 0, InternalPropertyID, ( SELECT entity_id FROM name_data WHERE domain_id = 0 AND property_id = 20 AND value = DataType LIMIT 1);
    
    
    END;
    //
    DELIMITER ;
    
    
    DROP PROCEDURE IF EXISTS db_5_0.insertEntityCollection;
    DELIMITER //
    
    CREATE PROCEDURE db_5_0.insertEntityCollection(in PropertyID INT UNSIGNED, in Collection VARCHAR(255))
    BEGIN
        DECLARE InternalPropertyID INT UNSIGNED DEFAULT NULL;
    
        SELECT internal_id INTO InternalPropertyID FROM entity_ids WHERE id=PropertyID;
    
        INSERT INTO collection_type (domain_id, entity_id, property_id, collection) SELECT 0, 0, InternalPropertyID, Collection;
    
    END;
    //
    DELIMITER ;