json2_udf.cpp 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. #include "as_json_node.h"
  2. #include "compile_path.h"
  3. #include "parse.h"
  4. #include "serialize.h"
  5. #include "sql_exists.h"
  6. #include "sql_query.h"
  7. #include "sql_value.h"
  8. #include <yql/essentials/public/udf/udf_helpers.h>
  9. namespace NJson2Udf {
  10. SIMPLE_MODULE(TJson2Module,
  11. TParse,
  12. TSerialize<EDataSlot::Json>,
  13. TSerialize<EDataSlot::JsonDocument>,
  14. TCompilePath,
  15. TSqlValue<EDataSlot::Json, TUtf8>,
  16. TSqlValue<EDataSlot::Json, TUtf8, true>,
  17. TSqlValue<EDataSlot::Json, i64>,
  18. TSqlValue<EDataSlot::Json, double>,
  19. TSqlValue<EDataSlot::Json, bool>,
  20. TSqlValue<EDataSlot::JsonDocument, TUtf8>,
  21. TSqlValue<EDataSlot::JsonDocument, TUtf8, true>,
  22. TSqlValue<EDataSlot::JsonDocument, i64>,
  23. TSqlValue<EDataSlot::JsonDocument, double>,
  24. TSqlValue<EDataSlot::JsonDocument, bool>,
  25. TSqlExists<EDataSlot::Json, false>,
  26. TSqlExists<EDataSlot::Json, true>,
  27. TSqlExists<EDataSlot::JsonDocument, false>,
  28. TSqlExists<EDataSlot::JsonDocument, true>,
  29. TSqlQuery<EDataSlot::Json, EJsonQueryWrap::NoWrap>,
  30. TSqlQuery<EDataSlot::Json, EJsonQueryWrap::Wrap>,
  31. TSqlQuery<EDataSlot::Json, EJsonQueryWrap::ConditionalWrap>,
  32. TSqlQuery<EDataSlot::JsonDocument, EJsonQueryWrap::NoWrap>,
  33. TSqlQuery<EDataSlot::JsonDocument, EJsonQueryWrap::Wrap>,
  34. TSqlQuery<EDataSlot::JsonDocument, EJsonQueryWrap::ConditionalWrap>,
  35. TAsJsonNode<TUtf8>,
  36. TAsJsonNode<double>,
  37. TAsJsonNode<bool>,
  38. TAsJsonNode<TJson>)
  39. }
  40. REGISTER_MODULES(NJson2Udf::TJson2Module)