File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -48,8 +48,8 @@ export class RowVector<T = any> extends Vector<T> implements Row<T> {
4848 }
4949 toArray ( ) { return [ ...this ] ; }
5050 toJSON ( ) { return this . toArray ( ) ; }
51- toString ( ) { return `Row [${ this . length } )` }
52- toObject ( ) : Record < string , any > {
51+ toString ( ) { return `Row [${ this . length } )` ; }
52+ toObject ( ) : Record < string , T > {
5353 const { row } = this , map = Object . create ( null ) ;
5454 for ( const col of this . table . columns ) {
5555 if ( col && col . name ) {
Original file line number Diff line number Diff line change @@ -55,6 +55,8 @@ export interface Vector<T = any> extends Iterable<T | null> {
5555
5656export interface Row < T = any > extends Vector < T > {
5757 col ( key : string ) : T | null ;
58+ toArray ( ) : Array < T > ;
59+ toObject ( ) : Record < string , T > ;
5860}
5961
6062export interface Column < T = any > extends Vector < T > {
Original file line number Diff line number Diff line change @@ -40,6 +40,7 @@ else modulePath = path.join(target, format);
4040let Arrow : any = require ( path . resolve ( `./targets` , modulePath , `Arrow` ) ) ;
4141
4242import {
43+ Row as Row_ ,
4344 Table as Table_ ,
4445 Vector as Vector_ ,
4546 readBuffers as readBuffers_ ,
@@ -64,6 +65,7 @@ import {
6465 FixedSizeListVector as FixedSizeListVector_ ,
6566} from '../src/Arrow' ;
6667
68+ export let Row = Arrow . Row as typeof Row_ ;
6769export let Table = Arrow . Table as typeof Table_ ;
6870export let Vector = Arrow . Vector as typeof Vector_ ;
6971export let readBuffers = Arrow . readBuffers as typeof readBuffers_ ;
You can’t perform that action at this time.
0 commit comments