@loaders.gl/schema
Advanced tools
Comparing version 4.0.0-alpha.22 to 4.0.0-alpha.23
@@ -51,37 +51,47 @@ import type { Table as ApacheArrowTable, RecordBatch } from 'apache-arrow'; | ||
/** Batch for a general table */ | ||
export type TableBatch = Batch & { | ||
data: any; | ||
length: number; | ||
export type TableBatch = ArrayRowTableBatch | ObjectRowTableBatch | GeoJSONRowTableBatch | ColumnarTableBatch | ArrowTableBatch; | ||
/** Batch for a table organized as an array of rows, each row is an array of values */ | ||
export type ArrayRowTableBatch = Batch & { | ||
shape: 'array-row-table'; | ||
schema?: Schema; | ||
schemaType?: 'explicit' | 'deduced'; | ||
}; | ||
/** Batch for a table organized as an array of rows, each row is an array of values */ | ||
export type ArrayRowTableBatch = TableBatch & { | ||
shape: 'array-row-table'; | ||
data: any[][]; | ||
length: number; | ||
}; | ||
/** Batch for a table organized as an array of rows, each row is an object mapping columns to values */ | ||
export type ObjectRowTableBatch = TableBatch & { | ||
export type ObjectRowTableBatch = Batch & { | ||
shape: 'object-row-table'; | ||
schema?: Schema; | ||
schemaType?: 'explicit' | 'deduced'; | ||
data: { | ||
[columnName: string]: any; | ||
}[]; | ||
length: number; | ||
}; | ||
/** Batch for a table organized as an array of rows, each row is an array of values */ | ||
export type GeoJSONRowTableBatch = TableBatch & { | ||
export type GeoJSONRowTableBatch = Batch & { | ||
shape: 'geojson-row-table'; | ||
schema?: Schema; | ||
schemaType?: 'explicit' | 'deduced'; | ||
data: Feature[]; | ||
length: number; | ||
}; | ||
/** Batch for a table organized as a map of columns, each column is an array of value */ | ||
export type ColumnarTableBatch = TableBatch & { | ||
export type ColumnarTableBatch = Batch & { | ||
shape: 'columnar-table'; | ||
schemaType?: 'explicit' | 'deduced'; | ||
schema?: Schema; | ||
data: { | ||
[columnName: string]: ArrayLike<unknown>; | ||
}; | ||
length: number; | ||
}; | ||
/** Batch for a table organized as an Apache Arrow table */ | ||
export type ArrowTableBatch = TableBatch & { | ||
export type ArrowTableBatch = Batch & { | ||
shape: 'arrow-table'; | ||
schemaType?: 'explicit' | 'deduced'; | ||
schema?: Schema; | ||
data: RecordBatch; | ||
length: number; | ||
}; | ||
//# sourceMappingURL=category-table.d.ts.map |
{ | ||
"name": "@loaders.gl/schema", | ||
"version": "4.0.0-alpha.22", | ||
"version": "4.0.0-alpha.23", | ||
"description": "Table format APIs for JSON, CSV, etc...", | ||
@@ -37,3 +37,3 @@ "license": "MIT", | ||
}, | ||
"gitHead": "0da838c506d1275383f2fd3d244d9c72b25397d2" | ||
"gitHead": "e212f2a0c0e342f7cb65ce84fa2ff39f64b7d94b" | ||
} |
@@ -69,37 +69,52 @@ // loaders.gl, MIT license | ||
/** Batch for a general table */ | ||
export type TableBatch = Batch & { | ||
data: any; | ||
length: number; | ||
schema?: Schema; | ||
schemaType?: 'explicit' | 'deduced'; | ||
}; | ||
export type TableBatch = | ||
| ArrayRowTableBatch | ||
| ObjectRowTableBatch | ||
| GeoJSONRowTableBatch | ||
| ColumnarTableBatch | ||
| ArrowTableBatch; | ||
/** Batch for a table organized as an array of rows, each row is an array of values */ | ||
export type ArrayRowTableBatch = TableBatch & { | ||
export type ArrayRowTableBatch = Batch & { | ||
shape: 'array-row-table'; | ||
schema?: Schema; | ||
schemaType?: 'explicit' | 'deduced'; | ||
data: any[][]; | ||
length: number; | ||
}; | ||
/** Batch for a table organized as an array of rows, each row is an object mapping columns to values */ | ||
export type ObjectRowTableBatch = TableBatch & { | ||
export type ObjectRowTableBatch = Batch & { | ||
shape: 'object-row-table'; | ||
schema?: Schema; | ||
schemaType?: 'explicit' | 'deduced'; | ||
data: {[columnName: string]: any}[]; | ||
length: number; | ||
}; | ||
/** Batch for a table organized as an array of rows, each row is an array of values */ | ||
export type GeoJSONRowTableBatch = TableBatch & { | ||
export type GeoJSONRowTableBatch = Batch & { | ||
shape: 'geojson-row-table'; | ||
schema?: Schema; | ||
schemaType?: 'explicit' | 'deduced'; | ||
data: Feature[]; | ||
length: number; | ||
}; | ||
/** Batch for a table organized as a map of columns, each column is an array of value */ | ||
export type ColumnarTableBatch = TableBatch & { | ||
export type ColumnarTableBatch = Batch & { | ||
shape: 'columnar-table'; | ||
schemaType?: 'explicit' | 'deduced'; | ||
schema?: Schema; | ||
data: {[columnName: string]: ArrayLike<unknown>}; | ||
length: number; | ||
}; | ||
/** Batch for a table organized as an Apache Arrow table */ | ||
export type ArrowTableBatch = TableBatch & { | ||
export type ArrowTableBatch = Batch & { | ||
shape: 'arrow-table'; | ||
schemaType?: 'explicit' | 'deduced'; | ||
schema?: Schema; | ||
data: RecordBatch; | ||
length: number; | ||
}; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1318353
25560