Whenever we are working with a DataFrame
we can type df.foo
and press TAB to autocomplete the column name. How to mimic this behavior with other Tables.jl types? We already implemented getproperty
, the only part that is not working is the autocompletion of the column name.
help?> propertynames
search: propertynames
propertynames(x, private=false)
Get a tuple or a vector of the properties (x.property) of an object x. This is typically the same as
fieldnames(typeof(x)), but types that overload getproperty should generally overload propertynames as well to get
the properties of an instance of the type.
propertynames(x) may return only "public" property names that are part of the documented interface of x. If you want
it to also return "private" fieldnames intended for internal use, pass true for the optional second argument. REPL
tab completion on x. shows only the private=false properties.
See also: hasproperty, hasfield.
Júlio Hoffimann has marked this topic as resolved.
Last updated: Nov 06 2024 at 04:40 UTC