• PRODUCT

    PRODUCT

  • PRICING
    PRICING

  • HELP
    HELP

  • BLOG
    BLOG

  • APPSTORE
    APPSTORE

  • COMPANY
    COMPANY

  • LEGAL
    LEGAL

  • LOGIN
    LOGIN

  • Workflow Automation

    Workflow Automation

  • AI Assisted Content Management System
    AI Assisted Content Management System

  • Analytics & Lead Generation
    Analytics & Lead Generation

  • Automation Projects
    Automation Projects

  • Browser Extension Apps
    Browser Extension Apps

  • Dashboard Theme Analysis: LN1
    Dashboard Theme Analysis: LN1

  • Data Exchange Automation Tools
    Data Exchange Automation Tools

  • Getting Started With Building Hybrid Apps
    Getting Started With Building Hybrid Apps

  • Izyware Hybrid UX Design Guidelines
    Izyware Hybrid UX Design Guidelines

  • Onboarding New Organizations Using Izyware
    Onboarding New Organizations Using Izyware

  • Quick Visualization and Monitoring
    Quick Visualization and Monitoring

  • Unified Metrics Stream Pipeline
    Unified Metrics Stream Pipeline

  • Legacy Features and Backward Compatibility
    Legacy Features and Backward Compatibility

  • How does the legacy frame architecture work
    How does the legacy frame architecture work

  • Izyware Legacy UI Circus Engine
    Izyware Legacy UI Circus Engine

  • Case Studies and Knowledge Center
    Case Studies and Knowledge Center

  • Angular and React Embedding Guide
    Angular and React Embedding Guide

  • Build and deploy a content distribution app in less than five minutes: Part II
    Build and deploy a content distribution app in less than five minutes: Part II

  • Comparison of CSS Preprocessors SASS vs LESS vs STYLUS
    Comparison of CSS Preprocessors SASS vs LESS vs STYLUS

  • Comparison of node.js test frameworks and utilities: lab, chai, sinon
    Comparison of node.js test frameworks and utilities: lab, chai, sinon

  • Manage and automate your day to day business tools using IzyCloud Tasks: Part I
    Manage and automate your day to day business tools using IzyCloud Tasks: Part I

  • MySql Performance Optimization
    MySql Performance Optimization

  • Onboarding Tutorial: Creating & publishing an app
    Onboarding Tutorial: Creating & publishing an app

  • Rebranding and Customizing Websites
    Rebranding and Customizing Websites

  • Using IzyCloud on Android: IzyCloud Query App
    Using IzyCloud on Android: IzyCloud Query App

  • Technical Resources
    Technical Resources

  • .NET SDKCore IzyWare
    .NET SDKCore IzyWare

  • av-stream README
    av-stream README

  • ElasticSearch IzyWare Data Console Feature
    ElasticSearch IzyWare Data Console Feature

  • End To End Testing
    End To End Testing

  • End To End Testing, Part II
    End To End Testing, Part II

  • frames and nav (ui/w/shell/navmulti) README
    frames and nav (ui/w/shell/navmulti) README

  • izy-circus README
    izy-circus README

  • izy-idman-tools README
    izy-idman-tools README

  • izy-pop3 README
    izy-pop3 README

  • izy-proxy README
    izy-proxy README

  • izy-sync README
    izy-sync README

  • IzyIDE README
    IzyIDE README

  • izymodtask readme
    izymodtask readme

  • IzyShell readme
    IzyShell readme

  • ReKey Feature Package README for IzyWare SQL Console
    ReKey Feature Package README for IzyWare SQL Console

  • Single Sign-On (SSO) README
    Single Sign-On (SSO) README

  • Tasks Migration : V5 guidelines
    Tasks Migration : V5 guidelines

  • Users & Groups README
    Users & Groups README

  • V5 Migration : apps/pulse guidelines README
    V5 Migration : apps/pulse guidelines README

  • Container Orchestration
    Container Orchestration

  • Izy Kubernetes Internal Networking Troubleshooting
    Izy Kubernetes Internal Networking Troubleshooting

  • Application Hosting
    Application Hosting

  • Content Publisher
    Content Publisher

  • Domain Registration
    Domain Registration

  • Email Hosting
    Email Hosting

  • Izyware Browser Extension
    Izyware Browser Extension

  • Izyware Deployment Engine
    Izyware Deployment Engine

  • Izyware Session Management
    Izyware Session Management

  • Messaging System APIs and functionality
    Messaging System APIs and functionality

  • Single SignOn
    Single SignOn

  • Integration APIs
    Integration APIs

  • iOS SDK
    iOS SDK

  • Azure and .NET
    Azure and .NET

  • izy-devops
    izy-devops

  • << IzyShell readme
    << IzyShell readme

  • Single Sign-On (SSO) README >>
    Single Sign-On (SSO) README >>

  • ReKey Feature Package README for IzyWare SQL Console

  • IzyWare SQL Console ReKey Feature Package README. This package is the main SQL service consumption layer for Izyware apps. It is written in JavaScript, does not require compiling.

  • Izy SQL-Console Connector

    This package is the main SQL service consumption layer for Izyware apps. It is written in JavaScript, does not require compiling.

    Features

    • Use the rekey command to reassign the primry key values for rows within a particular table in your relational database. The mapping for newIds and oldIds must be defined in batchTrackingTable. The workflow consists of:

    * for each row, create a record in batchTrackingTable with (originalId, newId, tbl) triplet set to the desired values

    * run the rekey command

    * The feature automatically builds the dependency graph for Primary and Foreign keys in the database and will update all the neccessary records automaticaly.

    • Record the timestamp for when the changes to rekeying are made: This will allow tracability and rollback
    • supports stringified cross platform command pattern chains to simplify components that need to delegate, sequence or execute database interactions in hetergenous cloud environment. In addition, this allows bookkeeping and auditing to be conveniently performed transparently.
    • escapes and cleans up parameters. This will protect your components against SQL injection attacks.

    Establishing connections

    The library is compatible with standard mysql node configuration files, i.e.:

    const sqlLib = require('izyware-sqlconsole-rekey').basePath;

    const proxyLib = require('izy-proxy').basePath;

    ['chain.importProcessor', ${sqlLib}/chain, {

    verbose: {

    logConnectionAttempt: false,

    logQuery: false

    }

    }],

    [//inline/${proxyLib}/json?loadById, { id:

    {

    "host":"example.org"

    }

    }],

    chain => chain(['sql.connect', chain.get('outcome').data]),

    ['sql.query', 'select 1']

    You can consult the nodejs mysql library for detailed options regarding connection pooling, clustering and SSL management. In addition to all the standard options the library supports custom adapters fot SOCKS5.

    [//inline/${proxyLib}/json?loadById, { id:

    {

    "adapterservice":"//service/rel:adapter/socks5"

    }

    }]

    For embedded applications that require unusual networking environments, you may customize the adapter. Refer to the knowledge center on Izyware website for more details and white papers on this topic.

    Commands Syntax

    • getUpdate
    • getInsert

    ['sql.getInsert', {

    table: 'table1',

    map: [

    { field1: 'value1', ... }

    ]

    ]

    • getInsertSelect
    • select

    ['sql.select', {

    verbose: {

    logQuery: false

    },

    map: {

    jsonField1: 'table1.field1',

    owners: 'NOQUOTEGROUPCONCAT(DISTINCT CONCAT(accesscontrol.ownerType , "", accesscontrol.ownerId) SEPARATOR "sep")'

    },

    // // useful for parsing joined groups, i.e owners above

    deserializeGroupConcats: ['owners'],

    from: 'FROM table1 left join table2 ....',

    condition: 'WHERE id = 1 limit 1 group by name'

    }]

    • query (if chain verbose.logQuery is set it will log)

    / returns JSON records /

    ['sql.query', 'string'],

    / returns Array records /

    ['sql.query', { queryStr: 'select 1', recordFormat: 'array' }]

    CLI Schema

    For command line access use:

    npm run query queryObject.dbConfigId xxxx-xxxx queryObject.sqlStr "SELECT 1"

    npm run rekey queryObject.dbConfigId xxxx-xxxx queryObject.batchTrackingTable batchTrackingTableizywaresqldashboard_rekey queryObject.limit 20000 queryObject.batchSize 20 queryObject.schema dbname queryObject.tbl tablename queryObject.commit false

    Test

    npm run test

    Known Issues

    • import replaceQuestionmarksInSqlStringWithParams to add support for ? characters as placeholders for values you would like to have escaped.
    • implement chain handlers for
    * escapeRegexpCharsForSingleQoutedRegExpSearch

    * encodeStringToSQLStrSingleQuoted

    Notes

    • make sure that NOBACKSLASHESCAPES mode is disabled (this is the default state for MySQL servers).

    External Resources

    • github
    • npmjs

    Changelog

    V1

    • 5300034: fall back to chain handler last session when current chain does not have one.

    * this will allow sharing a session across different chain within the current execusion context

    * without this feature, all '//inline/' calls would have to explcitily pass in the sql session.
    • 5300033: add command line test interface
    • 5300032: seperate the mysql adapter from the chain processor

    * enables merging this with frame_getnode and replacing the legacy interface

    * essential for mixed embedded app development
    • convert JSON null and undefined values to SQL NULL
    • refactor code and remove dead code. Add more documentation.
    • support sql.select
    • support dynamic query generation for sql.getInsert.
    • add index.js and expose basePath
    * cleaner syntax for referencing in chains by require
    • add support for live JSON object config
    * enables direct launch from Proxy Projects
    • improve formatting for output
    • add query command
    • changed lookupConfigFromFile to loadConfigJSONFromID

    github: https://github.com/izyware/apps-sqlconsole-rekey

    npmjs: https://www.npmjs.com/package/izyware-sqlconsole-rekey