このコンテンツは選択した言語では利用できません。

Chapter 8. Node.js Integration


Node.js is an open source event driven runtime that can be integrated with Data Virtualization.

8.1. Prerequisites

  • Have Node.js installed. The npm pagckage pg is also required. Use "
  • Your Data Virtualization installation should already be setup for ODBC access. This allows the optional compatibility with Node.js for PostGIS/PostgreSQL to be used.

8.2. Usage

For example if you have VDB called "northwind" deployed on your Data Virtualization server, and it has table called "customers" and you are using default configuration such as

user = 'user' password = 'user' host = 127.0.0.1 port = 35432

Simple Access Example

    const { Client } = require('pg')
    const client = new Client({
        user: 'user',
        host: 'localhost',
        database: 'northwind',
        password: 'secretpassword',
        port: 35432,
    })
    client.connect()

    client.query('SELECT CustomerID, ContactName, ContactTitle FROM Customers', (err, res) => {
        console.log(err, res)
        client.end()
    })
Copy to Clipboard

Note

you do not have to programmatically specify the connection information in the code as it can be obtained from environment variables and other mechanisms - see https://node-postgres.com

For more information please refer to: https://npmjs.org/package/pg

トップに戻る
Red Hat logoGithubredditYoutubeTwitter

詳細情報

試用、購入および販売

コミュニティー

Red Hat ドキュメントについて

Red Hat をお使いのお客様が、信頼できるコンテンツが含まれている製品やサービスを活用することで、イノベーションを行い、目標を達成できるようにします。 最新の更新を見る.

多様性を受け入れるオープンソースの強化

Red Hat では、コード、ドキュメント、Web プロパティーにおける配慮に欠ける用語の置き換えに取り組んでいます。このような変更は、段階的に実施される予定です。詳細情報: Red Hat ブログ.

会社概要

Red Hat は、企業がコアとなるデータセンターからネットワークエッジに至るまで、各種プラットフォームや環境全体で作業を簡素化できるように、強化されたソリューションを提供しています。

Theme

© 2025 Red Hat