From 0a429c01bab0118e4bc2c993c1eb2b52dff4b7c0 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 20 Aug 2024 17:56:02 +0000 Subject: [PATCH] Deployed da9681b with MkDocs version: 1.5.3 --- .nojekyll | 0 404.html | 787 ++ CNAME | 1 + adapters/broker/index.html | 1298 ++++ adapters/broker/redis/index.html | 1308 ++++ adapters/cache/index.html | 1298 ++++ adapters/cache/redis/index.html | 1308 ++++ adapters/database/elasticsearch/index.html | 1504 ++++ adapters/database/index.html | 1298 ++++ adapters/database/postgresql/index.html | 1518 ++++ adapters/eventstore/index.html | 1298 ++++ adapters/eventstore/message-db/index.html | 1308 ++++ adapters/index.html | 1411 ++++ adapters/internals/index.html | 1595 ++++ .../protean/graph/badge.6b92be7a.svg | 23 + .../fonts.googleapis.com/css.56f7ac64.css | 405 + ...73FwrK3iLTeHuS_fvQtMwCp50KnMa0ZL7SUc.woff2 | Bin 0 -> 17600 bytes ...UcC73FwrK3iLTeHuS_fvQtMwCp50KnMa1ZL7.woff2 | Bin 0 -> 46704 bytes ...73FwrK3iLTeHuS_fvQtMwCp50KnMa1pL7SUc.woff2 | Bin 0 -> 22480 bytes ...73FwrK3iLTeHuS_fvQtMwCp50KnMa25L7SUc.woff2 | Bin 0 -> 79940 bytes ...73FwrK3iLTeHuS_fvQtMwCp50KnMa2JL7SUc.woff2 | Bin 0 -> 27284 bytes ...73FwrK3iLTeHuS_fvQtMwCp50KnMa2ZL7SUc.woff2 | Bin 0 -> 12732 bytes ...73FwrK3iLTeHuS_fvQtMwCp50KnMa2pL7SUc.woff2 | Bin 0 -> 10540 bytes ...uZJJXxfpAO-LfjGbsVNLG7DGdF6OZ1PswAMg.woff2 | Bin 0 -> 33068 bytes ...JXxfpAO-LfjGbsVNLG7DGdF6OZ1PswwMgo-8.woff2 | Bin 0 -> 7020 bytes ...JXxfpAO-LfjGbsVNLG7DGdF6OZ1PsxAMgo-8.woff2 | Bin 0 -> 9720 bytes ...JXxfpAO-LfjGbsVNLG7DGdF6OZ1PszQMgo-8.woff2 | Bin 0 -> 1696 bytes ...JXxfpAO-LfjGbsVNLG7DGdF6OZ1PszgMgo-8.woff2 | Bin 0 -> 11860 bytes ...JXxfpAO-LfjGbsVNLG7DGdF6OZ1PszwMgo-8.woff2 | Bin 0 -> 6132 bytes ...0PnT8RD8yKwBNntkaToggR7BYRbKPx3cwhsk.woff2 | Bin 0 -> 1624 bytes ...0PnT8RD8yKwBNntkaToggR7BYRbKPx7cwhsk.woff2 | Bin 0 -> 11064 bytes ...BX0PnT8RD8yKwBNntkaToggR7BYRbKPxDcwg.woff2 | Bin 0 -> 31380 bytes ...0PnT8RD8yKwBNntkaToggR7BYRbKPxPcwhsk.woff2 | Bin 0 -> 6724 bytes ...0PnT8RD8yKwBNntkaToggR7BYRbKPxTcwhsk.woff2 | Bin 0 -> 8852 bytes ...0PnT8RD8yKwBNntkaToggR7BYRbKPx_cwhsk.woff2 | Bin 0 -> 5736 bytes .../actions/workflows/ci.yml/badge.svg | 35 + .../pypi/pyversions/protean.3ef80b83.svg | 1 + .../pypi/v/protean.230b2553.svg | 1 + .../mermaid@10.7.0/dist/mermaid.min.js | 1642 ++++ assets/favicon.png | Bin 0 -> 21076 bytes assets/full-logo.png | Bin 0 -> 369553 bytes assets/images/favicon.png | Bin 0 -> 1870 bytes assets/javascripts/bundle.bd41221c.min.js | 29 + assets/javascripts/bundle.bd41221c.min.js.map | 7 + assets/javascripts/lunr/min/lunr.ar.min.js | 1 + assets/javascripts/lunr/min/lunr.da.min.js | 18 + assets/javascripts/lunr/min/lunr.de.min.js | 18 + assets/javascripts/lunr/min/lunr.du.min.js | 18 + assets/javascripts/lunr/min/lunr.el.min.js | 1 + assets/javascripts/lunr/min/lunr.es.min.js | 18 + assets/javascripts/lunr/min/lunr.fi.min.js | 18 + assets/javascripts/lunr/min/lunr.fr.min.js | 18 + assets/javascripts/lunr/min/lunr.he.min.js | 1 + assets/javascripts/lunr/min/lunr.hi.min.js | 1 + assets/javascripts/lunr/min/lunr.hu.min.js | 18 + assets/javascripts/lunr/min/lunr.hy.min.js | 1 + assets/javascripts/lunr/min/lunr.it.min.js | 18 + assets/javascripts/lunr/min/lunr.ja.min.js | 1 + assets/javascripts/lunr/min/lunr.jp.min.js | 1 + assets/javascripts/lunr/min/lunr.kn.min.js | 1 + assets/javascripts/lunr/min/lunr.ko.min.js | 1 + assets/javascripts/lunr/min/lunr.multi.min.js | 1 + assets/javascripts/lunr/min/lunr.nl.min.js | 18 + assets/javascripts/lunr/min/lunr.no.min.js | 18 + assets/javascripts/lunr/min/lunr.pt.min.js | 18 + assets/javascripts/lunr/min/lunr.ro.min.js | 18 + assets/javascripts/lunr/min/lunr.ru.min.js | 18 + assets/javascripts/lunr/min/lunr.sa.min.js | 1 + .../lunr/min/lunr.stemmer.support.min.js | 1 + assets/javascripts/lunr/min/lunr.sv.min.js | 18 + assets/javascripts/lunr/min/lunr.ta.min.js | 1 + assets/javascripts/lunr/min/lunr.te.min.js | 1 + assets/javascripts/lunr/min/lunr.th.min.js | 1 + assets/javascripts/lunr/min/lunr.tr.min.js | 18 + assets/javascripts/lunr/min/lunr.vi.min.js | 1 + assets/javascripts/lunr/min/lunr.zh.min.js | 1 + assets/javascripts/lunr/tinyseg.js | 206 + assets/javascripts/lunr/wordcut.js | 6708 +++++++++++++++++ .../workers/search.b8dbb3d2.min.js | 42 + .../workers/search.b8dbb3d2.min.js.map | 7 + assets/logo.png | Bin 0 -> 34489 bytes assets/stylesheets/main.7e359304.min.css | 1 + assets/stylesheets/main.7e359304.min.css.map | 1 + assets/stylesheets/palette.06af60db.min.css | 1 + .../stylesheets/palette.06af60db.min.css.map | 1 + community/contributing/adapters/index.html | 912 +++ community/contributing/setup/index.html | 1096 +++ community/index.html | 1109 +++ core-concepts/analysis-model/index.html | 1436 ++++ core-concepts/anti-patterns/index.html | 849 +++ core-concepts/bounded-contexts/index.html | 818 ++ .../building-blocks/aggregates/index.html | 1643 ++++ .../command-handlers/index.html | 1643 ++++ .../building-blocks/commands/index.html | 1809 +++++ .../domain-services/index.html | 1525 ++++ .../building-blocks/entities/index.html | 1574 ++++ .../building-blocks/events/index.html | 1974 +++++ core-concepts/building-blocks/index.html | 1289 ++++ .../building-blocks/repositories/index.html | 819 ++ .../building-blocks/value-objects/index.html | 1548 ++++ core-concepts/cqrs/index.html | 1448 ++++ core-concepts/ddd/index.html | 1434 ++++ core-concepts/event-sourcing/index.html | 1371 ++++ core-concepts/identity/index.html | 1300 ++++ core-concepts/invariants/index.html | 815 ++ core-concepts/philosophy/index.html | 1209 +++ core-concepts/streams/index.html | 1418 ++++ core-concepts/ubiquitous-language/index.html | 816 ++ features/index.html | 1275 ++++ glossary/index.html | 1424 ++++ .../change-state/command-handlers/index.html | 1930 +++++ guides/change-state/commands/index.html | 1884 +++++ guides/change-state/index.html | 1758 +++++ .../persist-aggregates/index.html | 1948 +++++ .../retrieve-aggregates/index.html | 2090 +++++ guides/change-state/unit-of-work/index.html | 1833 +++++ guides/cli/discovery/index.html | 1772 +++++ guides/cli/docs/index.html | 1850 +++++ guides/cli/index.html | 1770 +++++ guides/cli/new/index.html | 1999 +++++ guides/cli/shell/index.html | 1927 +++++ guides/cli/test/index.html | 1937 +++++ .../activate-domain/index.html | 1976 +++++ .../element-decorators/index.html | 2310 ++++++ .../initialize-domain/index.html | 1935 +++++ .../register-elements/index.html | 1878 +++++ .../when-to-compose/index.html | 1777 +++++ guides/configuration/index.html | 2184 ++++++ .../consume-state/event-handlers/index.html | 1877 +++++ guides/consume-state/index.html | 1662 ++++ guides/consume-state/views/index.html | 1879 +++++ .../aggregate-mutation/index.html | 1894 +++++ .../domain-services/index.html | 2276 ++++++ guides/domain-behavior/index.html | 1725 +++++ guides/domain-behavior/invariants/index.html | 2066 +++++ .../domain-behavior/raising-events/index.html | 2029 +++++ guides/domain-behavior/validations/index.html | 1946 +++++ .../domain-definition/aggregates/index.html | 2475 ++++++ guides/domain-definition/entities/index.html | 2030 +++++ guides/domain-definition/events/index.html | 2469 ++++++ .../fields/arguments/index.html | 2447 ++++++ .../fields/association-fields/index.html | 2094 +++++ .../fields/container-fields/index.html | 2212 ++++++ guides/domain-definition/fields/index.html | 1962 +++++ .../fields/simple-fields/index.html | 2326 ++++++ guides/domain-definition/index.html | 1883 +++++ .../value-objects/index.html | 2289 ++++++ .../getting-started/installation/index.html | 1787 +++++ guides/identity/index.html | 1966 +++++ guides/object-model/index.html | 1985 +++++ images/cqrs-workflow.jpg | Bin 0 -> 229665 bytes images/ddd-workflow.jpg | Bin 0 -> 201249 bytes images/es-workflow.jpg | Bin 0 -> 128238 bytes images/infra-independence.png | Bin 0 -> 94682 bytes images/protean-core.png | Bin 0 -> 174966 bytes index.html | 1017 +++ overrides/partials/languages/custom.html | 56 + patterns/command-idempotency/index.html | 809 ++ .../index.html | 824 ++ .../index.html | 810 ++ patterns/creating-identities-early/index.html | 814 ++ patterns/index.html | 873 +++ .../index.html | 809 ++ .../index.html | 809 ++ sitemap.xml | 428 ++ sitemap.xml.gz | Bin 0 -> 960 bytes start-here/index.html | 1122 +++ stylesheets/extra.css | 81 + 168 files changed, 146372 insertions(+) create mode 100644 .nojekyll create mode 100644 404.html create mode 100644 CNAME create mode 100644 adapters/broker/index.html create mode 100644 adapters/broker/redis/index.html create mode 100644 adapters/cache/index.html create mode 100644 adapters/cache/redis/index.html create mode 100644 adapters/database/elasticsearch/index.html create mode 100644 adapters/database/index.html create mode 100644 adapters/database/postgresql/index.html create mode 100644 adapters/eventstore/index.html create mode 100644 adapters/eventstore/message-db/index.html create mode 100644 adapters/index.html create mode 100644 adapters/internals/index.html create mode 100644 assets/external/codecov.io/gh/proteanhq/protean/graph/badge.6b92be7a.svg create mode 100644 assets/external/fonts.googleapis.com/css.56f7ac64.css create mode 100644 assets/external/fonts.gstatic.com/s/inter/v13/UcC73FwrK3iLTeHuS_fvQtMwCp50KnMa0ZL7SUc.woff2 create mode 100644 assets/external/fonts.gstatic.com/s/inter/v13/UcC73FwrK3iLTeHuS_fvQtMwCp50KnMa1ZL7.woff2 create mode 100644 assets/external/fonts.gstatic.com/s/inter/v13/UcC73FwrK3iLTeHuS_fvQtMwCp50KnMa1pL7SUc.woff2 create mode 100644 assets/external/fonts.gstatic.com/s/inter/v13/UcC73FwrK3iLTeHuS_fvQtMwCp50KnMa25L7SUc.woff2 create mode 100644 assets/external/fonts.gstatic.com/s/inter/v13/UcC73FwrK3iLTeHuS_fvQtMwCp50KnMa2JL7SUc.woff2 create mode 100644 assets/external/fonts.gstatic.com/s/inter/v13/UcC73FwrK3iLTeHuS_fvQtMwCp50KnMa2ZL7SUc.woff2 create mode 100644 assets/external/fonts.gstatic.com/s/inter/v13/UcC73FwrK3iLTeHuS_fvQtMwCp50KnMa2pL7SUc.woff2 create mode 100644 assets/external/fonts.gstatic.com/s/jetbrainsmono/v18/tDbp2o-flEEny0FZhsfKu5WU4xD-IQ-PuZJJXxfpAO-LfjGbsVNLG7DGdF6OZ1PswAMg.woff2 create mode 100644 assets/external/fonts.gstatic.com/s/jetbrainsmono/v18/tDbp2o-flEEny0FZhsfKu5WU4xD-IQ-PuZJJXxfpAO-LfjGbsVNLG7DGdF6OZ1PswwMgo-8.woff2 create mode 100644 assets/external/fonts.gstatic.com/s/jetbrainsmono/v18/tDbp2o-flEEny0FZhsfKu5WU4xD-IQ-PuZJJXxfpAO-LfjGbsVNLG7DGdF6OZ1PsxAMgo-8.woff2 create mode 100644 assets/external/fonts.gstatic.com/s/jetbrainsmono/v18/tDbp2o-flEEny0FZhsfKu5WU4xD-IQ-PuZJJXxfpAO-LfjGbsVNLG7DGdF6OZ1PszQMgo-8.woff2 create mode 100644 assets/external/fonts.gstatic.com/s/jetbrainsmono/v18/tDbp2o-flEEny0FZhsfKu5WU4xD-IQ-PuZJJXxfpAO-LfjGbsVNLG7DGdF6OZ1PszgMgo-8.woff2 create mode 100644 assets/external/fonts.gstatic.com/s/jetbrainsmono/v18/tDbp2o-flEEny0FZhsfKu5WU4xD-IQ-PuZJJXxfpAO-LfjGbsVNLG7DGdF6OZ1PszwMgo-8.woff2 create mode 100644 assets/external/fonts.gstatic.com/s/jetbrainsmono/v18/tDbv2o-flEEny0FZhsfKu5WU4zr3E_BX0PnT8RD8yKwBNntkaToggR7BYRbKPx3cwhsk.woff2 create mode 100644 assets/external/fonts.gstatic.com/s/jetbrainsmono/v18/tDbv2o-flEEny0FZhsfKu5WU4zr3E_BX0PnT8RD8yKwBNntkaToggR7BYRbKPx7cwhsk.woff2 create mode 100644 assets/external/fonts.gstatic.com/s/jetbrainsmono/v18/tDbv2o-flEEny0FZhsfKu5WU4zr3E_BX0PnT8RD8yKwBNntkaToggR7BYRbKPxDcwg.woff2 create mode 100644 assets/external/fonts.gstatic.com/s/jetbrainsmono/v18/tDbv2o-flEEny0FZhsfKu5WU4zr3E_BX0PnT8RD8yKwBNntkaToggR7BYRbKPxPcwhsk.woff2 create mode 100644 assets/external/fonts.gstatic.com/s/jetbrainsmono/v18/tDbv2o-flEEny0FZhsfKu5WU4zr3E_BX0PnT8RD8yKwBNntkaToggR7BYRbKPxTcwhsk.woff2 create mode 100644 assets/external/fonts.gstatic.com/s/jetbrainsmono/v18/tDbv2o-flEEny0FZhsfKu5WU4zr3E_BX0PnT8RD8yKwBNntkaToggR7BYRbKPx_cwhsk.woff2 create mode 100644 assets/external/github.com/proteanhq/protean/actions/workflows/ci.yml/badge.svg create mode 100644 assets/external/img.shields.io/pypi/pyversions/protean.3ef80b83.svg create mode 100644 assets/external/img.shields.io/pypi/v/protean.230b2553.svg create mode 100644 assets/external/unpkg.com/mermaid@10.7.0/dist/mermaid.min.js create mode 100644 assets/favicon.png create mode 100644 assets/full-logo.png create mode 100644 assets/images/favicon.png create mode 100644 assets/javascripts/bundle.bd41221c.min.js create mode 100644 assets/javascripts/bundle.bd41221c.min.js.map create mode 100644 assets/javascripts/lunr/min/lunr.ar.min.js create mode 100644 assets/javascripts/lunr/min/lunr.da.min.js create mode 100644 assets/javascripts/lunr/min/lunr.de.min.js create mode 100644 assets/javascripts/lunr/min/lunr.du.min.js create mode 100644 assets/javascripts/lunr/min/lunr.el.min.js create mode 100644 assets/javascripts/lunr/min/lunr.es.min.js create mode 100644 assets/javascripts/lunr/min/lunr.fi.min.js create mode 100644 assets/javascripts/lunr/min/lunr.fr.min.js create mode 100644 assets/javascripts/lunr/min/lunr.he.min.js create mode 100644 assets/javascripts/lunr/min/lunr.hi.min.js create mode 100644 assets/javascripts/lunr/min/lunr.hu.min.js create mode 100644 assets/javascripts/lunr/min/lunr.hy.min.js create mode 100644 assets/javascripts/lunr/min/lunr.it.min.js create mode 100644 assets/javascripts/lunr/min/lunr.ja.min.js create mode 100644 assets/javascripts/lunr/min/lunr.jp.min.js create mode 100644 assets/javascripts/lunr/min/lunr.kn.min.js create mode 100644 assets/javascripts/lunr/min/lunr.ko.min.js create mode 100644 assets/javascripts/lunr/min/lunr.multi.min.js create mode 100644 assets/javascripts/lunr/min/lunr.nl.min.js create mode 100644 assets/javascripts/lunr/min/lunr.no.min.js create mode 100644 assets/javascripts/lunr/min/lunr.pt.min.js create mode 100644 assets/javascripts/lunr/min/lunr.ro.min.js create mode 100644 assets/javascripts/lunr/min/lunr.ru.min.js create mode 100644 assets/javascripts/lunr/min/lunr.sa.min.js create mode 100644 assets/javascripts/lunr/min/lunr.stemmer.support.min.js create mode 100644 assets/javascripts/lunr/min/lunr.sv.min.js create mode 100644 assets/javascripts/lunr/min/lunr.ta.min.js create mode 100644 assets/javascripts/lunr/min/lunr.te.min.js create mode 100644 assets/javascripts/lunr/min/lunr.th.min.js create mode 100644 assets/javascripts/lunr/min/lunr.tr.min.js create mode 100644 assets/javascripts/lunr/min/lunr.vi.min.js create mode 100644 assets/javascripts/lunr/min/lunr.zh.min.js create mode 100644 assets/javascripts/lunr/tinyseg.js create mode 100644 assets/javascripts/lunr/wordcut.js create mode 100644 assets/javascripts/workers/search.b8dbb3d2.min.js create mode 100644 assets/javascripts/workers/search.b8dbb3d2.min.js.map create mode 100644 assets/logo.png create mode 100644 assets/stylesheets/main.7e359304.min.css create mode 100644 assets/stylesheets/main.7e359304.min.css.map create mode 100644 assets/stylesheets/palette.06af60db.min.css create mode 100644 assets/stylesheets/palette.06af60db.min.css.map create mode 100644 community/contributing/adapters/index.html create mode 100644 community/contributing/setup/index.html create mode 100644 community/index.html create mode 100644 core-concepts/analysis-model/index.html create mode 100644 core-concepts/anti-patterns/index.html create mode 100644 core-concepts/bounded-contexts/index.html create mode 100644 core-concepts/building-blocks/aggregates/index.html create mode 100644 core-concepts/building-blocks/command-handlers/index.html create mode 100644 core-concepts/building-blocks/commands/index.html create mode 100644 core-concepts/building-blocks/domain-services/index.html create mode 100644 core-concepts/building-blocks/entities/index.html create mode 100644 core-concepts/building-blocks/events/index.html create mode 100644 core-concepts/building-blocks/index.html create mode 100644 core-concepts/building-blocks/repositories/index.html create mode 100644 core-concepts/building-blocks/value-objects/index.html create mode 100644 core-concepts/cqrs/index.html create mode 100644 core-concepts/ddd/index.html create mode 100644 core-concepts/event-sourcing/index.html create mode 100644 core-concepts/identity/index.html create mode 100644 core-concepts/invariants/index.html create mode 100644 core-concepts/philosophy/index.html create mode 100644 core-concepts/streams/index.html create mode 100644 core-concepts/ubiquitous-language/index.html create mode 100644 features/index.html create mode 100644 glossary/index.html create mode 100644 guides/change-state/command-handlers/index.html create mode 100644 guides/change-state/commands/index.html create mode 100644 guides/change-state/index.html create mode 100644 guides/change-state/persist-aggregates/index.html create mode 100644 guides/change-state/retrieve-aggregates/index.html create mode 100644 guides/change-state/unit-of-work/index.html create mode 100644 guides/cli/discovery/index.html create mode 100644 guides/cli/docs/index.html create mode 100644 guides/cli/index.html create mode 100644 guides/cli/new/index.html create mode 100644 guides/cli/shell/index.html create mode 100644 guides/cli/test/index.html create mode 100644 guides/compose-a-domain/activate-domain/index.html create mode 100644 guides/compose-a-domain/element-decorators/index.html create mode 100644 guides/compose-a-domain/initialize-domain/index.html create mode 100644 guides/compose-a-domain/register-elements/index.html create mode 100644 guides/compose-a-domain/when-to-compose/index.html create mode 100644 guides/configuration/index.html create mode 100644 guides/consume-state/event-handlers/index.html create mode 100644 guides/consume-state/index.html create mode 100644 guides/consume-state/views/index.html create mode 100644 guides/domain-behavior/aggregate-mutation/index.html create mode 100644 guides/domain-behavior/domain-services/index.html create mode 100644 guides/domain-behavior/index.html create mode 100644 guides/domain-behavior/invariants/index.html create mode 100644 guides/domain-behavior/raising-events/index.html create mode 100644 guides/domain-behavior/validations/index.html create mode 100644 guides/domain-definition/aggregates/index.html create mode 100644 guides/domain-definition/entities/index.html create mode 100644 guides/domain-definition/events/index.html create mode 100644 guides/domain-definition/fields/arguments/index.html create mode 100644 guides/domain-definition/fields/association-fields/index.html create mode 100644 guides/domain-definition/fields/container-fields/index.html create mode 100644 guides/domain-definition/fields/index.html create mode 100644 guides/domain-definition/fields/simple-fields/index.html create mode 100644 guides/domain-definition/index.html create mode 100644 guides/domain-definition/value-objects/index.html create mode 100644 guides/getting-started/installation/index.html create mode 100644 guides/identity/index.html create mode 100644 guides/object-model/index.html create mode 100644 images/cqrs-workflow.jpg create mode 100644 images/ddd-workflow.jpg create mode 100644 images/es-workflow.jpg create mode 100644 images/infra-independence.png create mode 100644 images/protean-core.png create mode 100644 index.html create mode 100644 overrides/partials/languages/custom.html create mode 100644 patterns/command-idempotency/index.html create mode 100644 patterns/connect-concepts-across-domains/index.html create mode 100644 patterns/consuming-events-from-other-domains/index.html create mode 100644 patterns/creating-identities-early/index.html create mode 100644 patterns/index.html create mode 100644 patterns/setting-up-and-tearing-down-database-for-tests/index.html create mode 100644 patterns/sharing-event-classes-across-domains/index.html create mode 100644 sitemap.xml create mode 100644 sitemap.xml.gz create mode 100644 start-here/index.html create mode 100644 stylesheets/extra.css diff --git a/.nojekyll b/.nojekyll new file mode 100644 index 00000000..e69de29b diff --git a/404.html b/404.html new file mode 100644 index 00000000..faf9401d --- /dev/null +++ b/404.html @@ -0,0 +1,787 @@ + + + +
+ + + + + + + + + + + + + + +To use Elasticsearch as a database provider, use the below configuration setting:
+[databases.elasticsearch]
+provider = "elasticsearch"
+database_uri = "{'hosts': ['localhost']}"
+namespace_prefix = "${PROTEAN_ENV}"
+settings = "{'number_of_shards': 3}"
+
Additional options for finer control:
+Elasticsearch instance are prefixed with the specified string. For example, if
+the namespace prefix is prod
, the index for aggregate Person
will be
+prod-person
.
Custom character to join namespace_prefix =n ${Default} yphen(-
). For example, with NAMESPACE_SEPARATOR
as _
and namespace
+prefix as prod
, the index of aggregate Person
will be prod_person
.
Index settings passed as-is to Elasticsearch instance.
+Note that if you supply a custom Elasticsearch Model with an Index
inner class, the options specified in the
+inner class override those at the config level.
In the sample below, with the configuration settings specified above, the options at Aggregate level will be
+overridden and the Elasticsearch Model will have the default index value *
and number of shards as 1
.
class Person(BaseAggregate):
+ name = String()
+ about = Text()
+
+ class Meta:
+ schema_name = "people"
+
+class PeopleModel(ElasticsearchModel):
+ name = Text(fields={"raw": Keyword()})
+ about = Text()
+
+ class Index:
+ settings = {"number_of_shards": 1}
+
The PostgreSQL adapter uses (SQLAlchemy
)[https://www.sqlalchemy.org/] under
+the covers as the ORM to communicate with the database.
[databases.default]
+provider = "postgresql"
+database_uri = "postgresql://postgres:postgres@localhost:5432/postgres"
+
postgresql
is the provider for PostgreSQL.
Connection string that specifies how to connect to a PostgreSQL database.
+Specifies the database schema to use in the database.
+You can supply a custom SQLAlchemy Model in place of the one that Protean +generates internally, allowing you full customization.
+import sqlalchemy as sa
+
+from protean import Domain
+from protean.adapters.repository.sqlalchemy import SqlalchemyModel
+from protean.fields import Integer, String
+
+domain = Domain(__file__, load_toml=False)
+domain.config["databases"]["default"] = {
+ "provider": "postgresql",
+ "database_uri": "postgresql://postgres:postgres@localhost:5432/postgres",
+}
+
+
+@domain.aggregate
+class Provider:
+ name = String()
+ age = Integer()
+
+
+@domain.model(part_of=Provider)
+class ProviderCustomModel:
+ name = sa.Column(sa.Text)
+ age = sa.Column(sa.Integer)
+
+
+domain.init()
+with domain.domain_context():
+ model_cls = domain.repository_for(Provider)._model
+ assert issubclass(model_cls, SqlalchemyModel)
+
Note
+The column names specified in the model should exactly match the attribute +names of the Aggregate or Entity it represents.
+A core tenet in Protean's philosophy is to separate the domain +from the underlying infrastructure. It enables you to code +and test models without worrying about technology and plug in a +component when ready. This lets you delay your decision on technology +until the last responsible moment.
+Protean's design is based on the Ports and Adapters architecture, +also known as Hexagonal Architecture, +allowing loosely coupled components that can be easily connected and swapped.
+Ports are abstract interfaces that define a specific type of interaction +between the application and the outside world. They define a protocol that can +be implemented by concrete technology implementations called adapters.
+Adapters are the glue between the application and the outside world. They +tailor the exchanges between the external technology and the ports that +represent the requirements of the inside of the application.
+Protean exposes several ports with an array of built-in adapters for +each port.
+The Database port defines the interface for interacting +with persistent storage +systems. It abstracts the underlying database technology, allowing Protean to +support various databases without changing the core application logic.
+Current Implementations:
+The Broker port defines the interface for message brokers and pub/sub systems. +It enables communication between different parts of the ecosystem via messages, +facilitating asynchronous processing and decoupling.
+Note
+Protean internally uses an Event Store that acts both as an event +storage mechanism as well as a message delivery mechanism within a Protean-based +application. Brokers are more focused on integration with other systems.
+Current Implementations:
+The Cache port defines the interface for interacting with caching systems. It +exposes APIs to temporarily store and retrieve data, improving application +performance by reducing the need for repeated database access.
+Current Implementations:
+The Event Store port defines the interface for event sourcing and event store +systems. It handles the storage and retrieval of events, which are the +fundamental units of change in event-driven architectures. This port ensures +that all state changes are recorded as a sequence of events, providing a +complete audit trail and enabling features like event replay and temporal +queries.
+Current Implementations:
+Note
+We are working on adding a comprehensive set of adapters to this list. +We welcome your contribution - head over to the section on +contributing adapters for more +information.
+You can sponsor an adapter if you want to fast-track its implemetation. +Get in touch with us for a discussion.
+A database adapter has four components that work together to make database +communication possible. Each adapter will override the corresponding base +classes for each of these components with its own implementation.
+Note
+An exception to this rule is the Session
class. It may be preferable to
+use the Session
structures provided by the database technology as-is. For
+example, PostgreSQL
adapter that is powered by SQLAlchemy
simply uses
+(and returns) the sqlalchemy.orm.Session
+object provided by SQLAlchemy
.
Base Class: protean.port.database.BaseProvider
The Provider is the main component responsible for interfacing with the +specific database technology. It contains the configuration and setup needed +to connect to the database, and it provides methods for interacting with the +database at a high level.
+The Provider acts as the bridge between the application and the database, +ensuring that the necessary connections are established and maintained. +It also handles any database-specific nuances, such as connection pooling, +transaction management, and query optimization.
+To add a new provider, subclass from the Provider Base class and implement +methods for your database technology.
+Base Class: protean.port.database.BaseDAO
The Data Access Object (DAO) is responsible for encapsulating the details of +the database interactions. It provides an abstract interface to the database, +hiding the complexity of the underlying database operations from the rest of +the application.
+The DAO defines methods for CRUD (Create, Read, Update, Delete) operations +and other database queries, translating them into the appropriate SQL or +database-specific commands.
+By using DAOs, the application code remains clean and decoupled from the +database logic. DAOs also work in conjunction in lookups to +establish a query API that works across various adapters.
+To add a new DAO for your provider, subclass from the DAO Base class and +implement methods for your database technology.
+The Session component manages the lifecycle of database transactions. It is +responsible for opening and closing connections, beginning and committing +transactions, and ensuring data consistency.
+The Session provides a context for performing database operations, +ensuring that all database interactions within a transaction are properly +managed and that resources are released appropriately. This component is +crucial for maintaining transactional integrity and for handling rollback +scenarios in case of errors.
+The Session object is usually constructed and provided by the database orm
+or technology package. For example, PostgreSQL
adapter depends on the
+sqlalchemy.orm.Session
+object provided by SQLAlchemy
.
Base Class: protean.core.model.BaseModel
The Model represents the domain entities that are persisted in the database. +It defines the structure of the data, including fields, relationships, and +constraints. It is also a high-level abstraction for working with database +records, allowing you to interact with the data using Python objects rather +than raw queries.
+Models are typically defined using a schema or an ORM +(Object-Relational Mapping) framework that maps the database tables to +Python objects.
+Implementing a model for your database technology can be slightly involved, +as ORM packages can heavily depend upon interal structures. Every +database package is structured differently. Consult existing models for +PostgreSQL +(SQLAlchemy) +and Elasticsearch +(Elasticsearch) +for examples on constructing model classes.
+Once you define a base model for your provider, Protean auto-generates the model +class for aggregates or entities when needed. You can control this behavior +by supplying an explicit hand-crafted model class for your entity.
+ + +Lookups in Protean are mechanisms used to query the database based on certain +criteria. They are customized implementations of different types of filters +that help filter and retrieve data from the database, making it easier to +perform complex queries without writing raw SQL. Lookups are typically used in +the DAO layer to fetch records that match specific conditions.
+Refer to the section on +querying +aggregates for examples of lookups. Consult the documentation on your specific +chosen adapter for more information. The adapter may support specialized +lookups for efficient or technology-specific queries.
+Adapters are initialized as part of Domain initialization. Protean creates +the provider objects in the adapter and establishes connections with the +underlying infrastructure.
+If a connection cannot be established for whatever reason, the Protean +initialization procedure immediately halts and exits with an error message:
+from protean import Domain
+
+domain = Domain(__file__, load_toml=False)
+
+# Non-existent database
+domain.config["databases"]["default"] = {
+ "provider": "postgresql",
+ "database_uri": "postgresql://postgres:postgres@localhost:5444/foobar", # (1)
+}
+
+domain.init(traverse=False)
+
+# Output
+#
+# protean.exceptions.ConfigurationError:
+# Could not connect to database at postgresql://postgres:postgres@localhost:5444/foobar
+
foobar
database does not exist on port 5444{uzH0K$v`2B$(N8xkUh`<@wq$AE|l
z3lcJg*eODxWT;d_4Q}hgQtN|9Q>d_Eq0%PWCxm9v)>dp?CZ?S?g!@ Zr05$&o~I8(^+?+^D4d
zASIye-fP2xm`xHs6l;;0V!l^Hb$)gBby9+G4v{P=dcb7?hG2LlkxILd?f9XN6Bdj&
z?X1uN&ZEJPGhp@@on(h`+GwSPNiy)K+Ybw?)N1>KRCujH5;97BF>o8x!Q9GTj$b;y
z+Mqm9q8p}YUo@Lc-pxD^r4pBABz*Q`QV%E2WG={D*;ygT4Q1z*8F|N-mS=%3W-5A>
z-Xk3N_u7<7)VUV6ET%l6&Da?r#>|IUjgHjd*%+ERG>VPzQd22nOzj~BrA1!xtCTXg
zZ>O_wPiB=GZ IiLJ{L)^g&u
zRW_3|9?JlsZWpT9lt=0iA!p*YPGE-2G-s3i-n(zFuND``K10G6VblwV9Rg0%H?15Z
zBr<;=TN85gBb;9Zptj(o@QtpbVEq%6F
zucK9rOGTL}08LNuJrMcf2gdOt$LNn~G_qwCUt6S_k!T>YuUd0eqan`2yXl&EmG5!f
zDD@-LrEhxeeJT
zL4FkKK0uDkV;n6oU-9wr58P_V@~+w~V>D8iD`o%vhN~MzN02Wi!>*_`enUF)E=eZq
zV%M`xuxj3H#~Iz9QB`hPDUnq;9a@Rk-G&sXQ*Agr@iMlQBqxEF#CeX)R*Tpo@6dG3
zu>P@1qN0N|dME|ak7Jg;U=-)wMOx@4mAy^iZ595s;n43z0NJ(b6{TgSb--o6(zQ*c
z+-o!G812mwIA=Xm1YH*N)D&IYeiatBy0u~=uzfWff;r?ia_YKN0TTl>M?em{Jboit
z;I{YUD0hbV=ls4qFfAHh5&xT9L2e~gy*n=oUdr;!4;a1Fq><*B_IRx;b;;l1{d|W2
z-w^#l`H?XQR|bz@jHiIl2>Zr5NQ!R8-1ITA9O8f7=kdrW l6)cBBMB;?5;HV}L
z1IA(-I?+if-Dpe$hz8?vP2Iu3-5KYA-#b_D<)j`tKyIH_m#a?mHt*avb$WJ~|L-4_
znYAyVKEof|f2_ARa8hVvHn#exJ)3@m$s{vT{+@6~^7Wq&O|z;OG|QW$b}OlK(_J}%
zI_p6;6jltXs5}vshH_@Wkf@5xI=GMBY__TiTNuacyBU3rQJlH-NMQRR{XQs=4I~*=7z;-be_ZOeKLgg_^SRy
zdM7?R=$NhxDqtNC2*T7N)IAld>nb!k5;0vV|IpRpfgnII`vO-Nxt<6kNQTuN%uO->
z?fqT@L5{L7pTxcx!0?z2%{k6vNe7xf7Yc34q{K;P<)%|#g@9|2I?y~xJPAgJmys$o{{!wf(LB^pGegu4H
z6!$D1tzK4c^~>=l91{D)f>ERnaa5O7ONo+InO5CO;=0iY0MB073~1`~%mtzE^>)=v
zt(~Vt*pqdmi78ZiW=_B$h9)0qrqnKFjCw#>03UQmtIdUDpXFT}&$P99pnPKhK<<1C
z3^Z`c^Ij<`fCu$}KEiCA-?2Wj
eNuK!y;U$e0}smy+c(1Cq-_H(M31Jf62v!QboGay|}kacN!g
z&a|u$c!4iIOJ2<#&l($}E)3cWfGzHBO`*@;jW#;^%hb{Et0Etd^vw4IZO#25XDI*0
zkG*D7!%o