Skip to content

Commit

Permalink
Active Record Multiple Database > Horizontal Sharding campuscode#692
Browse files Browse the repository at this point in the history
  • Loading branch information
rohan-techfreak committed Nov 10, 2021
1 parent 66c5ec4 commit a354dee
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pt-BR/active_record_multiple_databases.md
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ usando o *sharding*, um `role` e um` shard` devem ser passados:

```ruby
ActiveRecord::Base.connected_to(role: :writing, shard: :default) do
@id = Person.create! # Cria um registro no padrão de fragmento
@id = Person.create! # Cria um registro no fragmento padrão
end
ActiveRecord::Base.connected_to(role: :writing, shard: :shard_one) do
Expand All @@ -316,7 +316,7 @@ papel (*role*) e o fragmento (*shard*) com a API `connected_to`.

```ruby
ActiveRecord::Base.connected_to(role: :reading, shard: :shard_one) do
Person.first # Registro de pesquisa da réplica de leitura do fragmento um
Person.first # Procura um registro de uma réplica de leitura do shard_one
end
```

Expand Down

0 comments on commit a354dee

Please sign in to comment.