Skip to content

Commit 5c99c62

Browse files
committed
initial commit
1 parent 6113ed3 commit 5c99c62

17 files changed

+570
-364
lines changed

.github/workflows/MainDistributionPipeline.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,13 @@ jobs:
1818
with:
1919
duckdb_version: v1.4.1
2020
ci_tools_version: v1.4.1
21-
extension_name: quack
21+
extension_name: json_schema
2222

2323
code-quality-check:
2424
name: Code Quality Check
2525
uses: duckdb/extension-ci-tools/.github/workflows/_extension_code_quality.yml@v1.4.1
2626
with:
2727
duckdb_version: v1.4.1
2828
ci_tools_version: v1.4.1
29-
extension_name: quack
29+
extension_name: json_schema
3030
format_checks: 'format;tidy'

.vscode/c_cpp_properties.json

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{
2+
"configurations": [
3+
{
4+
"name": "Mac",
5+
"includePath": [
6+
"${workspaceFolder}/**",
7+
"${workspaceFolder}/src/include/",
8+
"${workspaceFolder}/duckdb/src/include/",
9+
"${workspaceFolder}/duckdb/third_party/**/include/",
10+
"${workspaceFolder}/vcpkg_installed/arm64-osx/include"
11+
],
12+
"defines": [],
13+
"macFrameworkPath": [
14+
"/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks"
15+
],
16+
"compilerPath": "/usr/bin/clang",
17+
"cStandard": "c17",
18+
"cppStandard": "c++17",
19+
"intelliSenseMode": "macos-clang-arm64",
20+
"configurationProvider": "ms-vscode.makefile-tools"
21+
}
22+
],
23+
"version": 4
24+
}

.vscode/settings.json

Lines changed: 125 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,125 @@
1+
{
2+
"files.exclude": {
3+
"vcpkg/downloads": true,
4+
"vcpkg/packages": true,
5+
"vcpkg/ports": true,
6+
"vcpkg/scripts": true,
7+
"vcpkg/toolsrc": true,
8+
"vcpkg/versions": true,
9+
"vcpkg/triplets": true,
10+
"vcpkg_installed/**": true,
11+
"duckdb_unittest_tempdir": true,
12+
"build/**": true,
13+
".tmp/**": true,
14+
"**/.git": true,
15+
"**/.svn": true,
16+
"**/.hg": true,
17+
"**/.trunk": true,
18+
"**/CVS": true,
19+
"**/.DS_Store": true,
20+
"**/Thumbs.db": true
21+
},
22+
"cmake.environment": {
23+
"GEN": "ninja",
24+
"VCPKG_TOOLCHAIN_PATH": "${workspaceFolder}/vcpkg/scripts/buildsystems/vcpkg.cmake",
25+
},
26+
"workbench.colorCustomizations": {
27+
"activityBar.activeBackground": "#828ab9",
28+
"activityBar.background": "#828ab9",
29+
"activityBar.foreground": "#15202b",
30+
"activityBar.inactiveForeground": "#15202b99",
31+
"activityBarBadge.background": "#ddc2c6",
32+
"activityBarBadge.foreground": "#15202b",
33+
"commandCenter.border": "#e7e7e799",
34+
"sash.hoverBorder": "#828ab9",
35+
"statusBar.background": "#616ca7",
36+
"statusBar.foreground": "#e7e7e7",
37+
"statusBarItem.hoverBackground": "#828ab9",
38+
"statusBarItem.remoteBackground": "#616ca7",
39+
"statusBarItem.remoteForeground": "#e7e7e7",
40+
"titleBar.activeBackground": "#616ca7",
41+
"titleBar.activeForeground": "#e7e7e7",
42+
"titleBar.inactiveBackground": "#616ca799",
43+
"titleBar.inactiveForeground": "#e7e7e799"
44+
},
45+
"peacock.color": "#616ca7",
46+
"files.associations": {
47+
"optional": "cpp",
48+
"*.inc": "cpp",
49+
"__hash_table": "cpp",
50+
"__split_buffer": "cpp",
51+
"__tree": "cpp",
52+
"array": "cpp",
53+
"bitset": "cpp",
54+
"deque": "cpp",
55+
"hash_map": "cpp",
56+
"initializer_list": "cpp",
57+
"list": "cpp",
58+
"map": "cpp",
59+
"queue": "cpp",
60+
"regex": "cpp",
61+
"set": "cpp",
62+
"span": "cpp",
63+
"stack": "cpp",
64+
"string": "cpp",
65+
"string_view": "cpp",
66+
"unordered_map": "cpp",
67+
"unordered_set": "cpp",
68+
"valarray": "cpp",
69+
"vector": "cpp",
70+
"*.ipp": "cpp",
71+
"stdexcept": "cpp",
72+
"iomanip": "cpp",
73+
"__bit_reference": "cpp",
74+
"__locale": "cpp",
75+
"__node_handle": "cpp",
76+
"__verbose_abort": "cpp",
77+
"cctype": "cpp",
78+
"charconv": "cpp",
79+
"cmath": "cpp",
80+
"condition_variable": "cpp",
81+
"cstddef": "cpp",
82+
"cstdint": "cpp",
83+
"cstdio": "cpp",
84+
"cstdlib": "cpp",
85+
"cstring": "cpp",
86+
"ctime": "cpp",
87+
"cwchar": "cpp",
88+
"forward_list": "cpp",
89+
"fstream": "cpp",
90+
"future": "cpp",
91+
"ios": "cpp",
92+
"iosfwd": "cpp",
93+
"iostream": "cpp",
94+
"istream": "cpp",
95+
"limits": "cpp",
96+
"locale": "cpp",
97+
"mutex": "cpp",
98+
"new": "cpp",
99+
"ostream": "cpp",
100+
"print": "cpp",
101+
"ratio": "cpp",
102+
"sstream": "cpp",
103+
"streambuf": "cpp",
104+
"tuple": "cpp",
105+
"typeinfo": "cpp",
106+
"variant": "cpp",
107+
"algorithm": "cpp",
108+
"__threading_support": "cpp",
109+
"any": "cpp",
110+
"cfenv": "cpp",
111+
"cinttypes": "cpp",
112+
"clocale": "cpp",
113+
"codecvt": "cpp",
114+
"complex": "cpp",
115+
"csignal": "cpp",
116+
"cstdarg": "cpp",
117+
"cwctype": "cpp",
118+
"execution": "cpp",
119+
"memory": "cpp",
120+
"shared_mutex": "cpp",
121+
"source_location": "cpp",
122+
"strstream": "cpp",
123+
"typeindex": "cpp"
124+
}
125+
}

