mirror of
				https://github.com/gyurix1968/guacamole-client.git
				synced 2025-10-31 17:13:21 +00:00 
			
		
		
		
	GUACAMOLE-462: Create connection history records for in-progress connections.
Besides restoring historically-provided functionality, the ID generated
by the database for connection history records is needed to generate a
deterministic UUID that can be injected into connection configurations
with ${HISTORY_UUID}. Having such a token allows session recordings to
be given names that can be reliably matched with history records.
			
			
This commit is contained in:
		| @@ -61,7 +61,8 @@ | ||||
|     </select> | ||||
|  | ||||
|     <!-- Insert the given connection record --> | ||||
|     <insert id="insert" parameterType="org.apache.guacamole.auth.jdbc.connection.ConnectionRecordModel"> | ||||
|     <insert id="insert" useGeneratedKeys="true" keyProperty="record.recordID" | ||||
|             parameterType="org.apache.guacamole.auth.jdbc.connection.ConnectionRecordModel"> | ||||
|  | ||||
|         INSERT INTO guacamole_connection_history ( | ||||
|             connection_id, | ||||
| @@ -92,6 +93,15 @@ | ||||
|  | ||||
|     </insert> | ||||
|  | ||||
|     <!-- Update the given connection record, assigning an end date --> | ||||
|     <update id="updateEndDate" parameterType="org.apache.guacamole.auth.jdbc.connection.ConnectionRecordModel"> | ||||
|  | ||||
|         UPDATE guacamole_connection_history | ||||
|         SET end_date = #{record.endDate,jdbcType=TIMESTAMP} | ||||
|         WHERE history_id = #{record.recordID,jdbcType=INTEGER} | ||||
|  | ||||
|     </update> | ||||
|  | ||||
|     <!-- Search for specific connection records --> | ||||
|     <select id="search" resultMap="ConnectionRecordResultMap"> | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user