-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* fix missing backtick in mysql keywords * fix pg bug
- Loading branch information
Showing
25 changed files
with
805 additions
and
17 deletions.
There are no files selected for viewing
File renamed without changes.
93 changes: 93 additions & 0 deletions
93
...-application-manager/src/main/resources/mapper/postgresql/EngineConnBmlResourceMapper.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
~ Licensed to the Apache Software Foundation (ASF) under one or more | ||
~ contributor license agreements. See the NOTICE file distributed with | ||
~ this work for additional information regarding copyright ownership. | ||
~ The ASF licenses this file to You under the Apache License, Version 2.0 | ||
~ (the "License"); you may not use this file except in compliance with | ||
~ the License. You may obtain a copy of the License at | ||
~ | ||
~ http://www.apache.org/licenses/LICENSE-2.0 | ||
~ | ||
~ Unless required by applicable law or agreed to in writing, software | ||
~ distributed under the License is distributed on an "AS IS" BASIS, | ||
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
~ See the License for the specific language governing permissions and | ||
~ limitations under the License. | ||
--> | ||
|
||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" > | ||
|
||
<mapper namespace="org.apache.linkis.engineplugin.server.dao.EngineConnBmlResourceDao"> | ||
|
||
|
||
<sql id="bml_resources"> | ||
engine_conn_type,version,file_name,file_size,last_modified,bml_resource_id,bml_resource_version,create_time,last_update_time | ||
</sql> | ||
|
||
<select id="getAllEngineConnBmlResource" | ||
resultType="org.apache.linkis.engineplugin.server.entity.EngineConnBmlResource"> | ||
SELECT * FROM linkis_cg_engine_conn_plugin_bml_resources | ||
WHERE engine_conn_type=#{engineConnType} and version=#{version} | ||
</select> | ||
|
||
<select id="getTypeVersionList" resultType="java.lang.String"> | ||
SELECT version FROM linkis_cg_engine_conn_plugin_bml_resources where engine_conn_type = #{type} GROUP BY version | ||
</select> | ||
|
||
<select id="getTypeList" resultType="java.lang.String"> | ||
SELECT engine_conn_type FROM linkis_cg_engine_conn_plugin_bml_resources GROUP BY engine_conn_type | ||
</select> | ||
|
||
<select id="selectByPageVo" | ||
resultType="org.apache.linkis.engineplugin.server.entity.EngineConnBmlResource"> | ||
SELECT | ||
* | ||
FROM linkis_cg_engine_conn_plugin_bml_resources | ||
<where> | ||
<if test="engineConnType != null and engineConnType != ''"> | ||
AND engine_conn_type like concat('%', #{engineConnType}::text, '%') | ||
</if> | ||
<if test="engineConnVersion != null and engineConnVersion != ''"> | ||
AND version like concat('%', #{engineConnVersion}::text, '%') | ||
</if> | ||
</where> | ||
ORDER BY create_time DESC | ||
</select> | ||
|
||
<delete id="delete" parameterType="org.apache.linkis.engineplugin.server.entity.EngineConnBmlResource"> | ||
DELETE FROM linkis_cg_engine_conn_plugin_bml_resources | ||
WHERE engine_conn_type = #{engineConnBmlResource.engineConnType} | ||
AND version = #{engineConnBmlResource.version} | ||
AND file_name = #{engineConnBmlResource.fileName} | ||
</delete> | ||
|
||
<update id="update" parameterType="org.apache.linkis.engineplugin.server.entity.EngineConnBmlResource"> | ||
UPDATE linkis_cg_engine_conn_plugin_bml_resources | ||
<set> | ||
<if test="engineConnBmlResource.lastModified != null">last_modified = | ||
#{engineConnBmlResource.lastModified}, | ||
</if> | ||
<if test="engineConnBmlResource.fileSize != null">file_size = #{engineConnBmlResource.fileSize},</if> | ||
<if test="engineConnBmlResource.bmlResourceVersion != null">bml_resource_version = | ||
#{engineConnBmlResource.bmlResourceVersion}, | ||
</if> | ||
<if test="engineConnBmlResource.lastUpdateTime != null">last_update_time = | ||
#{engineConnBmlResource.lastUpdateTime}, | ||
</if> | ||
</set> | ||
WHERE engine_conn_type=#{engineConnBmlResource.engineConnType} and version=#{engineConnBmlResource.version} | ||
AND file_name=#{engineConnBmlResource.fileName} | ||
</update> | ||
|
||
<insert id="save" parameterType="org.apache.linkis.engineplugin.server.entity.EngineConnBmlResource"> | ||
INSERT INTO linkis_cg_engine_conn_plugin_bml_resources(<include refid="bml_resources"/>) | ||
VALUES (#{engineConnBmlResource.engineConnType}, #{engineConnBmlResource.version}, | ||
#{engineConnBmlResource.fileName},#{engineConnBmlResource.fileSize}, | ||
#{engineConnBmlResource.lastModified},#{engineConnBmlResource.bmlResourceId}, | ||
#{engineConnBmlResource.bmlResourceVersion}, | ||
#{engineConnBmlResource.createTime}, #{engineConnBmlResource.lastUpdateTime}) | ||
</insert> | ||
|
||
|
||
</mapper> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
49 changes: 49 additions & 0 deletions
49
...s/linkis-basedata-manager/src/main/resources/mapper/postgresql/DatasourceAccessMapper.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
~ Licensed to the Apache Software Foundation (ASF) under one or more | ||
~ contributor license agreements. See the NOTICE file distributed with | ||
~ this work for additional information regarding copyright ownership. | ||
~ The ASF licenses this file to You under the Apache License, Version 2.0 | ||
~ (the "License"); you may not use this file except in compliance with | ||
~ the License. You may obtain a copy of the License at | ||
~ | ||
~ http://www.apache.org/licenses/LICENSE-2.0 | ||
~ | ||
~ Unless required by applicable law or agreed to in writing, software | ||
~ distributed under the License is distributed on an "AS IS" BASIS, | ||
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
~ See the License for the specific language governing permissions and | ||
~ limitations under the License. | ||
--> | ||
|
||
<!DOCTYPE mapper | ||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | ||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | ||
|
||
|
||
<mapper namespace="org.apache.linkis.basedatamanager.server.dao.DatasourceAccessMapper"> | ||
|
||
<resultMap id="BaseResultMap" type="org.apache.linkis.basedatamanager.server.domain.DatasourceAccessEntity"> | ||
<id property="id" column="id" jdbcType="BIGINT"/> | ||
<result property="tableId" column="table_id" jdbcType="BIGINT"/> | ||
<result property="visitor" column="visitor" jdbcType="VARCHAR"/> | ||
<result property="fields" column="fields" jdbcType="VARCHAR"/> | ||
<result property="applicationId" column="application_id" jdbcType="INTEGER"/> | ||
<result property="accessTime" column="access_time" jdbcType="TIMESTAMP"/> | ||
</resultMap> | ||
|
||
<sql id="Base_Column_List"> | ||
id,table_id,visitor, | ||
fields,application_id,access_time | ||
</sql> | ||
|
||
<select id="getListByPage" resultMap="BaseResultMap"> | ||
SELECT | ||
<include refid="Base_Column_List"></include> | ||
FROM linkis_ps_datasource_access | ||
<if test="searchName != null and searchName!=''"> | ||
WHERE visitor LIKE concat('%',#{searchName}::text,'%') | ||
OR fields LIKE concat('%',#{searchName}::text,'%') | ||
</if> | ||
</select> | ||
</mapper> |
51 changes: 51 additions & 0 deletions
51
...ents/linkis-basedata-manager/src/main/resources/mapper/postgresql/DatasourceEnvMapper.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
~ Licensed to the Apache Software Foundation (ASF) under one or more | ||
~ contributor license agreements. See the NOTICE file distributed with | ||
~ this work for additional information regarding copyright ownership. | ||
~ The ASF licenses this file to You under the Apache License, Version 2.0 | ||
~ (the "License"); you may not use this file except in compliance with | ||
~ the License. You may obtain a copy of the License at | ||
~ | ||
~ http://www.apache.org/licenses/LICENSE-2.0 | ||
~ | ||
~ Unless required by applicable law or agreed to in writing, software | ||
~ distributed under the License is distributed on an "AS IS" BASIS, | ||
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
~ See the License for the specific language governing permissions and | ||
~ limitations under the License. | ||
--> | ||
<!DOCTYPE mapper | ||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | ||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | ||
<mapper namespace="org.apache.linkis.basedatamanager.server.dao.DatasourceEnvMapper"> | ||
|
||
<resultMap id="BaseResultMap" type="org.apache.linkis.basedatamanager.server.domain.DatasourceEnvEntity"> | ||
<id property="id" column="id" jdbcType="INTEGER"/> | ||
<result property="envName" column="env_name" jdbcType="VARCHAR"/> | ||
<result property="envDesc" column="env_desc" jdbcType="VARCHAR"/> | ||
<result property="datasourceTypeId" column="datasource_type_id" jdbcType="INTEGER"/> | ||
<result property="parameter" column="parameter" jdbcType="VARCHAR"/> | ||
<result property="createTime" column="create_time" jdbcType="TIMESTAMP"/> | ||
<result property="createUser" column="create_user" jdbcType="VARCHAR"/> | ||
<result property="modifyTime" column="modify_time" jdbcType="TIMESTAMP"/> | ||
<result property="modifyUser" column="modify_user" jdbcType="VARCHAR"/> | ||
</resultMap> | ||
|
||
<sql id="Base_Column_List"> | ||
id,env_name,env_desc, | ||
datasource_type_id,parameter,create_time, | ||
create_user,modify_time,modify_user | ||
</sql> | ||
|
||
<select id="getListByPage" resultMap="BaseResultMap"> | ||
SELECT | ||
<include refid="Base_Column_List"></include> | ||
FROM linkis_ps_dm_datasource_env | ||
<if test="searchName != null and searchName!=''"> | ||
WHERE env_name LIKE concat('%',#{searchName}::text,'%') | ||
OR env_desc LIKE concat('%',#{searchName}::text,'%') | ||
OR parameter LIKE concat('%',#{searchName}::text,'%') | ||
</if> | ||
</select> | ||
</mapper> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
51 changes: 51 additions & 0 deletions
51
...s/linkis-basedata-manager/src/main/resources/mapper/postgresql/GatewayAuthTokenMapper.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
~ Licensed to the Apache Software Foundation (ASF) under one or more | ||
~ contributor license agreements. See the NOTICE file distributed with | ||
~ this work for additional information regarding copyright ownership. | ||
~ The ASF licenses this file to You under the Apache License, Version 2.0 | ||
~ (the "License"); you may not use this file except in compliance with | ||
~ the License. You may obtain a copy of the License at | ||
~ | ||
~ http://www.apache.org/licenses/LICENSE-2.0 | ||
~ | ||
~ Unless required by applicable law or agreed to in writing, software | ||
~ distributed under the License is distributed on an "AS IS" BASIS, | ||
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
~ See the License for the specific language governing permissions and | ||
~ limitations under the License. | ||
--> | ||
<!DOCTYPE mapper | ||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | ||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | ||
<mapper namespace="org.apache.linkis.basedatamanager.server.dao.GatewayAuthTokenMapper"> | ||
|
||
<resultMap id="BaseResultMap" type="org.apache.linkis.basedatamanager.server.domain.GatewayAuthTokenEntity"> | ||
<id property="id" column="id" jdbcType="INTEGER"/> | ||
<result property="tokenName" column="token_name" jdbcType="VARCHAR"/> | ||
<result property="legalUsers" column="legal_users" jdbcType="VARCHAR"/> | ||
<result property="legalHosts" column="legal_hosts" jdbcType="VARCHAR"/> | ||
<result property="businessOwner" column="business_owner" jdbcType="VARCHAR"/> | ||
<result property="createTime" column="create_time" jdbcType="DATE"/> | ||
<result property="updateTime" column="update_time" jdbcType="DATE"/> | ||
<result property="elapseDay" column="elapse_day" jdbcType="BIGINT"/> | ||
<result property="updateBy" column="update_by" jdbcType="VARCHAR"/> | ||
</resultMap> | ||
|
||
<sql id="Base_Column_List"> | ||
id,token_name,legal_users, | ||
legal_hosts,business_owner,create_time, | ||
update_time,elapse_day,update_by | ||
</sql> | ||
|
||
<select id="getListByPage" resultMap="BaseResultMap"> | ||
SELECT | ||
<include refid="Base_Column_List"></include> | ||
FROM linkis_mg_gateway_auth_token | ||
<if test="searchName != null and searchName!=''"> | ||
WHERE token_name LIKE concat('%',#{searchName}::text,'%') | ||
OR legal_users LIKE concat('%',#{searchName}::text,'%') | ||
OR legal_hosts LIKE concat('%',#{searchName}::text,'%') | ||
</if> | ||
</select> | ||
</mapper> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
47 changes: 47 additions & 0 deletions
47
...asedata-manager/src/main/resources/mapper/postgresql/RmExternalResourceProviderMapper.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
~ Licensed to the Apache Software Foundation (ASF) under one or more | ||
~ contributor license agreements. See the NOTICE file distributed with | ||
~ this work for additional information regarding copyright ownership. | ||
~ The ASF licenses this file to You under the Apache License, Version 2.0 | ||
~ (the "License"); you may not use this file except in compliance with | ||
~ the License. You may obtain a copy of the License at | ||
~ | ||
~ http://www.apache.org/licenses/LICENSE-2.0 | ||
~ | ||
~ Unless required by applicable law or agreed to in writing, software | ||
~ distributed under the License is distributed on an "AS IS" BASIS, | ||
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
~ See the License for the specific language governing permissions and | ||
~ limitations under the License. | ||
--> | ||
<!DOCTYPE mapper | ||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | ||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | ||
<mapper namespace="org.apache.linkis.basedatamanager.server.dao.RmExternalResourceProviderMapper"> | ||
|
||
<resultMap id="BaseResultMap" type="org.apache.linkis.basedatamanager.server.domain.RmExternalResourceProviderEntity"> | ||
<id property="id" column="id" jdbcType="INTEGER"/> | ||
<result property="resourceType" column="resource_type" jdbcType="VARCHAR"/> | ||
<result property="name" column="name" jdbcType="VARCHAR"/> | ||
<result property="labels" column="labels" jdbcType="VARCHAR"/> | ||
<result property="config" column="config" jdbcType="VARCHAR"/> | ||
</resultMap> | ||
|
||
<sql id="Base_Column_List"> | ||
id,resource_type,name, | ||
labels,config | ||
</sql> | ||
|
||
<select id="getListByPage" resultMap="BaseResultMap"> | ||
SELECT | ||
<include refid="Base_Column_List"></include> | ||
FROM linkis_cg_rm_external_resource_provider | ||
<if test="searchName != null and searchName!=''"> | ||
WHERE resource_type LIKE concat('%',#{searchName}::text,'%') | ||
OR name LIKE concat('%',#{searchName}::text,'%') | ||
OR labels LIKE concat('%',#{searchName}::text,'%') | ||
OR config LIKE concat('%',#{searchName}::text,'%') | ||
</if> | ||
</select> | ||
</mapper> |
40 changes: 40 additions & 0 deletions
40
...cements/linkis-basedata-manager/src/main/resources/mapper/postgresql/UdfManagerMapper.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
~ Licensed to the Apache Software Foundation (ASF) under one or more | ||
~ contributor license agreements. See the NOTICE file distributed with | ||
~ this work for additional information regarding copyright ownership. | ||
~ The ASF licenses this file to You under the Apache License, Version 2.0 | ||
~ (the "License"); you may not use this file except in compliance with | ||
~ the License. You may obtain a copy of the License at | ||
~ | ||
~ http://www.apache.org/licenses/LICENSE-2.0 | ||
~ | ||
~ Unless required by applicable law or agreed to in writing, software | ||
~ distributed under the License is distributed on an "AS IS" BASIS, | ||
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
~ See the License for the specific language governing permissions and | ||
~ limitations under the License. | ||
--> | ||
<!DOCTYPE mapper | ||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | ||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | ||
<mapper namespace="org.apache.linkis.basedatamanager.server.dao.UdfManagerMapper"> | ||
|
||
<resultMap id="BaseResultMap" type="org.apache.linkis.basedatamanager.server.domain.UdfManagerEntity"> | ||
<id property="id" column="id" jdbcType="BIGINT"/> | ||
<result property="userName" column="user_name" jdbcType="VARCHAR"/> | ||
</resultMap> | ||
|
||
<sql id="Base_Column_List"> | ||
id,user_name | ||
</sql> | ||
|
||
<select id="getListByPage" resultMap="BaseResultMap"> | ||
SELECT | ||
<include refid="Base_Column_List"></include> | ||
FROM linkis_ps_udf_manager | ||
<if test="searchName != null and searchName!=''"> | ||
WHERE user_name LIKE concat('%',#{searchName}::text,'%') | ||
</if> | ||
</select> | ||
</mapper> |
Oops, something went wrong.