import type { IResultSetColumnKey , IResultSetRowKey } from './IResultSetDataKey' ; export const ResultSetDataKeysUtils = { serialize ( key ) { let base = `${ key . index }` ; if ( 'key' in key ) { base += `_${ key . key }` ; } return base ; } , isEqual < T extends IResultSetColumnKey | IResultSetRowKey > ( a , b ) { if ( a . index !== b . index ) { return false ; } const keyA = 'key' in a ; const keyB = 'key' in b ; if ( keyA !== keyB ) { return false ; } if ( keyA && ( a as IResultSetRowKey ) . key !== ( b as IResultSetRowKey ) . key ) { return false ; } return true ; } , } ;