Some code logo
Some code
HistoryCommunityDocumentationContact Us

Creating Connections

The Connection defines list values the credential must have

For example

Database connection

  1. host name
  2. port
  3. database name
  4. user name
  5. password

Database credential

  1. host name = some-code
  2. port = 1534
  3. database name = sales
  4. user name = john
  5. password = fjwlfmw1

List of connection properties is user definable

Connections List

Connections

This dialog allows to create new credentials or download credentials the from public library

Download Connection

Download Connection

Creating New Connection

To create new connection click Add Connection, fill in all necessary fields and press Save button

Metadata Tab

Metadata Tab

Properties Tab

Properties Tab

Property types

Property Type

Validation Script Tab

Validation Script Tab

Validation Script Example

const typeorm = require("typeorm");
var result = { status: SUCCESS, message: "Success" };
try {
  // Documentation
  // https://typeorm.io/

  const connection = {
    name: "test",
    type: connectionParameters.type,
    host: connectionParameters.host,
    port: Number(connectionParameters.port),
    username: connectionParameters.username,
    password: connectionParameters.password,
    database: connectionParameters.database,
    options: {
      instanceName: connectionParameters.instanceName,
      encrypt: false,
    },
  };

  const dataSource = new typeorm.DataSource(connection);

  // Testing connection
  await dataSource.initialize();

  await dataSource.destroy();
} catch (e) {
  result.status = ERROR;
  result.message = e.message;
}

return result;

Publish Connection

This dialogue publishes connection to the public library so it can be used by all users of Some code

Publish Connection

19 July 2023

Back

Creating Actions

Download Some code

Linux 64 bit deb server Windows 64 Bit server Windows 64 Bit Desktop Windows 64 Bit Portable

Some code works on both Windows and Linux. Please contact us if you want to run Some code on a different OS. We will create a special build for you.