@syntropylog/adapters
Version:
External adapters for SyntropyLog framework
50 lines • 1.37 kB
TypeScript
import { ISerializer, SerializationContext, SerializationResult } from '../../types';
export interface PostgreSQLQuery {
text: string;
values?: any[];
name?: string;
rowMode?: string;
types?: any[];
config?: {
host?: string;
port?: number;
database?: string;
user?: string;
password?: string;
};
}
export interface PostgreSQLError {
code: string;
message: string;
detail?: string;
hint?: string;
position?: string;
internalPosition?: string;
internalQuery?: string;
where?: string;
schema?: string;
table?: string;
column?: string;
dataType?: string;
constraint?: string;
file?: string;
line?: string;
routine?: string;
}
export declare class PostgreSQLSerializer implements ISerializer {
name: string;
priority: number;
canSerialize(data: any): boolean;
getComplexity(data: any): 'low' | 'medium' | 'high';
serialize(data: any, context: SerializationContext): Promise<SerializationResult>;
private isPostgreSQLQuery;
private isPostgreSQLError;
private isPostgreSQLClient;
private isPostgreSQLPool;
private assessQueryComplexity;
private serializeQuery;
private serializeError;
private serializeClient;
private serializePool;
}
//# sourceMappingURL=PostgreSQLSerializer.d.ts.map