- Comprehensive documentation for PostgreSQL extension{" "}
- {selectedPostgresItem.toLowerCase()} and their usage
- patterns.
-
- )}
-
-
- {/* Content based on selected postgres item */}
- {selectedPostgresItem === "Components" ? (
-
- {/* pg_documentdb_core Section */}
-
-
- pg_documentdb_core
-
-
- pg_documentdb_core is a PostgreSQL extension that
- introduces BSON datatype support and operations for native
- Postgres. This core component is essential for enabling
- document-oriented NoSQL capabilities within a PostgreSQL
- environment. It provides the foundational data structures
- and functions required to handle BSON data types, which
- are crucial for performing CRUD operations on documents.
-
-
-
- Key Features
-
-
-
- •
-
-
- BSON Datatype Support:
- {" "}
- Adds BSON (Binary JSON) datatype to PostgreSQL,
- allowing for efficient storage and manipulation of
- JSON-like documents.
-
-
- Extensibility:
- {" "}
- Serves as the core building block for additional
- functionalities and extensions within the DocumentDB
- ecosystem.
-
-
-
-
-
- {/* pg_documentdb_api Section */}
-
-
- pg_documentdb_api
-
-
- pg_documentdb_api is the public API surface for
- DocumentDB, providing CRUD functionality on documents
- stored in the database. This component leverages the
- capabilities of pg_documentdb_core to offer a
- comprehensive set of APIs for managing document data
- within PostgreSQL.
-
-
-
- Key Features
-
-
-
- •
-
-
- CRUD Operations:
- {" "}
- Provides a rich set of APIs for creating, reading,
- updating, and deleting documents.
-
-
- Integration:
- {" "}
- Works seamlessly with pg_documentdb_core to deliver
- robust document management capabilities.
-
-
-
-
-
- Usage
-
-
- To use pg_documentdb_api, you need to have
- pg_documentdb_core installed and configured in your
- PostgreSQL environment. Once set up, you can leverage the
- APIs provided by pg_documentdb_api to perform various
- document operations.
-
- The {selectedPostgresItem} section provides comprehensive
- information about PostgreSQL extension capabilities. These
- components are essential for building robust database
- applications with document storage features.
-
-
-
- Example usage:
-
-
- SELECT * FROM pg_extension WHERE extname = 'documentdb';
-
-
- {`docker pull ghcr.io/microsoft/documentdb/documentdb-local:latest
-docker tag ghcr.io/microsoft/documentdb/documentdb-local:latest documentdb
-docker run -dt -p 10260:10260 --name documentdb-container documentdb --username --password
-docker image rm -f ghcr.io/microsoft/documentdb/documentdb-local:latest || echo "No existing documentdb image to remove"`}
-
-
-
-
- Note: Replace{" "}
-
- <YOUR_USERNAME>
- {" "}
- and{" "}
-
- <YOUR_PASSWORD>
- {" "}
- with your desired credentials. You must set these
- when creating the container for authentication to
- work.
-
-
-
-
- Port Note: Port{" "}
-
- 10260
- {" "}
- is used by default in these instructions to avoid
- conflicts with other local database services. You
- can use port{" "}
-
- 27017
- {" "}
- (the standard MongoDB port) or any other available
- port if you prefer. If you do, be sure to update the
- port number in both your{" "}
-
- docker run
- {" "}
- command and your connection string accordingly.
-
-
-
-
-
-
- 2. Connecting to your database
-
-
-
- •
-
- Click the DocumentDB icon in the VS Code sidebar
-
-
-
- •
- Click "Add New Connection"
-
-
- •
-
- On the navigation bar, click on "Connection
- String"
-
-
- Get started with DocumentDB using the MongoDB shell for a
- familiar MongoDB-compatible experience.
-
-
-
- {/* Prerequisites */}
-
-
- Prerequisites
-
-
-
- •
- MongoDB Shell (mongosh) installed
-
-
- •
- Docker Desktop installed and running
-
-
- •
- Basic MongoDB knowledge
-
-
- •
- Git installed (for cloning the repository)
-
-
-
-
- {/* Installation */}
-
-
- Installation
-
-
-
-
-
- 1. Setting up DocumentDB locally
-
-
-
- {`# Pull the latest DocumentDB Docker image
-docker pull ghcr.io/microsoft/documentdb/documentdb-local:latest
-
-# Tag the image for convenience
-docker tag ghcr.io/microsoft/documentdb/documentdb-local:latest documentdb
-
-# Run the container with your chosen username and password
-docker run -dt -p 10260:10260 --name documentdb-container documentdb --username --password
-docker image rm -f ghcr.io/microsoft/documentdb/documentdb-local:latest || echo "No existing documentdb image to remove"`}
-
-
-
-
- Note: Replace{" "}
-
- <YOUR_USERNAME>
- {" "}
- and{" "}
-
- <YOUR_PASSWORD>
- {" "}
- with your desired credentials. You must set these
- when creating the container for authentication to
- work.
-
-
-
-
- Port Note: Port{" "}
-
- 10260
- {" "}
- is used by default in these instructions to avoid
- conflicts with other local database services. You
- can use port{" "}
-
- 27017
- {" "}
- (the standard MongoDB port) or any other available
- port if you prefer. If you do, be sure to update the
- port number in both your{" "}
-
- docker run
- {" "}
- command and your connection string accordingly.
-
-
-
-
-
-
- 2. Starting the server
-
-
-
- {`# The server will be available at localhost:10260 (or your chosen port)
-# You can verify the server is running using:
-docker ps`}
-
- {`# Pull the latest DocumentDB Docker image
-docker pull ghcr.io/microsoft/documentdb/documentdb-local:latest
-
-# Tag the image for convenience
-docker tag ghcr.io/microsoft/documentdb/documentdb-local:latest documentdb
-
-# Run the container with your chosen username and password
-docker run -dt -p 10260:10260 --name documentdb-container documentdb --username --password
-docker image rm -f ghcr.io/microsoft/documentdb/documentdb-local:latest || echo "No existing documentdb image to remove"`}
-
-
-
-
-
- Note: During the transition to the Linux Foundation, Docker images may still be hosted on Microsoft's container registry. These will be migrated to the new DocumentDB organization as the transition completes.
-
-
-
-
-
- Note: Replace{" "}
-
- <YOUR_USERNAME>
- {" "}
- and{" "}
-
- <YOUR_PASSWORD>
- {" "}
- with your desired credentials. You must set these when creating the container for authentication to work.
-
-
-
-
-
- Port Note: Port{" "}
-
- 10260
- {" "}
- is used by default in these instructions to avoid conflicts with other local database services. You can use port{" "}
-
- 27017
- {" "}
- (the standard MongoDB port) or any other available port if you prefer. If you do, be sure to update the port number in both your{" "}
-
- docker run
- {" "}
- command and your connection string accordingly.
-
- ) : (
- /* Sample content for other operators */
-
-
-
- Overview
-
-
- The {selectedOperator} category provides powerful
- operators for document manipulation and querying. These
- operators are essential for building complex database
- operations and data transformations.
-