Home Applications gateway-sql

gateway-sql

This application is not supported by InterSystems Corporation. Please be notified that you use it at your own risk.
5
1 reviews
0
Awards
307
Views
14
IPM installs
0
0
Details
Releases
Reviews
Issues
Pull requests
Articles
This app has a demo View
Installing jdbс drivers for oracle, mssql and mysql

What's new in this version

upd version

Repo-GitHub

OEX-zapm

Docker-ports

Quality Gate Status

Demo

What’s new

Added web UI for selective item import

http://localhost:52553/csp/sys/appmsw.core.uiInfo.cls

gateway-sql

This project has several jdbc drivers and a program that copies them to your IRIS instance while creating settings in the SQLConection class in an interactive dialog with the ability to change properties.

Driver List: ojdbc6.jar, sqljdbc42.jar, mysql-connector-java-8.0.21.jar, postgresql-42.3.1.jar.

The project will be useful for those who need to transfer many settings from one system to another, when the other already has settings and cannot be transferred with the full global ^%SYS(“sql”,“ODBCCONNECTION”,“DATA”).

Installation with ZPM

If ZPM the current instance is not installed, then in one line you can install the latest version of ZPM.

set $namespace="%SYS", name="DefaultSSL" do:'##class(Security.SSLConfigs).Exists(name) ##class(Security.SSLConfigs).Create(name) set url="https://pm.community.intersystems.com/packages/zpm/latest/installer" Do ##class(%Net.URLParser).Parse(url,.comp) set ht = ##class(%Net.HttpRequest).%New(), ht.Server = comp("host"), ht.Port = 443, ht.Https=1, ht.SSLConfiguration=name, st=ht.Get(comp("path")) quit:'st $System.Status.GetErrorText(st) set xml=##class(%File).TempFilename("xml"), tFile = ##class(%Stream.FileBinary).%New(), tFile.Filename = xml do tFile.CopyFromAndSave(ht.HttpResponse.Data) do ht.%Close(), $system.OBJ.Load(xml,"ck") do ##class(%File).Delete(xml)

If ZPM is installed, then gateway-sql can be set with the command

zpm:%SYS>install appmsw-gateway-sql

Installation with Docker

Prerequisites

Make sure you have git and Docker desktop installed.

Installation

Clone/git pull the repo into any local directory

$ git clone https://github.com/SergeyMi37/gateway-sql

Open the terminal in this directory and run:

$ docker-compose build
  1. Run the IRIS container with your project:
$ docker-compose up -d

$ docker-compose exec iris iris session iris

How to Test it

You can see what instances of the %Library.SQLConnection class are in the module by running a command in the %SYS namespace:


%SYS>do ##class(appmsw.gateway.jdbc).ImportSQLConnection("view")

%Library.SQLConnection. DSN = type:string
%Library.SQLConnection. Name = Default_Name_SQLConnection type:string
%Library.SQLConnection. OnConnectStatement = type:string
%Library.SQLConnection. ReverseOJ = 0 type:number
%Library.SQLConnection. URL = jdbc:mysql://ip address:port/databaseName?serverTimezone=UTC type:string
%Library.SQLConnection. Usr = Default_DB_UserName type:string
%Library.SQLConnection. bUnicodeStream = 0 type:number
%Library.SQLConnection. bindTSasString = 0 type:number
%Library.SQLConnection. classpath = /opt/oracle/mysql-connector-java-8.0.21.jar type:string
%Library.SQLConnection. driver = type:string
%Library.SQLConnection. isJDBC = type:string
%Library.SQLConnection. needlongdatalen = type:string
%Library.SQLConnection. noconcat = type:string
%Library.SQLConnection. nodefq = type:string
%Library.SQLConnection. nofnconv = type:string
%Library.SQLConnection. nvl = type:string
%Library.SQLConnection. properties = type:string
%Library.SQLConnection. pwd = type:string
%Library.SQLConnection. useCAST = type:string
%Library.SQLConnection. useCASTCHAR = type:string
%Library.SQLConnection. useCOALESCE = 1 type:number
%Library.SQLConnection. xadriver = type:string
...

You can import a class %Library.SQLConnection instance in the %SYS namespace with the command:

%SYS>do ##class(appmsw.gateway.jdbc).ImportSQLConnection()

Change the value of a field 'Name' <Default_Name_SQLConnection> test2
Change the value of a field 'URL' <jdbc:mysql://ip address:port/databaseName?serverTimezone=UTC>
Change the value of a field 'Usr' <Default_DB_UserName>
Change the value of a field 'classpath' </opt/oracle/mysql-connector-java-8.0.21.jar> /opt/irisbuild/mysql-connector-java-8.0.21.jar
Copied from /usr/irissys/lib/jdbc/mysql-connector-java-8.0.21.jar to /opt/irisbuild/mysql-connector-java-8.0.21.jar
Change the value of a field 'driver' <>
The password will need to be entered in the portal interface

saved

Read more
Made with
Install
zpm install appmsw-gateway-sql download archive
Version
1.0.611 Feb, 2023
Ideas portal
https://ideas.intersystems.com/ideas/DPI-I-224
ObjectScript quality test
Category
Technology Example
Works with
InterSystems IRISInterSystems IRIS for Health
First published
13 Oct, 2022
Last checked by moderator
27 Jun, 2023Works