t.uuid as "uuid", t.user_uuid as "userUuid", t.name as "name", t.token_hash as "tokenHash", t.last_connection_date as "lastConnectionDate", t.created_at as "createdAt", t.project_uuid as "projectUuid", t.type as "type", t.expiration_date as "expirationDate", p.name as "projectName", p.kee as "projectKey" insert into user_tokens ( uuid, user_uuid, name, token_hash, created_at, project_uuid, type, expiration_date ) values ( #{uuid, jdbcType=VARCHAR}, #{userUuid, jdbcType=VARCHAR}, #{name, jdbcType=VARCHAR}, #{tokenHash, jdbcType=VARCHAR}, #{createdAt, jdbcType=BIGINT}, #{projectUuid, jdbcType=VARCHAR}, #{type, jdbcType=VARCHAR}, #{expirationDate, jdbcType=BIGINT} ) UPDATE user_tokens SET last_connection_date = #{lastConnectionDate, jdbcType=BIGINT} WHERE user_uuid = #{userUuid, jdbcType=VARCHAR} AND name = #{name, jdbcType=VARCHAR} DELETE FROM user_tokens WHERE user_uuid=#{userUuid, jdbcType=VARCHAR} DELETE FROM user_tokens WHERE user_uuid=#{userUuid, jdbcType=VARCHAR} and name=#{name, jdbcType=VARCHAR} DELETE FROM user_tokens WHERE project_uuid=#{projectUuid, jdbcType=VARCHAR}