diff --git a/docs/_diagrams/uml/dark/sch-iso-dark.uml b/docs/_diagrams/uml/dark/sch-iso-dark.uml new file mode 100644 index 000000000..df4220bb8 --- /dev/null +++ b/docs/_diagrams/uml/dark/sch-iso-dark.uml @@ -0,0 +1,3 @@ +@startuml +!include ../sch-iso.uml +@enduml diff --git a/docs/_diagrams/uml/sch-iso.uml b/docs/_diagrams/uml/sch-iso.uml new file mode 100644 index 000000000..30fb808c8 --- /dev/null +++ b/docs/_diagrams/uml/sch-iso.uml @@ -0,0 +1,29 @@ +@startuml + +skinparam backgroundColor transparent +skinparam linetype ortho + +skinparam node { + backgroundColor transparent + borderThickness 1 +} + +database "PostgreSQL" { + node public { + rectangle tables_public as "tables" + } + + node extensions as "**extensions**" { + } + + node API as "api" { + rectangle vf_api as "views + functions" + } + + tables_public <-- vf_api + extensions <-- vf_api +} + +vf_api <-[thickness=3]-> () PostgREST + +@enduml diff --git a/docs/_static/arch-dark.svg b/docs/_static/arch-dark.svg index 31c19df5e..f55c127c4 100644 --- a/docs/_static/arch-dark.svg +++ b/docs/_static/arch-dark.svg @@ -1 +1 @@ -PostgRESTPostgreSQLAuthorizationAPI schemaHTTPAuthApiRequestPlanQueryConnection PoolSchema CacheListenerHTTPAdminConfigCLITables, extensionsRoles, GRANT, RLSFunctions, ViewsuserProxyoperatordeveloperAuthenticates the user requestParses the URL syntaxGenerates the SQLLISTEN sessionusesreloads \ No newline at end of file +PostgRESTPostgreSQLAuthorizationAPI schemaHTTPAuthApiRequestPlanQueryConnection PoolSchema CacheListenerHTTPAdminConfigCLITables, extensionsRoles, GRANT, RLSFunctions, ViewsuserProxyoperatordeveloperAuthenticates the user requestParses the URL syntaxGenerates the SQLLISTEN sessionusesreloads \ No newline at end of file diff --git a/docs/_static/css/custom.css b/docs/_static/css/custom.css index 0839457dc..c71e0deb2 100644 --- a/docs/_static/css/custom.css +++ b/docs/_static/css/custom.css @@ -149,3 +149,7 @@ html[data-theme="dark"] .img-translucent img { transition: background-color 0.3s; margin-bottom: 24px; } + +.svg-container-md { + max-width: 400px; +} diff --git a/docs/_static/db.png b/docs/_static/db.png deleted file mode 100644 index 5b6d41edd..000000000 Binary files a/docs/_static/db.png and /dev/null differ diff --git a/docs/_static/sch-iso-dark.svg b/docs/_static/sch-iso-dark.svg new file mode 100644 index 000000000..bf6c8a0d5 --- /dev/null +++ b/docs/_static/sch-iso-dark.svg @@ -0,0 +1 @@ +PostgreSQLpublicapitablesextensionsviews + functionsPostgREST \ No newline at end of file diff --git a/docs/_static/sch-iso.svg b/docs/_static/sch-iso.svg new file mode 100644 index 000000000..0a54cba0f --- /dev/null +++ b/docs/_static/sch-iso.svg @@ -0,0 +1 @@ +PostgreSQLpublicapitablesextensionsviews + functionsPostgREST \ No newline at end of file diff --git a/docs/explanations/schema_isolation.rst b/docs/explanations/schema_isolation.rst index 6c8240108..a70f34e93 100644 --- a/docs/explanations/schema_isolation.rst +++ b/docs/explanations/schema_isolation.rst @@ -8,6 +8,18 @@ A PostgREST instance exposes all the tables, views, and functions of a single `P It is recommended that you don't expose tables on your API schema. Instead expose views and functions which insulate the internal details from the outside world. This allows you to change the internals of your schema and maintain backwards compatibility. It also keeps your code easier to refactor, and provides a natural way to do API versioning. -.. container:: img-translucent +.. container:: svg-container-md - .. image:: ../_static/db.png + .. container:: img-dark + + .. See https://github.com/sphinx-doc/sphinx/issues/2240#issuecomment-187366626 + + .. raw:: html + + + + .. container:: img-light + + .. raw:: html + +