Skip to content

A PostgreSQL Foreign Data Wrapper for Cloudsmith

Notifications You must be signed in to change notification settings

richyen/cloudsmith_fdw

 
 

Repository files navigation

cloudsmith_fdw

A PostgreSQL Foreign Data Wrapper for cloudsmith

INSTALL

## Install multicorn in accordance with docs before perfoming the below:
git clone https://github.com/richyen/cloudsmith_fdw
cd cloudsmith_fdw
sudo python3 setup.py install

USE

CREATE EXTENSION multicorn;
CREATE SCHEMA cloudsmith;

CREATE SERVER cloudsmith_fdw
FOREIGN DATA WRAPPER multicorn
options (
  wrapper 'cloudsmith_fdw.CloudsmithPackageFDW'
);


CREATE FOREIGN TABLE cloudsmith.packages (
        self_url TEXT,
        stage TEXT,
        status TEXT,
        sync_progress TEXT,
        downloads TEXT,
        extension TEXT,
        filename TEXT,
        "size" TEXT,
        repository TEXT,
        summary TEXT,
        version TEXT
) server cloudsmith_fdw options (
   key 'your_secret_api_key'
);

SELECT * FROM cloudsmith.packages;

About

A PostgreSQL Foreign Data Wrapper for Cloudsmith

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 53.3%
  • Dockerfile 34.3%
  • Shell 12.4%