Using DB Query

The Automation Studio provides templates that can be used in various use cases. Template provides Flow examples for each situation, so you can create Flows faster and easier.

The 'Web : TODO app backend' and 'Web : TODO app frontend' template provides a example that using AWS SDK. Through this tutorial, you can learn ...

  • How to use a 'DB Config' node.
  • How to use a 'DB Query' node.
  • How to use a 'Basic Auth' node.
  • How to build a micro-service with Samsung Automation Studio.

DB Config

When DB Query nodes are invoked, DB Config node is required.

Properties

  • Name: You can tag or describe this db-config.
  • DB Type: Choose your database type.
  • DB Host: Insert your database IP or domain.
  • DB Port: Insert your database port. Samsung Automation Studio support only MySQL(3306), MariaDB(3306) and PostgreSQL(5432)
  • DB Name: Insert your database name that you can connect.
  • User ID: Insert your database user id.
  • User Password: Insert your database password.

DB Query

You can extend this flow by connecting it to your Database using the Database Query node.

Properties

  • Name: You can tag or describe this aws-config.
  • DB Config: Choose a DB Config Node.
  • SQL: Insert standard query language to execute on your database.

Basic Auth

this node providing basic access authentication for the Http request node.

Properties

  • Realm: the client-visible realm for authentication.
  • Username: the configured username for authentication.
  • Password: the configured password for authentication.

Web : TODO App frontend

You can create a simple web page. This flow implements a simple TODO app that calls the "TODO App backend" template.

Web : TODO app backend

You can develop microservice using RDBMS. This flow is a CRUD sample for developing backend api of TODO app. body

{ "id": string, "todo": string, "checked": string, "created": datetime, "updated": datetime }

Restful API

  • Initialize : Table creation.
  • GET https://your-app.devground.io/todos
  • GET https://your-app.devground.io/todos/:id
  • POST https://your-app.devground.io/todos
  • PUT https://your-app.devground.io/todos/:id
  • DELETE https://your-app.devground.io/todos/:id

DB Query

  1. Choose a DB Config.
  2. Write your SQL with the mustache template.