postgres

command
v0.0.0-...-0f4f8fd Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 11, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

README

Postgres INSERT/SELECT Function Image

This function executes an INSERT or SELECT against a table in a given postgres server.

# Create your func.yaml file
fn init <YOUR_DOCKERHUB_USERNAME>/func-postgres
# Build the function
fn build
# Test it
./test.sh
# Push it to Docker Hub
fn push
# Create routes to this function on IronFunctions
fn apps create <YOUR_APP> --config SERVER=<POSTGRES>
fn routes create --config TABLE=<TABLE_NAME> --config COMMAND=INSERT <YOUR_APP> /<TABLE_NAME>/insert
fn routes create --config TABLE=<TABLE_NAME> --config COMMAND=SELECT <YOUR_APP> /<TABLE_NAME>/select

Now you can call your function on IronFunctions:

echo <JSON_RECORD> | fn call /<YOUR_APP>/<TABLE_NAME>/insert
echo <JSON_QUERY> | fn call /<YOUR_APP>/<TABLE_NAME>/select

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL