This LightDB extension implements JRES's T3 requests.
To install the t3sdk, CRES's C client library is needed, and the default version is CRES2.0.V202302.00.000. This library can be downloaded from HUNDSUN
Download CRES's SDK and unzip, directory such as :
acm/ dev/ client_demo/T3SDK/c++/linux.x64/lib/libt3sdk.so client_demo/T3SDK_C/linux.x64/lib/libt3sdk_c.so docker/ instance/ tools/
The CRES's SDK libt3sdk.so and libt3sdk_c.so must add to LD_LIBRARY_PATH.
If you first install, use CREATE EXTENSION t3sdk
.
If you already installed a previous version and you just want to upgrade, then ALTER EXTENSION t3sdk UPDATE
.
Every T3 call is a made up of list of VARCHAR
and an response of t3sdk_response
.
Every times request to T3's service, the backend process hold on connection until that process exit. The key is server's address and port, and the value is connection handle.
List of functions Schema | Name | Result data type | Argument data types | Type --------+------------+------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------ public | t3sdk_send | t3sdk_response | t_address character varying, groups character varying, service character varying, version character varying, function_id character varying, function_args character varying | func Composite type "public.t3sdk_response" Column | Type | Collation | Nullable | Default ---------+-------------------+-----------+----------+--------- content | character varying | | |
t3sdk_send(t_address VARCHAR, groups VARCHAR, service VARCHAR, version VARCHAR, function_id VARCHAR, function_args VARCHAR)
returns t3sdk_response
By default a 60 second timeout is set for the send of a request. If a different timeout is desired the following GUC variable can be used to set it in milliseconds:
t3sdk.t3_send_timeout_msec = 60000
By default a 60 second timeout is set for the recv of a request. If a different timeout is desired the following GUC variable can be used to set it in milliseconds:
t3sdk.t3_recv_timeout_msec = 60000
If a different T3's license is desired the following GUC variable can be used to set:
t3sdk.t3_license_no = 'HS-HUNDSUN001-FBASE2-0000-4ePWxzscBVtY9ZKdgDKhSyk2'
-- send t3 request select * from t3sdk_send('10.20.30.193:18082', 'g', 'repo-app', 'v', 'getExpressInfoNdb', ''); content ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ---------------------------------------- {"result":[{"express_id":"a","order_id":"1","express_no":"123456789","company":"测试公司1","create_datetime":"20230407010201","status":"0"},{"express_id":"b","order_id":"2","express_no":"123456789","company":"测试公司2","create_dat etime":"20230407010201","status":"0"}]} (1 row)