Let me start by saying - thank you for this library. It has filled a need for my team to provide visibility for data, not only in Postgres - but Redshift as well.
Which brings me to a current use-case - have you given any thought to adding support for read-only mode as a configuration option for rails_db?
I was thinking something to the effect of extending the existing Connection class to be wrapped in a READ_ONLY transaction, i.e.
def with_read_only_connection(configuration)
ActiveRecord::Base.establish_connection(configuration)
ActiveRecord::Base.connection.execute("SET SESSION CHARACTERISTICS AS TRANSACTION READ ONLY")
end
Another thought would be to allow the gem to be initialized such that the SQL editor allows connection via a readonly DB user that is different than that used by the runtime context for the application.
Let me start by saying - thank you for this library. It has filled a need for my team to provide visibility for data, not only in Postgres - but Redshift as well.
Which brings me to a current use-case - have you given any thought to adding support for read-only mode as a configuration option for rails_db?
I was thinking something to the effect of extending the existing
Connection
class to be wrapped in a READ_ONLY transaction, i.e.