CMakeLists.txt

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,24 @@
11
cmake_minimum_required(VERSION 3.5)
22

33
# Set extension name here
4-
set(TARGET_NAME quack)
4+
set(TARGET_NAME json_schema)
55

6-
# DuckDB's extension distribution supports vcpkg. As such, dependencies can be added in ./vcpkg.json and then
7-
# used in cmake with find_package. Feel free to remove or replace with other dependencies.
8-
# Note that it should also be removed from vcpkg.json to prevent needlessly installing it..
9-
find_package(OpenSSL REQUIRED)
6+
find_package(nlohmann_json CONFIG REQUIRED)
7+
find_package(nlohmann_json_schema_validator CONFIG REQUIRED)
108

119
set(EXTENSION_NAME ${TARGET_NAME}_extension)
1210
set(LOADABLE_EXTENSION_NAME ${TARGET_NAME}_loadable_extension)
1311

1412
project(${TARGET_NAME})
1513
include_directories(src/include)
1614

17-
set(EXTENSION_SOURCES src/quack_extension.cpp)
15+
set(EXTENSION_SOURCES src/json_schema_extension.cpp)
1816

1917
build_static_extension(${TARGET_NAME} ${EXTENSION_SOURCES})
2018
build_loadable_extension(${TARGET_NAME} " " ${EXTENSION_SOURCES})
2119

22-
# Link OpenSSL in both the static library as the loadable extension
23-
target_link_libraries(${EXTENSION_NAME} OpenSSL::SSL OpenSSL::Crypto)
24-
target_link_libraries(${LOADABLE_EXTENSION_NAME} OpenSSL::SSL OpenSSL::Crypto)
20+
target_link_libraries(${EXTENSION_NAME} nlohmann_json::nlohmann_json nlohmann_json_schema_validator::validator)
21+
target_link_libraries(${LOADABLE_EXTENSION_NAME} nlohmann_json::nlohmann_json nlohmann_json_schema_validator::validator)
2522

2623
install(
2724
TARGETS ${EXTENSION_NAME}

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
PROJ_DIR := $(dir $(abspath $(lastword $(MAKEFILE_LIST))))
22

33
# Configuration of extension
4-
EXT_NAME=quack
4+
EXT_NAME=json_schema
55
EXT_CONFIG=${PROJ_DIR}extension_config.cmake
66

77
# Include the Makefile from extension-ci-tools

docs/NEXT_README.md

Lines changed: 0 additions & 86 deletions
This file was deleted.

0 commit comments

Comments
 (0)