should be it
This commit is contained in:
17
external/duckdb/third_party/yyjson/CMakeLists.txt
vendored
Normal file
17
external/duckdb/third_party/yyjson/CMakeLists.txt
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
if(POLICY CMP0063)
|
||||
cmake_policy(SET CMP0063 NEW)
|
||||
endif()
|
||||
|
||||
add_library(duckdb_yyjson STATIC yyjson.cpp)
|
||||
|
||||
target_include_directories(
|
||||
duckdb_yyjson
|
||||
PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>)
|
||||
set_target_properties(duckdb_yyjson PROPERTIES EXPORT_NAME duckdb_duckdb_yyjson)
|
||||
|
||||
install(TARGETS duckdb_yyjson
|
||||
EXPORT "${DUCKDB_EXPORT_SET}"
|
||||
LIBRARY DESTINATION "${INSTALL_LIB_DIR}"
|
||||
ARCHIVE DESTINATION "${INSTALL_LIB_DIR}")
|
||||
|
||||
disable_target_warnings(duckdb_yyjson)
|
||||
21
external/duckdb/third_party/yyjson/LICENSE
vendored
Normal file
21
external/duckdb/third_party/yyjson/LICENSE
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2020 YaoYuan <ibireme@gmail.com>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
7930
external/duckdb/third_party/yyjson/include/yyjson.hpp
vendored
Normal file
7930
external/duckdb/third_party/yyjson/include/yyjson.hpp
vendored
Normal file
File diff suppressed because it is too large
Load Diff
33
external/duckdb/third_party/yyjson/include/yyjson_utils.hpp
vendored
Normal file
33
external/duckdb/third_party/yyjson/include/yyjson_utils.hpp
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
//===----------------------------------------------------------------------===//
|
||||
// DuckDB
|
||||
//
|
||||
// yyjson_utils.hpp
|
||||
//
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "yyjson.hpp"
|
||||
|
||||
using namespace duckdb_yyjson; // NOLINT
|
||||
|
||||
namespace duckdb {
|
||||
|
||||
struct ConvertedJSONHolder {
|
||||
public:
|
||||
~ConvertedJSONHolder() {
|
||||
if (doc) {
|
||||
yyjson_mut_doc_free(doc);
|
||||
}
|
||||
if (stringified_json) {
|
||||
free(stringified_json);
|
||||
}
|
||||
}
|
||||
|
||||
public:
|
||||
yyjson_mut_doc *doc = nullptr;
|
||||
char *stringified_json = nullptr;
|
||||
};
|
||||
|
||||
} // namespace duckdb
|
||||
9490
external/duckdb/third_party/yyjson/yyjson.cpp
vendored
Normal file
9490
external/duckdb/third_party/yyjson/yyjson.cpp
vendored
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user