@@ -72,11 +72,14 @@ For a type `T`, return the corresponding non-`DataValue` type, translating betwe
72
72
For example, `nondatavaluetype(Int64)` returns `Int64`, while
73
73
`nondatavaluetype(DataValue{Int64})` returns `Union{Int64, Missing}`.
74
74
75
- This generic function is owned by Tables .jl, which is the sole provider of the default
76
- definition.
75
+ This generic function is owned by DataAPI .jl itself , which is the sole provider of the
76
+ default definition.
77
77
"""
78
78
function nondatavaluetype end
79
79
80
+ nondatavaluetype (:: Type{T} ) where {T} = T
81
+ nondatavaluetype (:: Type{Union{}} ) = Union{}
82
+
80
83
"""
81
84
datavaluetype(T)
82
85
@@ -86,21 +89,26 @@ For a type `T`, return the corresponding `DataValue` type, translating between
86
89
For example, `datavaluetype(Int64)` returns `Int64`, while
87
90
`datavaluetype(Union{Int64, Missing})` returns `DataValue{Int64}`.
88
91
89
- This generic function is owned by Tables .jl, which is the sole provider of the default
90
- definition.
92
+ This generic function is owned by DataAPI .jl itself , which is the sole provider of the
93
+ default definition.
91
94
"""
92
95
function datavaluetype end
93
96
97
+ datavaluetype (:: Type{T} ) where {T} = T
98
+ datavaluetype (:: Type{Union{}} ) = Union{}
99
+
94
100
"""
95
101
unwrap(x)
96
102
97
103
For a value `x`, potentially "unwrap" it from a `DataValue` or similar container.
98
104
99
- This generic function is owned by Tables .jl, which is the sole provider of the default
100
- definition.
105
+ This generic function is owned by DataAPI .jl itself , which is the sole provider of the
106
+ default definition.
101
107
"""
102
108
function unwrap end
103
109
110
+ unwrap (x) = x
111
+
104
112
"""
105
113
describe(io::IO, x)
106
114
0 commit comments