pd.uuid as uuid,
pd.version as version,
pd.include_paths as includePaths,
pd.package_manager as packageManager,
pd.created_at as createdAt,
pd.updated_at as updatedAt
insert into project_dependencies (
uuid,
version,
include_paths,
package_manager,
created_at,
updated_at
) values (
#{uuid,jdbcType=VARCHAR},
#{version,jdbcType=CLOB},
#{includePaths,jdbcType=CLOB},
#{packageManager,jdbcType=VARCHAR},
#{createdAt,jdbcType=BIGINT},
#{updatedAt,jdbcType=BIGINT}
)
delete from project_dependencies
where uuid = #{uuid,jdbcType=VARCHAR}
from project_dependencies pd
inner join components c on pd.uuid = c.uuid
where c.branch_uuid = #{query.branchUuid,jdbcType=VARCHAR}
AND (
c.kee = #{query.query,jdbcType=VARCHAR}
OR lower(c.long_name) LIKE #{query.likeQuery} ESCAPE '/'
)
update project_dependencies
set
uuid = #{uuid, jdbcType=VARCHAR},
version = #{version, jdbcType=CLOB},
include_paths = #{includePaths, jdbcType=CLOB},
package_manager = #{packageManager, jdbcType=VARCHAR},
updated_at = #{updatedAt, jdbcType=BIGINT}
where
uuid = #{uuid, jdbcType=VARCHAR}