Skip to content

Commit

Permalink
Add nrow and ncol fallback implementations
Browse files Browse the repository at this point in the history
  • Loading branch information
bkamins authored Sep 7, 2023
1 parent dac28d9 commit 4be43d9
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/fallbacks.jl
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ function rowcount(cols)
return length(getcolumn(cols, names[1]))
end

# implement default methods for DataAPI.jl
DataAPI.nrow(table) = rowcount(table)
DataAPI.ncol(table) = length(columnnames(cols))

Check warning on line 16 in src/fallbacks.jl

View check run for this annotation

Codecov / codecov/patch

src/fallbacks.jl#L15-L16

Added lines #L15 - L16 were not covered by tests

# a lazy row view into a AbstractColumns object
struct ColumnsRow{T} <: AbstractRow
columns::T # an `AbstractColumns`-compatible object
Expand Down

0 comments on commit 4be43d9

Please sign in to comment.