npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@akeraio/api

v1.1.14

Published

Akera.io application programming interface (API)

Readme

Akera Logo

Application Programming Library for Akera.io application server.

Installation

$ npm install @akera/api

Docs

Quick Start

All asynchronous functions in Akera API returns a promise, those can be chained one to another if needed.

Connect to an akera.io application server:

import * as akera from '@akera/api';

akera.connect('localhost', 8900).then(async (conn) => {
  // list information about the connected databases
  for (let db of await conn.catalog.getDatabases()) {
      console.log('database', db.name, db.lname, db.version);
  }

  return conn.disconnect();
});

The API allows one to access Progress application business logic by using the 'call' interface from connection object. This have two separate parts, a static one that serves as a builder using the fluent syntax and second that executes the statement built.

Run an external procedure:

let ret = await conn.run(
      BusinessLogic.procedure('demo/api/tellError.p')
          .input(1024)
          .output(DataType.CHARACTER)
          .output(DataType.LONGCHAR)
          .build(), 2000);

console.log(ret.parameters[0], ret.parameters[1]);

Run an internal function defined inside a procedure library:

let ret = await conn.run(
      BusinessLogic.internal_function('demo/test/call-test-ip.p', 'testFunc', DataType.DATE)
          .input(1024)
          .inout(DataType.CHARACTER, 'hello')
          .build(), 2000);

console.log(ret.parameters[0], ret.return);

Basic CRUD database access is available using the ‘query' interface from connection object. Same as for the call interface this also have two separate parts, a static one that serves as a builder using the fluent syntax and second that executes the statement built.

The following functionality is available through the query interface:

  • select records: multiple tables, joins, filter, sorting, paging
  • open query, same as select but the query allows sequential record access: next, previous, first, last, reposition
  • find: one table, unique/first/last
  • insert/upsert: returns rows data or number of affected rows
  • update: one or more tables, returns rows data or number of affected rows
  • delete: one or more tables in query, delete only from first buffer

Select five customer's records with balance lower than 1000 starting from 3'rd record from Sports2000 database.

  let rows = await connection.query.select('customer', { Balance: {lt: 1000} })
                  .fields('Name', 'CustNum', 'Balance')
                  .setOffset(3)
                  .setLimit(5).all();

  for (let row of rows) {
    // row contains only customer data
    console.log(row['Name'], row['Balance']);
  }

Select Alaska customer's orders not shipped, note that when data is selected from multiple tables fields from each table is grouped inside the result object using the table name.

  let rows = await connection.query.select('customer', {State: 'AK'})
      .join('order', 'customer', SelectionMode.EACH).on('custnum')
      .filter({or: [{OrderStatus: 'ordered'}, {OrderStatus: 'back ordered'}]}).all();

  for (let row of rows) {
    // row contains both customer and order data
    console.log(row['customer']['Name'], row['order']['OrderDate']);
  }

Find the first back order.

  let order = await connection.catalog.getTable('order');
  try {
    let border = await refcall.find({OrderStatus: 'back ordered'}, FindMode.FIRST);
  
    console.log('First back order record: ' + callbuf.record);
  } catch (err) {
    console.log('No back order record found.');
  }

Create a new customer call record.

  let refcall = await connection.catalog.getTable('refcall');
  let newcall = await refcall.create({CustNum: 666,
                                      SalesRep: 'akera', 
                                      Txt: 'hello world'});
  
  console.log('New record: ' + newcall.record);

Update all call records where customer number is less than 100.

  let refcall = await connection.catalog.getTable('refcall');
  let affected = await refcall.update({SalesRep: 'akera', Txt: 'hello world'}, //values
                                      {CustNum: {lt: 100}} // filter clause
                                      );
    
  console.log('Number of records updated: ' + affected);

Delete all call records for the customer with number 100.

  let refcall = await connection.catalog.getTable('refcall');
  let affected = await refcall.delete({CustNum: 100});
    
  console.log('Number of records deleted: ' + affected);

License

Copyright (c) 2015-2018 ACORN IT, Romania - All rights reserved

This Software is protected by copyright law and international treaties. This Software is licensed (not sold), 
and its use is subject to a valid WRITTEN AND SIGNED License Agreement. The unauthorized use, copying or 
distribution of this Software may result in severe criminal or civil penalties, and will be prosecuted to the 
maximum extent allowed by law.