+ sql=<<-EOF
+ UPDATE current_nodes AS cn, #{db_uqn}
+ SET cn.timestamp=#{db_now},cn.visible=0,cn.user_id=#{uid}
+ WHERE cn.id=node_id
+ EOF
+ ActiveRecord::Base.connection.update(sql)
+
+ ActiveRecord::Base.connection.execute("DROP TABLE #{db_uqs}")
+ ActiveRecord::Base.connection.execute("DROP TABLE #{db_uqn}")
+
+ # - delete way
+
+ ActiveRecord::Base.connection.insert("INSERT INTO ways (id,user_id,timestamp,visible) VALUES (#{way},#{uid},#{db_now},0)")
+ ActiveRecord::Base.connection.update("UPDATE current_ways SET user_id=#{uid},timestamp=#{db_now},visible=0 WHERE id=#{way}")
+ ActiveRecord::Base.connection.execute("DELETE FROM current_way_segments WHERE id=#{way}")
+ ActiveRecord::Base.connection.execute("DELETE FROM current_way_tags WHERE id=#{way}")
+
+ way