Spaces:
Runtime error
Runtime error
Download src/types.cpp from rcgalbo/wayydb-api: direct link, hf CLI and curl.
- Browser
- Download file 626 Bytes
-
https://huggingface.co/spaces/rcgalbo/wayydb-api/resolve/main/src/types.cpp
- Command line
-
hf download hf://spaces/rcgalbo/wayydb-api/src/types.cpp
-
curl -L -o types.cpp https://huggingface.co/spaces/rcgalbo/wayydb-api/resolve/main/src/types.cpp
626 Bytes
| namespace wayy_db { | |
| DType dtype_from_string(std::string_view s) { | |
| static const std::unordered_map<std::string_view, DType> map = { | |
| {"int64", DType::Int64}, | |
| {"float64", DType::Float64}, | |
| {"timestamp", DType::Timestamp}, | |
| {"symbol", DType::Symbol}, | |
| {"bool", DType::Bool}, | |
| {"string", DType::String}, | |
| {"decimal6", DType::Decimal6}, | |
| }; | |
| auto it = map.find(s); | |
| if (it == map.end()) { | |
| throw WayyException("Unknown dtype: " + std::string(s)); | |
| } | |
| return it->second; | |
| } | |
| } // namespace wayy_db | |