NPM module - izara-shared: Difference between revisions

From Izara Wiki
Jump to navigation Jump to search
Line 46: Line 46:
/**
/**
  * Creates vertexId from vertexTag and unique id
  * Creates vertexId from vertexTag and unique id
  * @param {string} vertexTag
  * @param {string} vertexTag - is the type of object
  * @param {string} uniqueId
  * @param {string} uniqueId
  *
  *
Line 52: Line 52:
  */
  */
</syntaxhighlight>
</syntaxhighlight>
# Concatenate vertexTag + "_" + uniqueId
== neptuneGraphSharedLib.getVerticesByLabel ==
<syntaxhighlight lang="JavaScript">
/**
* Returns all vertices that match the vertex label for the given graph
* @param {string} graphServiceName
* @param {string} vertexLabel
*
* @returns {string} vertexId
*/
</syntaxhighlight>
# ..

Revision as of 03:18, 1 March 2021

Overview

Shared libraries

Repository

https://bitbucket.org/stb_working/izara-shared/src/master/

dynamodbSharedLib

Helper functions for interacting with DynamoDB resources.

dynamodbSharedLib.createStringSet

/**
 * Creates a string set element for use with documentClient
 * @param {string[]} stringSet
 *
 * @returns {string} String formatted as a string set for Dynamo
 */

configSharedLib

Helper functions for Config tables.

configSharedLib.getConfigValue

/**
 * @param {string} configTag
 * @param {string} configKey
 *
 * @returns {Object} returns the configValue for a single config record, or null if none found
 */

neptuneGraphSharedLib

Helper functions for interacting with Neptune graph databases from any service.

neptuneGraphSharedLib.createVertexId

/**
 * Creates vertexId from vertexTag and unique id
 * @param {string} vertexTag - is the type of object
 * @param {string} uniqueId
 *
 * @returns {string} vertexId
 */
  1. Concatenate vertexTag + "_" + uniqueId

neptuneGraphSharedLib.getVerticesByLabel

/**
 * Returns all vertices that match the vertex label for the given graph
 * @param {string} graphServiceName
 * @param {string} vertexLabel
 *
 * @returns {string} vertexId
 */
  1. ..