About DBMS_CLOUD_REPO

The DBMS_CLOUD_REPO package provides easy access to files in Cloud Code (Git) Repositories, including: GitHub, AWS CodeCommit, and Azure Repos.

This package is a single interface for access to Multicloud Code repositories and allows you to upload SQL files to Git repositories or install SQL scripts directly from Cloud Code Repositories. This package also allows you to use a Cloud Code Repository to manage code versions for SQL scripts and to install or patch application code from Git repositories.

Concepts

Architecture

DBMS_CLOUD_REPO package provides four feature areas:

DBMS_CLOUD_REPO Data Structures

The DBMS_CLOUD_REPO package defines record types and a generic JSON object type repo.

REPO JSON Object

A DBMS_CLOUD_REPO REPO is an opaque JSON object to represent a Cloud Code Repository of a specific cloud provider. A REPO object can be passed to different DBMS_CLOUD_REPO APIs. This opaque object ensures that DBMS_CLOUD_REPO procedures and functions are multicloud compatible; you do not have to change any code when you migrate from one Cloud Code Repository provider to another Cloud Code Repository.

DBMS_CLOUD_REPO Initialization Operations

Lists the subprograms for initialization operations within the DBMS_CLOUD_REPO package.

Subprogram Description
INIT_AWS_REPO Function This function initializes an AWS repository handle and returns an opaque type.
INIT_AZURE_REPO Function This function initializes an Azure repository handle and returns an opaque type.
INIT_GITHUB_REPO Function This function initializes a GitHub repository handle and returns an opaque type.
INIT_REPO Function This function initializes a Cloud Code Repository handle and returns an opaque JSON object.

DBMS_CLOUD_REPO Repository Management Operations

Shows the subprograms for repository management operations within the DBMS_CLOUD_REPO package.

Subprogram Description
CREATE_REPOSITORY Procedure This procedure creates a Cloud Code Repository identified by the repo handle argument.
DELETE_REPOSITORY Procedure This procedure deletes the Cloud Code Repository identified by the repo handle argument.
LIST_REPOSITORIES Function This function lists all the Cloud Code Repositories identified by the repo handle argument.
UPDATE_REPOSITORY Procedure This procedure updates a Cloud Code repository identified by the repo handle argument. The procedure supports updating the name, description, or private visibility status, as supported by the Cloud Code repository.

DBMS_CLOUD_REPO Repository Branch Management Operations

Lists the subprograms for repository branch management operations within the DBMS_CLOUD_REPO package.

Subprogram Description
CREATE_BRANCH Procedure This procedure creates a branch in a Cloud Code Repository identified by the repo handle argument.
DELETE_BRANCH Procedure This procedure deletes a branch in a Cloud Code Repository identified by the repo handle argument.
LIST_BRANCHES Function This function lists all the Cloud Code Repository branches identified by the repo handle argument.
LIST_COMMITS Function This function lists all the commits in a Cloud Code Repository branch identified by the repo handle argument.
MERGE_BRANCH Procedure This procedure merges a Cloud Code Repository branch into another specified branch in a Cloud Code Repository identified by the repo handle argument.

DBMS_CLOUD_REPO File Operations

Lists the subprograms for file operations within the DBMS_CLOUD_REPO package.

Subprogram Description
DELETE_FILE Procedure This procedure deletes a file from the Cloud Code repository identified by the repo handle argument.
GET_FILE Procedure and Function The function downloads the contents of a file from the Cloud Code repository. The procedure allows you to download the contents of a file from the Cloud Code repository and save the file in a directory.
LIST_FILES Function This function downloads a file from Cloud Code repository. Optionally, file content can be accessed from either a specific branch, tag or commit name. By default, the file is accessed from the default repository branch.
PUT_FILE Procedure This procedure uploads a file to the Cloud Code repository identified by the repo handle argument. The procedure is overloaded to support either uploading a file from a directory object or uploading the contents from a CLOB to the repository file.

DBMS_CLOUD_REPO SQL Install Operations

Lists the subprograms for SQL install operations within the DBMS_CLOUD_REPO package.

Subprogram Description
EXPORT_OBJECT Procedure This procedure uploads the DDL metadata of a database object to the Cloud Code repository identified by the repo handle argument.
EXPORT_SCHEMA Procedure This procedure exports metadata of all objects in a schema to a Cloud Code Repository branch identified by the repo handle argument.
INSTALL_FILE Procedure This procedure installs SQL statements from a file in the Cloud Code repository identified by the repo handle argument.
INSTALL_SQL Procedure This procedure installs SQL statements from a buffer given as input.

Related Content