Category: Db2

Recently starting the IBM i BASH Tools repository has prompted me to think of some scripts that would be useful. One that I have wanted for quite awhile is a Command Line Interface (CLI) for DB2 on the IBM i. Calling DB2 from Command Line Calling DB2 from the command line is done in the…

Apigility Setup This example assumes a setup similar to the one described in Installing and Using Apigility on IBM i. The example repository can be found on github. Create New RPC Create a new RPC through the Apigility Admin Interface like normal. This will generate a Factory and Controller for the RPC service. Once that…

loopback-connector-db2ibmi is still pre-pre-alpha. Use with caution. Installing LoopBack This uses loopback-cli in order to create a LoopBack Project. That is thelb command seen below. A list ofloopback-cli commands can be found here. The commands above in order are simply: $ lb # Follow configuration instructions. Above I choose default for each. $ npm install…

Setting Up Apigility This guide will be using the same project setup during my Apigility Entity & Mapper Tips article. The related github repo has been updated with the new source in this article. Create a Filters Class I found the best way to stay organized was to create a type of Helper Class called <ServiceName>Filters….

Create a Simple Schema and Table To get us started, we’ll need a source of data for our service. I’m going to use IBM i DB2 for this example, since that is primarily what I work on. Below is SQL to define a simple table and populate it with some data. CREATE SCHEMA APIGILITY ;…

The Problem Ideally, application development is separated into three environments: local (development), staging, and production. Staging and production would reside on the IBM i, while local is specific to each developer and would reside on the developer’s local development machine. In a perfect world, the developer would have a mock of the database on their…

Install Apigility I find the easiest way to accomplish this on the IBM i is to use PHP itself on command line: $ php -r “readfile(‘https://apigility.org/install’);” | php After this is ran, Apigility will try to serve itself up. While it is successful in doing so, I have not been able to visit Apigility without…