Skip to content
代码片段 群组 项目
用户头像
Yorick Peterse 编辑于
Gitlab::Database::Connection was a kitchen sink type of class: it had
methods for obtaining database information (e.g. the database name),
running WAL related queries, querying the status of transactions, and
more.

This commit splits this class into separate types. For example,
reflection related methods are now located in
Gitlab::Database::Reflection. Transaction related methods are moved into
the Transactions module. The method to get a WAL diff has been moved
into the LoadBalancer class.

With this also changes the use of these methods. For example, instead of
this:

    Gitlab::Database.main.cached_column_exists?(:users, :id)

You now write this:

    Users.database.cached_column_exists?(:id)

Apart from being shorter in many cases, it also decouples the code using
these methods from the main database. This makes it easier to support
multiple databases over time.
9bb48c9b
历史
代码所有者
将用户和群组指定为特定文件更改的核准人。 了解更多。
名称 最后提交 最后更新
..