import { ITableSchema } from '@/services/datastores/cassandra/typings/cassandra' ; param schema param columnNames returns export function buildTypeHints ( schema , columnNames ) { const schemaNameToTypeMap = { } ; schema . columns . forEach ( ( columnSchema ) => { schemaNameToTypeMap [ columnSchema . name ] = columnSchema . type ; } ) ; return columnNames . map ( ( columnName ) => schemaNameToTypeMap [ columnName ] ) ; } export function getJsType ( fieldType ) { switch ( fieldType ) { case 'bigint' : case 'counter' : case 'decimal' : case 'double' : case 'float' : case 'int' : case 'smallint' : case 'tinyint' : case 'varint' : return 'number' ; case 'boolean' : return 'boolean' ; case 'blob' : return 'object' ; default : return 'string' ; } }