帆软决策平台数据连接界面库
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

207 lines
3.9 KiB

export interface CrudReqOpts {
url?: string;
type?: 'GET' | 'POST' | 'DELETE' | 'PUT';
data?: any;
headers?: {
[key: string]: string;
};
noProgress?: boolean;
params?: CrudParams;
}
export interface CrudParams {
[key: string]: string | number | { [key: string]: any };
}
export interface Connection {
connectionId: string;
connectionType: string;
connectionName: string;
connectionData: ConnectionJDBC | ConnectionJNDI | ConnectionPlugin | string;
}
export interface ConnectionJDBC {
/**
*
*/
database: string;
/**
*
*/
connectionName: string;
/**
*
*/
driver: string;
/**
* url
*/
url: string;
/**
*
*/
user?: string;
/**
*
*/
password?: string;
/**
*
*/
queryType?: string;
/**
*
*/
newCharsetName?: any;
/**
*
*/
originalCharsetName?: any;
/**
*
*/
schema?: string;
/**
* ()
*/
testOnBorrow?: boolean;
/**
* ()
*/
maxActive?: number;
/**
*
*/
options?: string;
/**
*
*/
port?: number|'';
/**
*
*/
host?: string;
/**
*
*/
authType?: string;
/**
*
*/
creator?: string;
/**
* principal
*/
principal?: string;
/**
*
*/
keyPath?: string;
connectionPool: ConnectionPoolJDBC;
}
export interface ConnectionPoolJDBC {
/**
*
*/
initialSize?: number;
/**
*
*/
maxActive?: number;
/**
*
*/
maxIdle?: number;
/**
*
*/
minIdle?: number;
/**
*
*/
maxWait?: number;
/**
* sql查询
*/
validationQuery?: string;
/**
*
*/
testOnBorrow?: boolean;
/**
*
*/
testOnReturn?: boolean;
/**
*
*/
testWhileIdle?: boolean;
/**
* 线
*/
timeBetweenEvictionRunsMillis?: number;
/**
*
*/
numTestsPerEvictionRun?: number;
/**
*
*/
minEvictableIdleTimeMillis?: number;
}
export interface ConnectionJNDI {
jndiname: string;
/**
*
*/
originalCharsetName: string;
newCharsetName: string;
creator?: string;
contextHashtable: ContextHashtable;
}
export interface ContextHashtable {
'java.naming.factory.initial': string;
'java.naming.provider.url': string;
'java.naming.factory.object': string;
'java.naming.factory.state': string;
'java.naming.factory.url.pkgs': string;
'java.naming.dns.url': string;
'java.naming.authoritative': string;
'java.naming.batchsize': string;
'java.naming.referral': string;
'java.naming.security.protocol': string;
'java.naming.security.authentication': string;
'java.naming.security.principal': string;
'java.naming.security.credentials': string;
'java.naming.language': string;
'java.naming.applet': string;
}
export interface ConnectionPlugin {
pluginType: 'json';
creator: '';
pluginData: any;
}
export interface TestRequest {
data?: [];
errorCode?: string;
errorMsg?: string;
}
export interface ConnectionPoolType {
maxActive: number;
maxIdle: number;
numActive: number;
numIdle: number;
}