Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/arquero.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
export function isArqueroTable(value) {
// Arquero tables have a `toArrowBuffer` function
return value && typeof value.toArrowBuffer === "function";
}
2 changes: 1 addition & 1 deletion src/duckdb.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import {isArqueroTable} from "./arquero.js";
import {getArrowTableSchema, isArrowTable, loadArrow} from "./arrow.js";
import {duckdb} from "./dependencies.js";
import {FileAttachment} from "./fileAttachment.js";
import {cdn} from "./require.js";
import {isArqueroTable} from "./table.js";

// Adapted from https://observablehq.com/@cmudig/duckdb-client
// Copyright 2021 CMU Data Interaction Group
Expand Down
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
export {FileAttachments, AbstractFile} from "./fileAttachment.js";
export {Library} from "./library.js";
export {getArrowTableSchema, isArrowTable} from "./arrow.js";
export {isArqueroTable} from "./arquero.js";
export {
makeQueryTemplate,
loadDataSource,
arrayIsPrimitive,
isDataArray,
isDatabaseClient,
isArqueroTable,
__table as applyDataTableOperations
} from "./table.js";
6 changes: 1 addition & 5 deletions src/table.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import {ascending, descending, reverse} from "d3-array";
import {FileAttachment} from "./fileAttachment.js";
import {isArqueroTable} from "./arquero.js";
import {isArrowTable, loadArrow} from "./arrow.js";
import {DuckDBClient} from "./duckdb.js";

Expand Down Expand Up @@ -141,11 +142,6 @@ function isTypedArray(value) {
);
}

export function isArqueroTable(value) {
// Arquero tables have a `toArrowBuffer` function
return value && typeof value.toArrowBuffer === "function";
}

// __query is used by table cells; __query.sql is used by SQL cells.
export const __query = Object.assign(
async (source, operations, invalidation, name) => {
Expand Down