Skip to content
Snippets Groups Projects
Select Git revision
  • 2280def3a079af53b42df3ff0516cb24d43171ea
  • main default protected
  • dev protected
  • f-linkahead-rename
  • f-real-id
  • f-filesystem-import
  • f-filesystem-link
  • f-filesystem-directory
  • f-filesystem-core
  • f-filesystem-cleanup
  • f-filesystem-main
  • f-name
  • keep_changes
  • f-permission-checks-2
  • f-mysql8-tests
  • f-retrieve-history
  • t-distinct-parents
  • v8.1.0
  • v8.0.0
  • v7.0.2
  • v7.0.1
  • v7.0.0
  • v6.0.1
  • v6.0.0
  • v5.0.0
  • v4.1.0
  • v4.0.0
  • v3.0
  • v2.0.30
29 results

insertEntityDataType.sql

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 ;