API Integraiton - SQL

API Integration - SQL PRODUCT     AVGIDEA, INC. 

SQL can be executed from within a function executed by Avgidea Function to manipulate tables (DDL), update data (DML), and execute queries (SELECT).


Executing SQL (DDL)

resp = adpy.execute(name='orcl', statement='create table simple(id varchar2(64), num number, dt date)')

Function

Parameters

Return value

Executing SQL (DML)

sess = {

   'NLS_DATE_FORMAT': 'YYYY/MM/DD HH:MI:SS'

}


resp = adpy.execute(name='orcl', statement='insert into simple values(:1, :2, SYSDATE)', args=['abcde', 1], session=sess)

Function

Parameters

Option

Return value

Executing SQL (SELECT)

sess = {

   'DATE_FORMAT' : '2006/01/02 15:04:05'

}


resp = adpy.query(name='orcl', querystr='select * from simple where id = :1', args=['abcde'],session=sess)

Funciton

Parameters

オプション

Return value