mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-06 21:27:40 +00:00
GUACAMOLE-870: Merge changes using CHARINDEX() instead of POSITION() for SQL Server.
SQL Server does not support the ANSI SQL POSITION() function, instead providing its own non-standard equivalent: CHARINDEX().
This commit is contained in:
@@ -113,13 +113,13 @@
|
|||||||
[guacamole_connection_history].user_id IN (
|
[guacamole_connection_history].user_id IN (
|
||||||
SELECT user_id
|
SELECT user_id
|
||||||
FROM [guacamole_user]
|
FROM [guacamole_user]
|
||||||
WHERE POSITION(#{term.term,jdbcType=VARCHAR} IN username) > 0
|
WHERE CHARINDEX(#{term.term,jdbcType=VARCHAR}, username) > 0
|
||||||
)
|
)
|
||||||
|
|
||||||
OR [guacamole_connection_history].connection_id IN (
|
OR [guacamole_connection_history].connection_id IN (
|
||||||
SELECT connection_id
|
SELECT connection_id
|
||||||
FROM [guacamole_connection]
|
FROM [guacamole_connection]
|
||||||
WHERE POSITION(#{term.term,jdbcType=VARCHAR} IN connection_name) > 0
|
WHERE CHARINDEX(#{term.term,jdbcType=VARCHAR}, connection_name) > 0
|
||||||
)
|
)
|
||||||
|
|
||||||
<if test="term.startDate != null and term.endDate != null">
|
<if test="term.startDate != null and term.endDate != null">
|
||||||
@@ -191,14 +191,14 @@
|
|||||||
FROM [guacamole_user]
|
FROM [guacamole_user]
|
||||||
JOIN [guacamole_entity] ON [guacamole_user].entity_id = [guacamole_entity].entity_id
|
JOIN [guacamole_entity] ON [guacamole_user].entity_id = [guacamole_entity].entity_id
|
||||||
WHERE
|
WHERE
|
||||||
POSITION(#{term.term,jdbcType=VARCHAR} IN [guacamole_entity].name) > 0
|
CHARINDEX(#{term.term,jdbcType=VARCHAR}, [guacamole_entity].name) > 0
|
||||||
AND [guacamole_entity].type = 'USER'
|
AND [guacamole_entity].type = 'USER'
|
||||||
)
|
)
|
||||||
|
|
||||||
OR [guacamole_connection_history].connection_id IN (
|
OR [guacamole_connection_history].connection_id IN (
|
||||||
SELECT connection_id
|
SELECT connection_id
|
||||||
FROM [guacamole_connection]
|
FROM [guacamole_connection]
|
||||||
WHERE POSITION(#{term.term,jdbcType=VARCHAR} IN connection_name) > 0
|
WHERE CHARINDEX(#{term.term,jdbcType=VARCHAR}, connection_name) > 0
|
||||||
)
|
)
|
||||||
|
|
||||||
<if test="term.startDate != null and term.endDate != null">
|
<if test="term.startDate != null and term.endDate != null">
|
||||||
|
@@ -114,7 +114,7 @@
|
|||||||
FROM [guacamole_user]
|
FROM [guacamole_user]
|
||||||
JOIN [guacamole_entity] ON [guacamole_user].entity_id = [guacamole_entity].entity_id
|
JOIN [guacamole_entity] ON [guacamole_user].entity_id = [guacamole_entity].entity_id
|
||||||
WHERE
|
WHERE
|
||||||
POSITION(#{term.term,jdbcType=VARCHAR} IN [guacamole_entity].name) > 0
|
CHARINDEX(#{term.term,jdbcType=VARCHAR}, [guacamole_entity].name) > 0
|
||||||
AND [guacamole_entity].type = 'USER'),
|
AND [guacamole_entity].type = 'USER'),
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -171,7 +171,7 @@
|
|||||||
FROM [guacamole_user]
|
FROM [guacamole_user]
|
||||||
JOIN [guacamole_entity] ON [guacamole_user].entity_id = [guacamole_entity].entity_id
|
JOIN [guacamole_entity] ON [guacamole_user].entity_id = [guacamole_entity].entity_id
|
||||||
WHERE
|
WHERE
|
||||||
POSITION(#{term.term,jdbcType=VARCHAR} IN [guacamole_entity].name) > 0
|
CHARINDEX(#{term.term,jdbcType=VARCHAR}, [guacamole_entity].name) > 0
|
||||||
AND [guacamole_entity].type = 'USER'
|
AND [guacamole_entity].type = 'USER'
|
||||||
)
|
)
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user