From 18b4b6f8861369ade7314af26f8390e04bff5e58 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lu=C3=ADs=20Silva?= Date: Fri, 20 Jan 2023 19:03:38 +0000 Subject: [PATCH 001/203] Bug#35000027 X DevAPI Don't clone Executable unless needed If Executable object is copied onto itself, it will not be cloned. Change-Id: Id417714a9d5834d1f839733e5fcbbca2da553e4a --- devapi/tests/bugs-t.cc | 16 ++++++++++++++++ include/mysqlx/devapi/executable.h | 2 +- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/devapi/tests/bugs-t.cc b/devapi/tests/bugs-t.cc index 6a5b103bb..3180d4082 100644 --- a/devapi/tests/bugs-t.cc +++ b/devapi/tests/bugs-t.cc @@ -948,3 +948,19 @@ TEST_F(Bugs, Bug33352469) remove.bind("id", "2").execute(); EXPECT_EQ(0U, coll.find().execute().count()); } + +TEST_F(Bugs, Bug35000027) +{ + auto coll = get_sess().getSchema("test").createCollection("coll", true); + coll.remove("true").execute(); + size_t nr_docs = 10000; + DbDoc doc(R"({"name":"foo", "bar": "baz" })"); + auto add_task = coll.add(doc); + auto add_tast_2 = add_task.add(doc); + for (size_t i = 2; i < nr_docs; ++i) { + add_task = add_task.add(doc); + add_tast_2 = add_tast_2.add(doc); + } + EXPECT_EQ(nr_docs, add_task.execute().getAffectedItemsCount()); + EXPECT_EQ(nr_docs, add_tast_2.execute().getAffectedItemsCount()); +} \ No newline at end of file diff --git a/include/mysqlx/devapi/executable.h b/include/mysqlx/devapi/executable.h index ba4db2b27..31f57537d 100644 --- a/include/mysqlx/devapi/executable.h +++ b/include/mysqlx/devapi/executable.h @@ -89,7 +89,7 @@ class Executable void reset(const Executable &other) { - m_impl.reset(other.m_impl->clone()); + if (m_impl.get() != other.m_impl.get()) m_impl.reset(other.m_impl->clone()); } void reset(const Executable &&other) From 04eea861347aaa95b8274c039168c0bf0cfe84b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lu=C3=ADs=20Silva?= Date: Tue, 31 Jan 2023 15:04:48 +0000 Subject: [PATCH 002/203] Bump connector version to 8.0.34 Change-Id: I9cc1584ffcbef1b014adda01287a481b653c97b2 --- version.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/version.cmake b/version.cmake index f8a8c49e5..e82de41c4 100644 --- a/version.cmake +++ b/version.cmake @@ -1,4 +1,4 @@ -# Copyright (c) 2016, 2022, Oracle and/or its affiliates. +# Copyright (c) 2016, 2023, Oracle and/or its affiliates. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License, version 2.0, as @@ -32,7 +32,7 @@ set(CONCPP_VERSION_MAJOR 8 CACHE INTERNAL "version info") set(CONCPP_VERSION_MINOR 0 CACHE INTERNAL "version info") -set(CONCPP_VERSION_MICRO 33 CACHE INTERNAL "version info") +set(CONCPP_VERSION_MICRO 34 CACHE INTERNAL "version info") # Level is "-alpha", "-beta", empty if GA set(CONCPP_VERSION_LEVEL "" CACHE INTERNAL "version info") From 5291c975761acff7796adb7932acb031192555c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lu=C3=ADs=20Silva?= Date: Wed, 1 Feb 2023 10:57:47 +0000 Subject: [PATCH 003/203] Bug#20422957 FIX CMAKE WARNINGS IN C/C++ CMAKE version 2.8 is deprecated so cmake generated warnings. WIth change to C++17, the minimum cmake version possible is 3.12. Change-Id: I4fb41814d4f899a5765e8a92565e693819de4271 --- CMakeLists.txt | 2 +- cdk/CMakeLists.txt | 2 +- cdk/cmake/bootstrap/CMakeLists.txt | 4 ++-- cdk/cmake/headers/check.cmake.in | 4 ++-- cdk/core/CMakeLists.txt | 2 +- cdk/protocol/mysqlx/tests/CMakeLists.txt | 2 +- jdbc/CMakeLists.txt | 2 +- testapp/CMakeLists.txt | 2 +- 8 files changed, 10 insertions(+), 10 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 596094a63..252fca436 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -27,7 +27,7 @@ # 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -CMAKE_MINIMUM_REQUIRED(VERSION 3.1) +CMAKE_MINIMUM_REQUIRED(VERSION 3.12) CMAKE_POLICY(VERSION 3.1) cmake_policy(SET CMP0022 NEW) diff --git a/cdk/CMakeLists.txt b/cdk/CMakeLists.txt index 26c7ee23e..7866b7065 100644 --- a/cdk/CMakeLists.txt +++ b/cdk/CMakeLists.txt @@ -28,7 +28,7 @@ -CMAKE_MINIMUM_REQUIRED(VERSION 3.0) +CMAKE_MINIMUM_REQUIRED(VERSION 3.12) cmake_policy(VERSION 3.0) diff --git a/cdk/cmake/bootstrap/CMakeLists.txt b/cdk/cmake/bootstrap/CMakeLists.txt index 6a877b271..8269875d2 100644 --- a/cdk/cmake/bootstrap/CMakeLists.txt +++ b/cdk/cmake/bootstrap/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2021, 2023, Oracle and/or its affiliates. All rights reserved. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License, version 2.0, as @@ -31,7 +31,7 @@ # See bootstrap.cmake. # -cmake_minimum_required(VERSION 3.0) +cmake_minimum_required(VERSION 3.12) project(Bootstrap C CXX) include(TestBigEndian) test_big_endian(big_endian) diff --git a/cdk/cmake/headers/check.cmake.in b/cdk/cmake/headers/check.cmake.in index 9ed2b6e6b..3ef0fb76b 100644 --- a/cdk/cmake/headers/check.cmake.in +++ b/cdk/cmake/headers/check.cmake.in @@ -31,14 +31,14 @@ # Auto generated file for compiling public header tests # -CMAKE_MINIMUM_REQUIRED(VERSION 2.6) +CMAKE_MINIMUM_REQUIRED(VERSION 3.12) PROJECT(Headers_check) add_compile_options(/wd4251) # FIXME: DLL warning add_compile_options(/wd4521) # multiple copy ctors if (CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang") - add_compile_options("-std=c++11") + add_compile_options("-std=c++17") endif() INCLUDE_DIRECTORIES(@hdr_include_dir@) diff --git a/cdk/core/CMakeLists.txt b/cdk/core/CMakeLists.txt index 30f7baf11..101f18fbc 100644 --- a/cdk/core/CMakeLists.txt +++ b/cdk/core/CMakeLists.txt @@ -27,7 +27,7 @@ # 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -cmake_minimum_required(VERSION 2.8) +cmake_minimum_required(VERSION 3.12) # TODO: Why it is not enough to set it in the top-level CMakeLists.txt? #cmake_policy(SET CMP0023 OLD) diff --git a/cdk/protocol/mysqlx/tests/CMakeLists.txt b/cdk/protocol/mysqlx/tests/CMakeLists.txt index 59ebadc68..eda41eb20 100644 --- a/cdk/protocol/mysqlx/tests/CMakeLists.txt +++ b/cdk/protocol/mysqlx/tests/CMakeLists.txt @@ -26,7 +26,7 @@ # along with this program; if not, write to the Free Software Foundation, Inc., # 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -cmake_minimum_required (VERSION 2.8) +cmake_minimum_required (VERSION 3.12) if (WITH_TESTS) diff --git a/jdbc/CMakeLists.txt b/jdbc/CMakeLists.txt index e14c985ec..7136c2d50 100644 --- a/jdbc/CMakeLists.txt +++ b/jdbc/CMakeLists.txt @@ -28,7 +28,7 @@ PROJECT(MYSQLCPPCONN) -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.12) if(POLICY CMP0003) cmake_policy(SET CMP0003 NEW) diff --git a/testapp/CMakeLists.txt b/testapp/CMakeLists.txt index 0885e98be..c9d2e44ec 100644 --- a/testapp/CMakeLists.txt +++ b/testapp/CMakeLists.txt @@ -27,7 +27,7 @@ # 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -cmake_minimum_required(VERSION 2.8) +cmake_minimum_required(VERSION 2.8.12) PROJECT(MySQL_CONCPP_TEST) # From 2ad38613e6da2385b268666adb06926f0292d0f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lu=C3=ADs=20Silva?= Date: Fri, 3 Feb 2023 11:21:09 +0000 Subject: [PATCH 004/203] Bug#35042614 duplicate symbol StringUtils::split Change-Id: I8932a74f7c7e9104ee8d06fa079cf4559e1191fb --- jdbc/test/CJUnitTestsPort/CMakeLists.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/jdbc/test/CJUnitTestsPort/CMakeLists.txt b/jdbc/test/CJUnitTestsPort/CMakeLists.txt index 09269a367..5de5ce43b 100644 --- a/jdbc/test/CJUnitTestsPort/CMakeLists.txt +++ b/jdbc/test/CJUnitTestsPort/CMakeLists.txt @@ -56,7 +56,6 @@ INCLUDE_DIRECTORIES("${CMAKE_BINARY_DIR}/include/jdbc") SET(test_CJUnitTestsPort_sources ccpptests.cpp BaseTestFixture.cpp - ../common/stringutils.cpp resources.cpp regression/EscapeProcessorRegressionTest.cpp compliance/ConnectionTest.cpp From 9bec8dcbf497fbe1eaf51d84d620484e9656de40 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lu=C3=ADs=20Silva?= Date: Fri, 3 Feb 2023 17:56:39 +0000 Subject: [PATCH 005/203] CXX_STANDAR was indeed implemented on 3.8 and we still support platforms where cmake version is < 3.12 Change-Id: I766e33ee880f1c04409a790fc25fc4709904ea4d --- CMakeLists.txt | 4 ++-- cdk/CMakeLists.txt | 4 ++-- cdk/cmake/bootstrap/CMakeLists.txt | 4 ++-- cdk/cmake/headers/check.cmake.in | 4 ++-- cdk/core/CMakeLists.txt | 4 ++-- cdk/protocol/mysqlx/tests/CMakeLists.txt | 4 ++-- jdbc/CMakeLists.txt | 4 ++-- 7 files changed, 14 insertions(+), 14 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 252fca436..e3b019dcc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (c) 2015, 2022, Oracle and/or its affiliates. +# Copyright (c) 2015, 2023, Oracle and/or its affiliates. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License, version 2.0, as @@ -27,7 +27,7 @@ # 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -CMAKE_MINIMUM_REQUIRED(VERSION 3.12) +CMAKE_MINIMUM_REQUIRED(VERSION 3.8) CMAKE_POLICY(VERSION 3.1) cmake_policy(SET CMP0022 NEW) diff --git a/cdk/CMakeLists.txt b/cdk/CMakeLists.txt index 7866b7065..4938e3145 100644 --- a/cdk/CMakeLists.txt +++ b/cdk/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (c) 2015, 2022, Oracle and/or its affiliates. +# Copyright (c) 2015, 2023, Oracle and/or its affiliates. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License, version 2.0, as @@ -28,7 +28,7 @@ -CMAKE_MINIMUM_REQUIRED(VERSION 3.12) +CMAKE_MINIMUM_REQUIRED(VERSION 3.8) cmake_policy(VERSION 3.0) diff --git a/cdk/cmake/bootstrap/CMakeLists.txt b/cdk/cmake/bootstrap/CMakeLists.txt index 8269875d2..8d548f2cb 100644 --- a/cdk/cmake/bootstrap/CMakeLists.txt +++ b/cdk/cmake/bootstrap/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (c) 2021, 2023, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2021, 2023, Oracle and/or its affiliates. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License, version 2.0, as @@ -31,7 +31,7 @@ # See bootstrap.cmake. # -cmake_minimum_required(VERSION 3.12) +cmake_minimum_required(VERSION 3.8) project(Bootstrap C CXX) include(TestBigEndian) test_big_endian(big_endian) diff --git a/cdk/cmake/headers/check.cmake.in b/cdk/cmake/headers/check.cmake.in index 3ef0fb76b..76b9ad21e 100644 --- a/cdk/cmake/headers/check.cmake.in +++ b/cdk/cmake/headers/check.cmake.in @@ -1,4 +1,4 @@ -# Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2015, 2023, Oracle and/or its affiliates. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License, version 2.0, as @@ -31,7 +31,7 @@ # Auto generated file for compiling public header tests # -CMAKE_MINIMUM_REQUIRED(VERSION 3.12) +CMAKE_MINIMUM_REQUIRED(VERSION 3.8) PROJECT(Headers_check) add_compile_options(/wd4251) # FIXME: DLL warning diff --git a/cdk/core/CMakeLists.txt b/cdk/core/CMakeLists.txt index 101f18fbc..187b87f89 100644 --- a/cdk/core/CMakeLists.txt +++ b/cdk/core/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (c) 2015, 2020, Oracle and/or its affiliates. +# Copyright (c) 2015, 2023, Oracle and/or its affiliates. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License, version 2.0, as @@ -27,7 +27,7 @@ # 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -cmake_minimum_required(VERSION 3.12) +cmake_minimum_required(VERSION 3.8) # TODO: Why it is not enough to set it in the top-level CMakeLists.txt? #cmake_policy(SET CMP0023 OLD) diff --git a/cdk/protocol/mysqlx/tests/CMakeLists.txt b/cdk/protocol/mysqlx/tests/CMakeLists.txt index eda41eb20..1c3e9d79c 100644 --- a/cdk/protocol/mysqlx/tests/CMakeLists.txt +++ b/cdk/protocol/mysqlx/tests/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2015, 2023, Oracle and/or its affiliates. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License, version 2.0, as @@ -26,7 +26,7 @@ # along with this program; if not, write to the Free Software Foundation, Inc., # 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -cmake_minimum_required (VERSION 3.12) +cmake_minimum_required (VERSION 3.8) if (WITH_TESTS) diff --git a/jdbc/CMakeLists.txt b/jdbc/CMakeLists.txt index 7136c2d50..5182f9201 100644 --- a/jdbc/CMakeLists.txt +++ b/jdbc/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (c) 2008, 2022, Oracle and/or its affiliates. +# Copyright (c) 2008, 2023, Oracle and/or its affiliates. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License, version 2.0, as @@ -28,7 +28,7 @@ PROJECT(MYSQLCPPCONN) -cmake_minimum_required(VERSION 3.12) +cmake_minimum_required(VERSION 3.8) if(POLICY CMP0003) cmake_policy(SET CMP0003 NEW) From 17e2b54f95a8c076421962635dac52e08c7b388f Mon Sep 17 00:00:00 2001 From: Rafal Somla Date: Mon, 6 Feb 2023 17:54:25 +0100 Subject: [PATCH 006/203] cmake: Fix include path when using connector directly from the build tree. For example, when it is used by the `try` executable. --- CMakeLists.txt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index e3b019dcc..55869c71e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -399,7 +399,12 @@ add_subdirectory(devapi) # Generate the main connector library. merge_libraries(connector xapi devapi) -target_include_directories(connector PUBLIC "${PROJECT_SOURCE_DIR}/include") +target_include_directories(connector PUBLIC + "${PROJECT_SOURCE_DIR}/include" + # Note: This is needed when using connector directly from the build tree to + # find headers generated by the build process. + $ +) # From 0d44f0e993873fdc592c7f3be97b6688218cfea0 Mon Sep 17 00:00:00 2001 From: Rafal Somla Date: Fri, 10 Feb 2023 16:15:34 +0100 Subject: [PATCH 007/203] doc: Update doxygen configuration and fix doxygnen warnings. --- doc/CMakeLists.txt | 6 + doc/doxygen.cfg.in | 848 +++++++++++++++++++++--------- include/mysqlx/common_constants.h | 3 +- include/mysqlx/devapi/document.h | 2 + include/mysqlx/devapi/result.h | 2 +- include/mysqlx/devapi/settings.h | 4 + include/mysqlx/xapi.h | 4 + include/mysqlx/xdevapi.h | 4 + 8 files changed, 610 insertions(+), 263 deletions(-) diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt index 9869c1607..ce09cfc80 100644 --- a/doc/CMakeLists.txt +++ b/doc/CMakeLists.txt @@ -86,6 +86,12 @@ set(OUTPUT_DIRECTORY "$(OUTPUT_DIRECTORY)") configure_file(doxygen.cfg.in ${CMAKE_CURRENT_SOURCE_DIR}/doxygen.cfg @ONLY) configure_file(DoxygenLayout.xml.in ${CMAKE_CURRENT_SOURCE_DIR}/DoxygenLayout.xml @ONLY) +message(STATUS "Updating doxygen configuration file.") +execute_process( + COMMAND ${DOXYGEN_EXECUTABLE} -u doxygen.cfg + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} +) + FILE(GLOB sources *.txt) LIST(APPEND sources doxygen.cfg.in) diff --git a/doc/doxygen.cfg.in b/doc/doxygen.cfg.in index 27d2e23a0..fe9ea03a3 100644 --- a/doc/doxygen.cfg.in +++ b/doc/doxygen.cfg.in @@ -40,16 +40,26 @@ # For lists, items can also be appended using: # TAG += value [value, ...] # Values that contain spaces should be placed between quotes (\" \"). +# +# Note: +# +# Use doxygen to compare the used configuration file with the template +# configuration file: +# doxygen -x [configFile] +# Use doxygen to compare the used configuration file with the template +# configuration file without replacing the environment variables or CMake type +# replacement variables: +# doxygen -x_noenv [configFile] #--------------------------------------------------------------------------- # Project related configuration options #--------------------------------------------------------------------------- -# This tag specifies the encoding used for all characters in the config file -# that follow. The default is UTF-8 which is also the encoding used for all text -# before the first occurrence of this tag. Doxygen uses libiconv (or the iconv -# built into libc) for the transcoding. See http://www.gnu.org/software/libiconv -# for the list of possible encodings. +# This tag specifies the encoding used for all characters in the configuration +# file that follow. The default is UTF-8 which is also the encoding used for all +# text before the first occurrence of this tag. Doxygen uses libiconv (or the +# iconv built into libc) for the transcoding. See +# https://www.gnu.org/software/libiconv/ for the list of possible encodings. # The default value is: UTF-8. DOXYFILE_ENCODING = UTF-8 @@ -88,16 +98,28 @@ PROJECT_LOGO = OUTPUT_DIRECTORY = @OUTPUT_DIRECTORY@ -# If the CREATE_SUBDIRS tag is set to YES then doxygen will create 4096 sub- -# directories (in 2 levels) under the output directory of each output format and -# will distribute the generated files over these directories. Enabling this +# If the CREATE_SUBDIRS tag is set to YES then doxygen will create up to 4096 +# sub-directories (in 2 levels) under the output directory of each output format +# and will distribute the generated files over these directories. Enabling this # option can be useful when feeding doxygen a huge amount of source files, where # putting all generated files in the same directory would otherwise causes -# performance problems for the file system. +# performance problems for the file system. Adapt CREATE_SUBDIRS_LEVEL to +# control the number of sub-directories. # The default value is: NO. CREATE_SUBDIRS = NO +# Controls the number of sub-directories that will be created when +# CREATE_SUBDIRS tag is set to YES. Level 0 represents 16 directories, and every +# level increment doubles the number of directories, resulting in 4096 +# directories at level 8 which is the default and also the maximum value. The +# sub-directories are organized in 2 levels, the first level always has a fixed +# number of 16 directories. +# Minimum value: 0, maximum value: 8, default value: 8. +# This tag requires that the tag CREATE_SUBDIRS is set to YES. + +CREATE_SUBDIRS_LEVEL = 8 + # If the ALLOW_UNICODE_NAMES tag is set to YES, doxygen will allow non-ASCII # characters to appear in the names of generated files. If set to NO, non-ASCII # characters will be escaped, for example _xE3_x81_x84 will be used for Unicode @@ -109,14 +131,14 @@ ALLOW_UNICODE_NAMES = NO # The OUTPUT_LANGUAGE tag is used to specify the language in which all # documentation generated by doxygen is written. Doxygen will use this # information to generate all constant output in the proper language. -# Possible values are: Afrikaans, Arabic, Armenian, Brazilian, Catalan, Chinese, -# Chinese-Traditional, Croatian, Czech, Danish, Dutch, English (United States), -# Esperanto, Farsi (Persian), Finnish, French, German, Greek, Hungarian, -# Indonesian, Italian, Japanese, Japanese-en (Japanese with English messages), -# Korean, Korean-en (Korean with English messages), Latvian, Lithuanian, -# Macedonian, Norwegian, Persian (Farsi), Polish, Portuguese, Romanian, Russian, -# Serbian, Serbian-Cyrillic, Slovak, Slovene, Spanish, Swedish, Turkish, -# Ukrainian and Vietnamese. +# Possible values are: Afrikaans, Arabic, Armenian, Brazilian, Bulgarian, +# Catalan, Chinese, Chinese-Traditional, Croatian, Czech, Danish, Dutch, English +# (United States), Esperanto, Farsi (Persian), Finnish, French, German, Greek, +# Hindi, Hungarian, Indonesian, Italian, Japanese, Japanese-en (Japanese with +# English messages), Korean, Korean-en (Korean with English messages), Latvian, +# Lithuanian, Macedonian, Norwegian, Persian (Farsi), Polish, Portuguese, +# Romanian, Russian, Serbian, Serbian-Cyrillic, Slovak, Slovene, Spanish, +# Swedish, Turkish, Ukrainian and Vietnamese. # The default value is: English. OUTPUT_LANGUAGE = English @@ -207,6 +229,16 @@ SHORT_NAMES = NO JAVADOC_AUTOBRIEF = YES +# If the JAVADOC_BANNER tag is set to YES then doxygen will interpret a line +# such as +# /*************** +# as being the beginning of a Javadoc-style comment "banner". If set to NO, the +# Javadoc-style will behave just like regular comments and it will not be +# interpreted by doxygen. +# The default value is: NO. + +JAVADOC_BANNER = NO + # If the QT_AUTOBRIEF tag is set to YES then doxygen will interpret the first # line (until the first dot) of a Qt-style comment as the brief description. If # set to NO, the Qt-style will behave just like regular Qt-style comments (thus @@ -227,6 +259,14 @@ QT_AUTOBRIEF = NO MULTILINE_CPP_IS_BRIEF = NO +# By default Python docstrings are displayed as preformatted text and doxygen's +# special commands cannot be used. By setting PYTHON_DOCSTRING to NO the +# doxygen's special commands can be used and the contents of the docstring +# documentation blocks is shown as doxygen documentation. +# The default value is: YES. + +PYTHON_DOCSTRING = YES + # If the INHERIT_DOCS tag is set to YES then an undocumented member inherits the # documentation from any documented member that it re-implements. # The default value is: YES. @@ -250,20 +290,19 @@ TAB_SIZE = 4 # the documentation. An alias has the form: # name=value # For example adding -# "sideeffect=@par Side Effects:\n" +# "sideeffect=@par Side Effects:^^" # will allow you to put the command \sideeffect (or @sideeffect) in the # documentation, which will result in a user-defined paragraph with heading -# "Side Effects:". You can put \n's in the value part of an alias to insert -# newlines. +# "Side Effects:". Note that you cannot put \n's in the value part of an alias +# to insert newlines (in the resulting output). You can put ^^ in the value part +# of an alias to insert a newline as if a physical newline was in the original +# file. When you need a literal { or } or , in the value part of an alias you +# have to escape them by means of a backslash (\), this can lead to conflicts +# with the commands \{ and \} for these it is advised to use the version @{ and +# @} or use a double escape (\\{ and \\}) ALIASES = "copyright_line=Copyright (c) 2015, 2020, Oracle and/or its affiliates." -# This tag can be used to specify a number of word-keyword mappings (TCL only). -# A mapping has the form "name=value". For example adding "class=itcl::class" -# will allow you to use the command class in the itcl::class meaning. - -TCL_SUBST = - # Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources # only. Doxygen will then generate output that is more tailored for C. For # instance, some of the names that are used will be different. The list of all @@ -292,28 +331,40 @@ OPTIMIZE_FOR_FORTRAN = NO OPTIMIZE_OUTPUT_VHDL = NO +# Set the OPTIMIZE_OUTPUT_SLICE tag to YES if your project consists of Slice +# sources only. Doxygen will then generate output that is more tailored for that +# language. For instance, namespaces will be presented as modules, types will be +# separated into more groups, etc. +# The default value is: NO. + +OPTIMIZE_OUTPUT_SLICE = NO + # Doxygen selects the parser to use depending on the extension of the files it # parses. With this tag you can assign which parser to use for a given # extension. Doxygen has a built-in mapping, but you can override or extend it # using this tag. The format is ext=language, where ext is a file extension, and -# language is one of the parsers supported by doxygen: IDL, Java, Javascript, -# C#, C, C++, D, PHP, Objective-C, Python, Fortran (fixed format Fortran: -# FortranFixed, free formatted Fortran: FortranFree, unknown formatted Fortran: -# Fortran. In the later case the parser tries to guess whether the code is fixed -# or free formatted code, this is the default for Fortran type files), VHDL. For -# instance to make doxygen treat .inc files as Fortran files (default is PHP), -# and .f files as C (default is Fortran), use: inc=Fortran f=C. +# language is one of the parsers supported by doxygen: IDL, Java, JavaScript, +# Csharp (C#), C, C++, Lex, D, PHP, md (Markdown), Objective-C, Python, Slice, +# VHDL, Fortran (fixed format Fortran: FortranFixed, free formatted Fortran: +# FortranFree, unknown formatted Fortran: Fortran. In the later case the parser +# tries to guess whether the code is fixed or free formatted code, this is the +# default for Fortran type files). For instance to make doxygen treat .inc files +# as Fortran files (default is PHP), and .f files as C (default is Fortran), +# use: inc=Fortran f=C. # # Note: For files without extension you can use no_extension as a placeholder. # # Note that for custom extensions you also need to set FILE_PATTERNS otherwise -# the files are not read by doxygen. +# the files are not read by doxygen. When specifying no_extension you should add +# * to the FILE_PATTERNS. +# +# Note see also the list of default file extension mappings. EXTENSION_MAPPING = txt=md # If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments # according to the Markdown format, which allows for more readable -# documentation. See http://daringfireball.net/projects/markdown/ for details. +# documentation. See https://daringfireball.net/projects/markdown/ for details. # The output of markdown processing is further processed by doxygen, so you can # mix doxygen, HTML, and XML commands with Markdown formatting. Disable only in # case of backward compatibilities issues. @@ -321,6 +372,15 @@ EXTENSION_MAPPING = txt=md MARKDOWN_SUPPORT = YES +# When the TOC_INCLUDE_HEADINGS tag is set to a non-zero value, all headings up +# to that level are automatically included in the table of contents, even if +# they do not have an id attribute. +# Note: This feature currently applies only to Markdown headings. +# Minimum value: 0, maximum value: 99, default value: 5. +# This tag requires that the tag MARKDOWN_SUPPORT is set to YES. + +TOC_INCLUDE_HEADINGS = 5 + # When enabled doxygen tries to link words that correspond to documented # classes, or namespaces to their corresponding documentation. Such a link can # be prevented in individual cases by putting a % sign in front of the word or @@ -346,7 +406,7 @@ BUILTIN_STL_SUPPORT = YES CPP_CLI_SUPPORT = NO # Set the SIP_SUPPORT tag to YES if your project consists of sip (see: -# http://www.riverbankcomputing.co.uk/software/sip/intro) sources only. Doxygen +# https://www.riverbankcomputing.com/software/sip/intro) sources only. Doxygen # will parse them like normal C++ but will assume all classes use public instead # of private inheritance when no explicit protection keyword is present. # The default value is: NO. @@ -432,6 +492,19 @@ TYPEDEF_HIDES_STRUCT = YES LOOKUP_CACHE_SIZE = 0 +# The NUM_PROC_THREADS specifies the number of threads doxygen is allowed to use +# during processing. When set to 0 doxygen will based this on the number of +# cores available in the system. You can set it explicitly to a value larger +# than 0 to get more control over the balance between CPU load and processing +# speed. At this moment only the input processing can be done using multiple +# threads. Since this is still an experimental feature the default is set to 1, +# which effectively disables parallel processing. Please report any issues you +# encounter. Generating dot graphs in parallel is controlled by the +# DOT_NUM_THREADS setting. +# Minimum value: 0, maximum value: 32, default value: 1. + +NUM_PROC_THREADS = 1 + #--------------------------------------------------------------------------- # Build related configuration options #--------------------------------------------------------------------------- @@ -452,6 +525,12 @@ EXTRACT_ALL = NO EXTRACT_PRIVATE = NO +# If the EXTRACT_PRIV_VIRTUAL tag is set to YES, documented private virtual +# methods of a class will be included in the documentation. +# The default value is: NO. + +EXTRACT_PRIV_VIRTUAL = NO + # If the EXTRACT_PACKAGE tag is set to YES, all members with package or internal # scope will be included in the documentation. # The default value is: NO. @@ -489,6 +568,13 @@ EXTRACT_LOCAL_METHODS = NO EXTRACT_ANON_NSPACES = NO +# If this flag is set to YES, the name of an unnamed parameter in a declaration +# will be determined by the corresponding definition. By default unnamed +# parameters remain unnamed in the output. +# The default value is: YES. + +RESOLVE_UNNAMED_PARAMS = YES + # If the HIDE_UNDOC_MEMBERS tag is set to YES, doxygen will hide all # undocumented members inside documented classes or files. If set to NO these # members will be included in the various overviews, but no documentation @@ -500,14 +586,15 @@ HIDE_UNDOC_MEMBERS = YES # If the HIDE_UNDOC_CLASSES tag is set to YES, doxygen will hide all # undocumented classes that are normally visible in the class hierarchy. If set # to NO, these classes will be included in the various overviews. This option -# has no effect if EXTRACT_ALL is enabled. +# will also hide undocumented C++ concepts if enabled. This option has no effect +# if EXTRACT_ALL is enabled. # The default value is: NO. HIDE_UNDOC_CLASSES = YES # If the HIDE_FRIEND_COMPOUNDS tag is set to YES, doxygen will hide all friend -# (class|struct|union) declarations. If set to NO, these declarations will be -# included in the documentation. +# declarations. If set to NO, these declarations will be included in the +# documentation. # The default value is: NO. HIDE_FRIEND_COMPOUNDS = YES @@ -526,14 +613,22 @@ HIDE_IN_BODY_DOCS = NO INTERNAL_DOCS = NO -# If the CASE_SENSE_NAMES tag is set to NO then doxygen will only generate file -# names in lower-case letters. If set to YES, upper-case letters are also -# allowed. This is useful if you have classes or files whose names only differ -# in case and if your file system supports case sensitive file names. Windows -# and Mac users are advised to set this option to NO. -# The default value is: system dependent. - -CASE_SENSE_NAMES = NO +# With the correct setting of option CASE_SENSE_NAMES doxygen will better be +# able to match the capabilities of the underlying filesystem. In case the +# filesystem is case sensitive (i.e. it supports files in the same directory +# whose names only differ in casing), the option must be set to YES to properly +# deal with such files in case they appear in the input. For filesystems that +# are not case sensitive the option should be set to NO to properly deal with +# output files written for symbols that only differ in casing, such as for two +# classes, one named CLASS and the other named Class, and to also support +# references to files without having to specify the exact matching casing. On +# Windows (including Cygwin) and MacOS, users should typically set this option +# to NO, whereas on Linux or other Unix flavors it should typically be set to +# YES. +# Possible values are: SYSTEM, NO and YES. +# The default value is: SYSTEM. + +CASE_SENSE_NAMES = SYSTEM # If the HIDE_SCOPE_NAMES tag is set to NO then doxygen will show members with # their full class and namespace scopes in the documentation. If set to YES, the @@ -549,6 +644,12 @@ HIDE_SCOPE_NAMES = YES HIDE_COMPOUND_REFERENCE= NO +# If the SHOW_HEADERFILE tag is set to YES then the documentation for a class +# will show which file needs to be included to use the class. +# The default value is: YES. + +SHOW_HEADERFILE = YES + # If the SHOW_INCLUDE_FILES tag is set to YES then doxygen will put a list of # the files that are included by a file in the documentation of that file. # The default value is: YES. @@ -706,7 +807,8 @@ FILE_VERSION_FILTER = # output files in an output format independent way. To create the layout file # that represents doxygen's defaults, run doxygen with the -l option. You can # optionally specify a file name after the option, if omitted DoxygenLayout.xml -# will be used as the name of the layout file. +# will be used as the name of the layout file. See also section "Changing the +# layout of pages" for information. # # Note that if you run doxygen from a directory containing a file called # DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE @@ -717,7 +819,7 @@ LAYOUT_FILE = @OUTPUT_DIRECTORY@/DoxygenLayout.xml # The CITE_BIB_FILES tag can be used to specify one or more bib files containing # the reference definitions. This must be a list of .bib files. The .bib # extension is automatically appended if omitted. This requires the bibtex tool -# to be installed. See also http://en.wikipedia.org/wiki/BibTeX for more info. +# to be installed. See also https://en.wikipedia.org/wiki/BibTeX for more info. # For LaTeX the style of the bibliography can be controlled using # LATEX_BIB_STYLE. To use this feature you need bibtex and perl available in the # search path. See also \cite for info how to create references. @@ -752,34 +854,81 @@ WARNINGS = YES WARN_IF_UNDOCUMENTED = YES # If the WARN_IF_DOC_ERROR tag is set to YES, doxygen will generate warnings for -# potential errors in the documentation, such as not documenting some parameters -# in a documented function, or documenting parameters that don't exist or using -# markup commands wrongly. +# potential errors in the documentation, such as documenting some parameters in +# a documented function twice, or documenting parameters that don't exist or +# using markup commands wrongly. # The default value is: YES. WARN_IF_DOC_ERROR = YES +# If WARN_IF_INCOMPLETE_DOC is set to YES, doxygen will warn about incomplete +# function parameter documentation. If set to NO, doxygen will accept that some +# parameters have no documentation without warning. +# The default value is: YES. + +WARN_IF_INCOMPLETE_DOC = YES + # This WARN_NO_PARAMDOC option can be enabled to get warnings for functions that # are documented, but have no documentation for their parameters or return -# value. If set to NO, doxygen will only warn about wrong or incomplete -# parameter documentation, but not about the absence of documentation. +# value. If set to NO, doxygen will only warn about wrong parameter +# documentation, but not about the absence of documentation. If EXTRACT_ALL is +# set to YES then this flag will automatically be disabled. See also +# WARN_IF_INCOMPLETE_DOC # The default value is: NO. WARN_NO_PARAMDOC = NO +# If WARN_IF_UNDOC_ENUM_VAL option is set to YES, doxygen will warn about +# undocumented enumeration values. If set to NO, doxygen will accept +# undocumented enumeration values. If EXTRACT_ALL is set to YES then this flag +# will automatically be disabled. +# The default value is: NO. + +WARN_IF_UNDOC_ENUM_VAL = NO + +# If the WARN_AS_ERROR tag is set to YES then doxygen will immediately stop when +# a warning is encountered. If the WARN_AS_ERROR tag is set to FAIL_ON_WARNINGS +# then doxygen will continue running as if WARN_AS_ERROR tag is set to NO, but +# at the end of the doxygen process doxygen will return with a non-zero status. +# If the WARN_AS_ERROR tag is set to FAIL_ON_WARNINGS_PRINT then doxygen behaves +# like FAIL_ON_WARNINGS but in case no WARN_LOGFILE is defined doxygen will not +# write the warning messages in between other messages but write them at the end +# of a run, in case a WARN_LOGFILE is defined the warning messages will be +# besides being in the defined file also be shown at the end of a run, unless +# the WARN_LOGFILE is defined as - i.e. standard outpyt (stdout) in that case +# the behavior will remain as with the setting FAIL_ON_WARNINGS. +# Possible values are: NO, YES, FAIL_ON_WARNINGS and FAIL_ON_WARNINGS_PRINT. +# The default value is: NO. + +WARN_AS_ERROR = NO + # The WARN_FORMAT tag determines the format of the warning messages that doxygen # can produce. The string should contain the $file, $line, and $text tags, which # will be replaced by the file and line number from which the warning originated # and the warning text. Optionally the format may contain $version, which will # be replaced by the version of the file (if it could be obtained via # FILE_VERSION_FILTER) +# See also: WARN_LINE_FORMAT # The default value is: $file:$line: $text. WARN_FORMAT = "$file:$line: $text" +# In the $text part of the WARN_FORMAT command it is possible that a reference +# to a more specific place is given. To make it easier to jump to this place +# (outside of doxygen) the user can define a custom "cut" / "paste" string. +# Example: +# WARN_LINE_FORMAT = "'vi $file +$line'" +# See also: WARN_FORMAT +# The default value is: at line $line of file $file. + +WARN_LINE_FORMAT = "at line $line of file $file" + # The WARN_LOGFILE tag can be used to specify a file to which warning and error # messages should be written. If left blank the output is written to standard -# error (stderr). +# error (stderr). In case the file specified cannot be opened for writing the +# warning and error messages are written to standard error. When as file - is +# specified the warning and error messages are written to standard output +# (stdout). WARN_LOGFILE = @@ -798,12 +947,23 @@ INPUT = include doc # This tag can be used to specify the character encoding of the source files # that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses # libiconv (or the iconv built into libc) for the transcoding. See the libiconv -# documentation (see: http://www.gnu.org/software/libiconv) for the list of -# possible encodings. +# documentation (see: +# https://www.gnu.org/software/libiconv/) for the list of possible encodings. +# See also: INPUT_FILE_ENCODING # The default value is: UTF-8. INPUT_ENCODING = UTF-8 +# This tag can be used to specify the character encoding of the source files +# that doxygen parses The INPUT_FILE_ENCODING tag can be used to specify +# character encoding on a per file pattern basis. Doxygen will compare the file +# name with each pattern and apply the encoding instead of the default +# INPUT_ENCODING) if there is a match. The character encodings are a list of the +# form: pattern=encoding (like *.php=ISO-8859-1). See cfg_input_encoding +# "INPUT_ENCODING" for further information on supported encodings. + +INPUT_FILE_ENCODING = + # If the value of the INPUT tag contains directories, you can use the # FILE_PATTERNS tag to specify one or more wildcard patterns (like *.cpp and # *.h) to filter out the source-files in the directories. @@ -812,11 +972,15 @@ INPUT_ENCODING = UTF-8 # need to set EXTENSION_MAPPING for the extension otherwise the files are not # read by doxygen. # +# Note the list of default checked file patterns might differ from the list of +# default file extension mappings. +# # If left blank the following patterns are tested:*.c, *.cc, *.cxx, *.cpp, # *.c++, *.java, *.ii, *.ixx, *.ipp, *.i++, *.inl, *.idl, *.ddl, *.odl, *.h, -# *.hh, *.hxx, *.hpp, *.h++, *.cs, *.d, *.php, *.php4, *.php5, *.phtml, *.inc, -# *.m, *.markdown, *.md, *.mm, *.dox, *.py, *.f90, *.f, *.for, *.tcl, *.vhd, -# *.vhdl, *.ucf, *.qsf, *.as and *.js. +# *.hh, *.hxx, *.hpp, *.h++, *.l, *.cs, *.d, *.php, *.php4, *.php5, *.phtml, +# *.inc, *.m, *.markdown, *.md, *.mm, *.dox (to be provided as doxygen C +# comment), *.py, *.pyw, *.f90, *.f95, *.f03, *.f08, *.f18, *.f, *.for, *.vhd, +# *.vhdl, *.ucf, *.qsf and *.ice. FILE_PATTERNS = *.cc *.c *.h *.txt @@ -855,7 +1019,7 @@ EXCLUDE_PATTERNS = */CMakeLists.txt # (namespaces, classes, functions, etc.) that should be excluded from the # output. The symbol name can be a fully qualified name, a word, or if the # wildcard * is used, a substring. Examples: ANamespace, AClass, -# AClass::ANamespace, ANamespace::*Test +# ANamespace::AClass, ANamespace::*Test # # Note that the wildcards are matched against the file with absolute path, so to # exclude all test directories use the pattern */test/* @@ -902,6 +1066,15 @@ IMAGE_PATH = # Note that the filter must not add or remove lines; it is applied before the # code is scanned, but not when the output code is generated. If lines are added # or removed, the anchors will not be placed correctly. +# +# Note that doxygen will use the data processed and written to standard output +# for further processing, therefore nothing else, like debug statements or used +# commands (so in case of a Windows batch file always use @echo OFF), should be +# written to standard output. +# +# Note that for custom extensions or not directly supported extensions you also +# need to set EXTENSION_MAPPING for the extension otherwise the files are not +# properly processed by doxygen. INPUT_FILTER = @@ -911,6 +1084,10 @@ INPUT_FILTER = # (like *.cpp=my_cpp_filter). See INPUT_FILTER for further information on how # filters are used. If the FILTER_PATTERNS tag is empty or if none of the # patterns match the file name, INPUT_FILTER is applied. +# +# Note that for custom extensions or not directly supported extensions you also +# need to set EXTENSION_MAPPING for the extension otherwise the files are not +# properly processed by doxygen. FILTER_PATTERNS = @@ -936,6 +1113,15 @@ FILTER_SOURCE_PATTERNS = USE_MDFILE_AS_MAINPAGE = doc/index.txt +# The Fortran standard specifies that for fixed formatted Fortran code all +# characters from position 72 are to be considered as comment. A common +# extension is to allow longer lines before the automatic comment starts. The +# setting FORTRAN_COMMENT_AFTER will also make it possible that longer lines can +# be processed before the automatic comment starts. +# Minimum value: 7, maximum value: 10000, default value: 72. + +FORTRAN_COMMENT_AFTER = 72 + #--------------------------------------------------------------------------- # Configuration options related to source browsing #--------------------------------------------------------------------------- @@ -963,7 +1149,7 @@ INLINE_SOURCES = NO STRIP_CODE_COMMENTS = YES # If the REFERENCED_BY_RELATION tag is set to YES then for each documented -# function all documented functions referencing it will be listed. +# entity all documented functions referencing it will be listed. # The default value is: NO. REFERENCED_BY_RELATION = NO @@ -995,12 +1181,12 @@ SOURCE_TOOLTIPS = YES # If the USE_HTAGS tag is set to YES then the references to source code will # point to the HTML generated by the htags(1) tool instead of doxygen built-in # source browser. The htags tool is part of GNU's global source tagging system -# (see http://www.gnu.org/software/global/global.html). You will need version +# (see https://www.gnu.org/software/global/global.html). You will need version # 4.8.6 or higher. # # To use it do the following: # - Install the latest version of global -# - Enable SOURCE_BROWSER and USE_HTAGS in the config file +# - Enable SOURCE_BROWSER and USE_HTAGS in the configuration file # - Make sure the INPUT points to the root of the source tree # - Run doxygen as normal # @@ -1023,15 +1209,26 @@ USE_HTAGS = NO VERBATIM_HEADERS = YES # If the CLANG_ASSISTED_PARSING tag is set to YES then doxygen will use the -# clang parser (see: http://clang.llvm.org/) for more accurate parsing at the -# cost of reduced performance. This can be particularly helpful with template -# rich C++ code for which doxygen's built-in parser lacks the necessary type -# information. +# clang parser (see: +# http://clang.llvm.org/) for more accurate parsing at the cost of reduced +# performance. This can be particularly helpful with template rich C++ code for +# which doxygen's built-in parser lacks the necessary type information. # Note: The availability of this option depends on whether or not doxygen was -# compiled with the --with-libclang option. +# generated with the -Duse_libclang=ON option for CMake. # The default value is: NO. -CLANG_ASSISTED_PARSING = NO +# Note: I could not make it work, triggers errors like below +# > error: /usr/include/wchar.h:35:10: fatal error: 'stddef.h' file not found [clang] + +CLANG_ASSISTED_PARSING = YES + +# If the CLANG_ASSISTED_PARSING tag is set to YES and the CLANG_ADD_INC_PATHS +# tag is set to YES then doxygen will add the directory of each input to the +# include path. +# The default value is: YES. +# This tag requires that the tag CLANG_ASSISTED_PARSING is set to YES. + +CLANG_ADD_INC_PATHS = YES # If clang assisted parsing is enabled you can provide the compiler with command # line options that you would normally use when invoking the compiler. Note that @@ -1041,6 +1238,19 @@ CLANG_ASSISTED_PARSING = NO #CLANG_OPTIONS = -Wno-unknown-pragmas +# If clang assisted parsing is enabled you can provide the clang parser with the +# path to the directory containing a file called compile_commands.json. This +# file is the compilation database (see: +# http://clang.llvm.org/docs/HowToSetupToolingForLLVM.html) containing the +# options used when the source files were built. This is equivalent to +# specifying the -p option to a clang tool, such as clang-check. These options +# will then be passed to the parser. Any options specified with CLANG_OPTIONS +# will be added as well. +# Note: The availability of this option depends on whether or not doxygen was +# generated with the -Duse_libclang=ON option for CMake. + +CLANG_DATABASE_PATH = + #--------------------------------------------------------------------------- # Configuration options related to the alphabetical class index #--------------------------------------------------------------------------- @@ -1052,17 +1262,11 @@ CLANG_ASSISTED_PARSING = NO ALPHABETICAL_INDEX = YES -# The COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns in -# which the alphabetical index list will be split. -# Minimum value: 1, maximum value: 20, default value: 5. -# This tag requires that the tag ALPHABETICAL_INDEX is set to YES. - -COLS_IN_ALPHA_INDEX = 5 - -# In case all classes in a project start with a common prefix, all classes will -# be put under the same header in the alphabetical index. The IGNORE_PREFIX tag -# can be used to specify a prefix (or a list of prefixes) that should be ignored -# while generating the index headers. +# The IGNORE_PREFIX tag can be used to specify a prefix (or a list of prefixes) +# that should be ignored while generating the index headers. The IGNORE_PREFIX +# tag works for classes, function and member names. The entity will be placed in +# the alphabetical list under the first letter of the entity name that remains +# after removing the prefix. # This tag requires that the tag ALPHABETICAL_INDEX is set to YES. IGNORE_PREFIX = mysqlx_ @@ -1141,7 +1345,12 @@ HTML_STYLESHEET = # Doxygen will copy the style sheet files to the output directory. # Note: The order of the extra style sheet files is of importance (e.g. the last # style sheet in the list overrules the setting of the previous ones in the -# list). For an example see the documentation. +# list). +# Note: Since the styling of scrollbars can currently not be overruled in +# Webkit/Chromium, the styling will be left out of the default doxygen.css if +# one or more extra stylesheets have been specified. So if scrollbar +# customization is desired it has to be added explicitly. For an example see the +# documentation. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_EXTRA_STYLESHEET = @@ -1156,10 +1365,23 @@ HTML_EXTRA_STYLESHEET = HTML_EXTRA_FILES = +# The HTML_COLORSTYLE tag can be used to specify if the generated HTML output +# should be rendered with a dark or light theme. +# Possible values are: LIGHT always generate light mode output, DARK always +# generate dark mode output, AUTO_LIGHT automatically set the mode according to +# the user preference, use light mode if no preference is set (the default), +# AUTO_DARK automatically set the mode according to the user preference, use +# dark mode if no preference is set and TOGGLE allow to user to switch between +# light and dark mode via a button. +# The default value is: AUTO_LIGHT. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_COLORSTYLE = AUTO_LIGHT + # The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen # will adjust the colors in the style sheet and background images according to -# this color. Hue is specified as an angle on a colorwheel, see -# http://en.wikipedia.org/wiki/Hue for more information. For instance the value +# this color. Hue is specified as an angle on a color-wheel, see +# https://en.wikipedia.org/wiki/Hue for more information. For instance the value # 0 represents red, 60 is yellow, 120 is green, 180 is cyan, 240 is blue, 300 # purple, and 360 is red again. # Minimum value: 0, maximum value: 359, default value: 220. @@ -1168,7 +1390,7 @@ HTML_EXTRA_FILES = HTML_COLORSTYLE_HUE = 220 # The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of the colors -# in the HTML output. For a value of 0 the output will use grayscales only. A +# in the HTML output. For a value of 0 the output will use gray-scales only. A # value of 255 will produce the most vivid colors. # Minimum value: 0, maximum value: 255, default value: 100. # This tag requires that the tag GENERATE_HTML is set to YES. @@ -1195,6 +1417,17 @@ HTML_COLORSTYLE_GAMMA = 80 HTML_TIMESTAMP = YES +# If the HTML_DYNAMIC_MENUS tag is set to YES then the generated HTML +# documentation will contain a main index with vertical navigation menus that +# are dynamically created via JavaScript. If disabled, the navigation index will +# consists of multiple levels of tabs that are statically embedded in every HTML +# page. Disable this option to support browsers that do not have JavaScript, +# like the Qt help browser. +# The default value is: YES. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_DYNAMIC_MENUS = YES + # If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML # documentation will contain sections that can be hidden and shown after the # page has loaded. @@ -1218,13 +1451,14 @@ HTML_INDEX_NUM_ENTRIES = 100 # If the GENERATE_DOCSET tag is set to YES, additional index files will be # generated that can be used as input for Apple's Xcode 3 integrated development -# environment (see: http://developer.apple.com/tools/xcode/), introduced with -# OSX 10.5 (Leopard). To create a documentation set, doxygen will generate a -# Makefile in the HTML output directory. Running make will produce the docset in -# that directory and running make install will install the docset in +# environment (see: +# https://developer.apple.com/xcode/), introduced with OSX 10.5 (Leopard). To +# create a documentation set, doxygen will generate a Makefile in the HTML +# output directory. Running make will produce the docset in that directory and +# running make install will install the docset in # ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find it at -# startup. See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html -# for more information. +# startup. See https://developer.apple.com/library/archive/featuredarticles/Doxy +# genXcode/_index.html for more information. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. @@ -1238,6 +1472,13 @@ GENERATE_DOCSET = NO DOCSET_FEEDNAME = "Doxygen generated docs" +# This tag determines the URL of the docset feed. A documentation feed provides +# an umbrella under which multiple documentation sets from a single provider +# (such as a company or product suite) can be grouped. +# This tag requires that the tag GENERATE_DOCSET is set to YES. + +DOCSET_FEEDURL = + # This tag specifies a string that should uniquely identify the documentation # set bundle. This should be a reverse domain-name style string, e.g. # com.mycompany.MyDocSet. Doxygen will append .docset to the name. @@ -1263,8 +1504,12 @@ DOCSET_PUBLISHER_NAME = Publisher # If the GENERATE_HTMLHELP tag is set to YES then doxygen generates three # additional HTML index files: index.hhp, index.hhc, and index.hhk. The # index.hhp is a project file that can be read by Microsoft's HTML Help Workshop -# (see: http://www.microsoft.com/en-us/download/details.aspx?id=21138) on -# Windows. +# on Windows. In the beginning of 2021 Microsoft took the original page, with +# a.o. the download links, offline the HTML help workshop was already many years +# in maintenance mode). You can download the HTML help workshop from the web +# archives at Installation executable (see: +# http://web.archive.org/web/20160201063255/http://download.microsoft.com/downlo +# ad/0/A/9/0A939EF6-E31C-430F-A3DF-DFAE7960D564/htmlhelp.exe). # # The HTML Help Workshop contains a compiler that can convert all HTML output # generated by doxygen into a single compiled HTML file (.chm). Compiled HTML @@ -1294,7 +1539,7 @@ CHM_FILE = HHC_LOCATION = # The GENERATE_CHI flag controls if a separate .chi index file is generated -# (YES) or that it should be included in the master .chm file (NO). +# (YES) or that it should be included in the main .chm file (NO). # The default value is: NO. # This tag requires that the tag GENERATE_HTMLHELP is set to YES. @@ -1339,7 +1584,8 @@ QCH_FILE = # The QHP_NAMESPACE tag specifies the namespace to use when generating Qt Help # Project output. For more information please see Qt Help Project / Namespace -# (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#namespace). +# (see: +# https://doc.qt.io/archives/qt-4.8/qthelpproject.html#namespace). # The default value is: org.doxygen.Project. # This tag requires that the tag GENERATE_QHP is set to YES. @@ -1347,8 +1593,8 @@ QHP_NAMESPACE = org.doxygen.Project # The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating Qt # Help Project output. For more information please see Qt Help Project / Virtual -# Folders (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#virtual- -# folders). +# Folders (see: +# https://doc.qt.io/archives/qt-4.8/qthelpproject.html#virtual-folders). # The default value is: doc. # This tag requires that the tag GENERATE_QHP is set to YES. @@ -1356,30 +1602,30 @@ QHP_VIRTUAL_FOLDER = doc # If the QHP_CUST_FILTER_NAME tag is set, it specifies the name of a custom # filter to add. For more information please see Qt Help Project / Custom -# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom- -# filters). +# Filters (see: +# https://doc.qt.io/archives/qt-4.8/qthelpproject.html#custom-filters). # This tag requires that the tag GENERATE_QHP is set to YES. QHP_CUST_FILTER_NAME = # The QHP_CUST_FILTER_ATTRS tag specifies the list of the attributes of the # custom filter to add. For more information please see Qt Help Project / Custom -# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom- -# filters). +# Filters (see: +# https://doc.qt.io/archives/qt-4.8/qthelpproject.html#custom-filters). # This tag requires that the tag GENERATE_QHP is set to YES. QHP_CUST_FILTER_ATTRS = # The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this # project's filter section matches. Qt Help Project / Filter Attributes (see: -# http://qt-project.org/doc/qt-4.8/qthelpproject.html#filter-attributes). +# https://doc.qt.io/archives/qt-4.8/qthelpproject.html#filter-attributes). # This tag requires that the tag GENERATE_QHP is set to YES. QHP_SECT_FILTER_ATTRS = -# The QHG_LOCATION tag can be used to specify the location of Qt's -# qhelpgenerator. If non-empty doxygen will try to run qhelpgenerator on the -# generated .qhp file. +# The QHG_LOCATION tag can be used to specify the location (absolute path +# including file name) of Qt's qhelpgenerator. If non-empty doxygen will try to +# run qhelpgenerator on the generated .qhp file. # This tag requires that the tag GENERATE_QHP is set to YES. QHG_LOCATION = @@ -1422,16 +1668,28 @@ DISABLE_INDEX = NO # to work a browser that supports JavaScript, DHTML, CSS and frames is required # (i.e. any modern browser). Windows users are probably better off using the # HTML help feature. Via custom style sheets (see HTML_EXTRA_STYLESHEET) one can -# further fine-tune the look of the index. As an example, the default style -# sheet generated by doxygen has an example that shows how to put an image at -# the root of the tree instead of the PROJECT_NAME. Since the tree basically has -# the same information as the tab index, you could consider setting -# DISABLE_INDEX to YES when enabling this option. +# further fine tune the look of the index (see "Fine-tuning the output"). As an +# example, the default style sheet generated by doxygen has an example that +# shows how to put an image at the root of the tree instead of the PROJECT_NAME. +# Since the tree basically has the same information as the tab index, you could +# consider setting DISABLE_INDEX to YES when enabling this option. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. GENERATE_TREEVIEW = NO +# When both GENERATE_TREEVIEW and DISABLE_INDEX are set to YES, then the +# FULL_SIDEBAR option determines if the side bar is limited to only the treeview +# area (value NO) or if it should extend to the full height of the window (value +# YES). Setting this to YES gives a layout similar to +# https://docs.readthedocs.io with more room for contents, but less room for the +# project logo, title, and description. If either GENERATE_TREEVIEW or +# DISABLE_INDEX is set to NO, this option has no effect. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +FULL_SIDEBAR = NO + # The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values that # doxygen will group on one line in the generated HTML documentation. # @@ -1456,6 +1714,24 @@ TREEVIEW_WIDTH = 250 EXT_LINKS_IN_WINDOW = NO +# If the OBFUSCATE_EMAILS tag is set to YES, doxygen will obfuscate email +# addresses. +# The default value is: YES. +# This tag requires that the tag GENERATE_HTML is set to YES. + +OBFUSCATE_EMAILS = YES + +# If the HTML_FORMULA_FORMAT option is set to svg, doxygen will use the pdf2svg +# tool (see https://github.com/dawbarton/pdf2svg) or inkscape (see +# https://inkscape.org) to generate formulas as SVG images instead of PNGs for +# the HTML output. These images will generally look nicer at scaled resolutions. +# Possible values are: png (the default) and svg (looks nicer but requires the +# pdf2svg or inkscape tool). +# The default value is: png. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_FORMULA_FORMAT = png + # Use this tag to change the font size of LaTeX formulas included as images in # the HTML documentation. When you change the font size after a successful # doxygen run you need to manually remove any form_*.png images from the HTML @@ -1465,19 +1741,14 @@ EXT_LINKS_IN_WINDOW = NO FORMULA_FONTSIZE = 10 -# Use the FORMULA_TRANPARENT tag to determine whether or not the images -# generated for formulas are transparent PNGs. Transparent PNGs are not -# supported properly for IE 6.0, but are supported on all modern browsers. -# -# Note that when changing this option you need to delete any form_*.png files in -# the HTML output directory before the changes have effect. -# The default value is: YES. -# This tag requires that the tag GENERATE_HTML is set to YES. +# The FORMULA_MACROFILE can contain LaTeX \newcommand and \renewcommand commands +# to create new LaTeX commands to be used in formulas as building blocks. See +# the section "Including formulas" for details. -FORMULA_TRANSPARENT = YES +FORMULA_MACROFILE = # Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see -# http://www.mathjax.org) which uses client side Javascript for the rendering +# https://www.mathjax.org) which uses client side JavaScript for the rendering # instead of using pre-rendered bitmaps. Use this if you do not have LaTeX # installed or if you want to formulas look prettier in the HTML output. When # enabled you may also need to install MathJax separately and configure the path @@ -1487,11 +1758,29 @@ FORMULA_TRANSPARENT = YES USE_MATHJAX = NO +# With MATHJAX_VERSION it is possible to specify the MathJax version to be used. +# Note that the different versions of MathJax have different requirements with +# regards to the different settings, so it is possible that also other MathJax +# settings have to be changed when switching between the different MathJax +# versions. +# Possible values are: MathJax_2 and MathJax_3. +# The default value is: MathJax_2. +# This tag requires that the tag USE_MATHJAX is set to YES. + +MATHJAX_VERSION = MathJax_2 + # When MathJax is enabled you can set the default output format to be used for -# the MathJax output. See the MathJax site (see: -# http://docs.mathjax.org/en/latest/output.html) for more details. +# the MathJax output. For more details about the output format see MathJax +# version 2 (see: +# http://docs.mathjax.org/en/v2.7-latest/output.html) and MathJax version 3 +# (see: +# http://docs.mathjax.org/en/latest/web/components/output.html). # Possible values are: HTML-CSS (which is slower, but has the best -# compatibility), NativeMML (i.e. MathML) and SVG. +# compatibility. This is the name for Mathjax version 2, for MathJax version 3 +# this will be translated into chtml), NativeMML (i.e. MathML. Only supported +# for NathJax 2. For MathJax version 3 chtml will be used instead.), chtml (This +# is the name for Mathjax version 3, for MathJax version 2 this will be +# translated into HTML-CSS) and SVG. # The default value is: HTML-CSS. # This tag requires that the tag USE_MATHJAX is set to YES. @@ -1504,22 +1793,29 @@ MATHJAX_FORMAT = HTML-CSS # MATHJAX_RELPATH should be ../mathjax. The default value points to the MathJax # Content Delivery Network so you can quickly see the result without installing # MathJax. However, it is strongly recommended to install a local copy of -# MathJax from http://www.mathjax.org before deployment. -# The default value is: http://cdn.mathjax.org/mathjax/latest. +# MathJax from https://www.mathjax.org before deployment. The default value is: +# - in case of MathJax version 2: https://cdn.jsdelivr.net/npm/mathjax@2 +# - in case of MathJax version 3: https://cdn.jsdelivr.net/npm/mathjax@3 # This tag requires that the tag USE_MATHJAX is set to YES. -MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest +MATHJAX_RELPATH = # The MATHJAX_EXTENSIONS tag can be used to specify one or more MathJax # extension names that should be enabled during MathJax rendering. For example +# for MathJax version 2 (see +# https://docs.mathjax.org/en/v2.7-latest/tex.html#tex-and-latex-extensions): # MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols +# For example for MathJax version 3 (see +# http://docs.mathjax.org/en/latest/input/tex/extensions/index.html): +# MATHJAX_EXTENSIONS = ams # This tag requires that the tag USE_MATHJAX is set to YES. MATHJAX_EXTENSIONS = # The MATHJAX_CODEFILE tag can be used to specify a file with javascript pieces # of code that will be used on startup of the MathJax code. See the MathJax site -# (see: http://docs.mathjax.org/en/latest/output.html) for more details. For an +# (see: +# http://docs.mathjax.org/en/v2.7-latest/output.html) for more details. For an # example see the documentation. # This tag requires that the tag USE_MATHJAX is set to YES. @@ -1547,7 +1843,7 @@ MATHJAX_CODEFILE = SEARCHENGINE = YES # When the SERVER_BASED_SEARCH tag is enabled the search engine will be -# implemented using a web server instead of a web client using Javascript. There +# implemented using a web server instead of a web client using JavaScript. There # are two flavors of web server based searching depending on the EXTERNAL_SEARCH # setting. When disabled, doxygen will generate a PHP script for searching and # an index file used by the script. When EXTERNAL_SEARCH is enabled the indexing @@ -1566,7 +1862,8 @@ SERVER_BASED_SEARCH = NO # # Doxygen ships with an example indexer (doxyindexer) and search engine # (doxysearch.cgi) which are based on the open source search engine library -# Xapian (see: http://xapian.org/). +# Xapian (see: +# https://xapian.org/). # # See the section "External Indexing and Searching" for details. # The default value is: NO. @@ -1579,8 +1876,9 @@ EXTERNAL_SEARCH = NO # # Doxygen ships with an example indexer (doxyindexer) and search engine # (doxysearch.cgi) which are based on the open source search engine library -# Xapian (see: http://xapian.org/). See the section "External Indexing and -# Searching" for details. +# Xapian (see: +# https://xapian.org/). See the section "External Indexing and Searching" for +# details. # This tag requires that the tag SEARCHENGINE is set to YES. SEARCHENGINE_URL = @@ -1631,21 +1929,35 @@ LATEX_OUTPUT = latex # The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be # invoked. # -# Note that when enabling USE_PDFLATEX this option is only used for generating -# bitmaps for formulas in the HTML output, but not in the Makefile that is -# written to the output directory. -# The default file is: latex. +# Note that when not enabling USE_PDFLATEX the default is latex when enabling +# USE_PDFLATEX the default is pdflatex and when in the later case latex is +# chosen this is overwritten by pdflatex. For specific output languages the +# default can have been set differently, this depends on the implementation of +# the output language. # This tag requires that the tag GENERATE_LATEX is set to YES. -LATEX_CMD_NAME = latex +LATEX_CMD_NAME = # The MAKEINDEX_CMD_NAME tag can be used to specify the command name to generate # index for LaTeX. +# Note: This tag is used in the Makefile / make.bat. +# See also: LATEX_MAKEINDEX_CMD for the part in the generated output file +# (.tex). # The default file is: makeindex. # This tag requires that the tag GENERATE_LATEX is set to YES. MAKEINDEX_CMD_NAME = makeindex +# The LATEX_MAKEINDEX_CMD tag can be used to specify the command name to +# generate index for LaTeX. In case there is no backslash (\) as first character +# it will be automatically added in the LaTeX code. +# Note: This tag is used in the generated output file (.tex). +# See also: MAKEINDEX_CMD_NAME for the part in the Makefile / make.bat. +# The default value is: makeindex. +# This tag requires that the tag GENERATE_LATEX is set to YES. + +LATEX_MAKEINDEX_CMD = makeindex + # If the COMPACT_LATEX tag is set to YES, doxygen generates more compact LaTeX # documents. This may be useful for small projects and may help to save some # trees in general. @@ -1675,29 +1987,31 @@ PAPER_TYPE = a4 EXTRA_PACKAGES = -# The LATEX_HEADER tag can be used to specify a personal LaTeX header for the -# generated LaTeX document. The header should contain everything until the first -# chapter. If it is left blank doxygen will generate a standard header. See -# section "Doxygen usage" for information on how to let doxygen write the -# default header to a separate file. +# The LATEX_HEADER tag can be used to specify a user-defined LaTeX header for +# the generated LaTeX document. The header should contain everything until the +# first chapter. If it is left blank doxygen will generate a standard header. It +# is highly recommended to start with a default header using +# doxygen -w latex new_header.tex new_footer.tex new_stylesheet.sty +# and then modify the file new_header.tex. See also section "Doxygen usage" for +# information on how to generate the default header that doxygen normally uses. # -# Note: Only use a user-defined header if you know what you are doing! The -# following commands have a special meaning inside the header: $title, -# $datetime, $date, $doxygenversion, $projectname, $projectnumber, -# $projectbrief, $projectlogo. Doxygen will replace $title with the empty -# string, for the replacement values of the other commands the user is referred -# to HTML_HEADER. +# Note: Only use a user-defined header if you know what you are doing! +# Note: The header is subject to change so you typically have to regenerate the +# default header when upgrading to a newer version of doxygen. The following +# commands have a special meaning inside the header (and footer): For a +# description of the possible markers and block names see the documentation. # This tag requires that the tag GENERATE_LATEX is set to YES. LATEX_HEADER = -# The LATEX_FOOTER tag can be used to specify a personal LaTeX footer for the -# generated LaTeX document. The footer should contain everything after the last -# chapter. If it is left blank doxygen will generate a standard footer. See +# The LATEX_FOOTER tag can be used to specify a user-defined LaTeX footer for +# the generated LaTeX document. The footer should contain everything after the +# last chapter. If it is left blank doxygen will generate a standard footer. See # LATEX_HEADER for more information on how to generate a default footer and what -# special commands can be used inside the footer. -# -# Note: Only use a user-defined footer if you know what you are doing! +# special commands can be used inside the footer. See also section "Doxygen +# usage" for information on how to generate the default footer that doxygen +# normally uses. Note: Only use a user-defined footer if you know what you are +# doing! # This tag requires that the tag GENERATE_LATEX is set to YES. LATEX_FOOTER = @@ -1730,9 +2044,11 @@ LATEX_EXTRA_FILES = PDF_HYPERLINKS = YES -# If the USE_PDFLATEX tag is set to YES, doxygen will use pdflatex to generate -# the PDF file directly from the LaTeX files. Set this option to YES, to get a -# higher quality PDF documentation. +# If the USE_PDFLATEX tag is set to YES, doxygen will use the engine as +# specified with LATEX_CMD_NAME to generate the PDF file directly from the LaTeX +# files. Set this option to YES, to get a higher quality PDF documentation. +# +# See also section LATEX_CMD_NAME for selecting the engine. # The default value is: YES. # This tag requires that the tag GENERATE_LATEX is set to YES. @@ -1740,8 +2056,7 @@ USE_PDFLATEX = YES # If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \batchmode # command to the generated LaTeX files. This will instruct LaTeX to keep running -# if errors occur, instead of asking the user for help. This option is also used -# when generating formulas in HTML. +# if errors occur, instead of asking the user for help. # The default value is: NO. # This tag requires that the tag GENERATE_LATEX is set to YES. @@ -1754,24 +2069,30 @@ LATEX_BATCHMODE = NO LATEX_HIDE_INDICES = NO -# If the LATEX_SOURCE_CODE tag is set to YES then doxygen will include source -# code with syntax highlighting in the LaTeX output. -# -# Note that which sources are shown also depends on other settings such as -# SOURCE_BROWSER. -# The default value is: NO. -# This tag requires that the tag GENERATE_LATEX is set to YES. - -LATEX_SOURCE_CODE = NO - # The LATEX_BIB_STYLE tag can be used to specify the style to use for the # bibliography, e.g. plainnat, or ieeetr. See -# http://en.wikipedia.org/wiki/BibTeX and \cite for more info. +# https://en.wikipedia.org/wiki/BibTeX and \cite for more info. # The default value is: plain. # This tag requires that the tag GENERATE_LATEX is set to YES. LATEX_BIB_STYLE = plain +# If the LATEX_TIMESTAMP tag is set to YES then the footer of each generated +# page will contain the date and time when the page was generated. Setting this +# to NO can help when comparing the output of multiple runs. +# The default value is: NO. +# This tag requires that the tag GENERATE_LATEX is set to YES. + +LATEX_TIMESTAMP = NO + +# The LATEX_EMOJI_DIRECTORY tag is used to specify the (relative or absolute) +# path from which the emoji images will be read. If a relative path is entered, +# it will be relative to the LATEX_OUTPUT directory. If left blank the +# LATEX_OUTPUT directory will be used. +# This tag requires that the tag GENERATE_LATEX is set to YES. + +LATEX_EMOJI_DIRECTORY = + #--------------------------------------------------------------------------- # Configuration options related to the RTF output #--------------------------------------------------------------------------- @@ -1811,9 +2132,9 @@ COMPACT_RTF = NO RTF_HYPERLINKS = NO -# Load stylesheet definitions from file. Syntax is similar to doxygen's config -# file, i.e. a series of assignments. You only have to provide replacements, -# missing definitions are set to their default value. +# Load stylesheet definitions from file. Syntax is similar to doxygen's +# configuration file, i.e. a series of assignments. You only have to provide +# replacements, missing definitions are set to their default value. # # See also section "Doxygen usage" for information on how to generate the # default style sheet that doxygen normally uses. @@ -1822,22 +2143,12 @@ RTF_HYPERLINKS = NO RTF_STYLESHEET_FILE = # Set optional variables used in the generation of an RTF document. Syntax is -# similar to doxygen's config file. A template extensions file can be generated -# using doxygen -e rtf extensionFile. +# similar to doxygen's configuration file. A template extensions file can be +# generated using doxygen -e rtf extensionFile. # This tag requires that the tag GENERATE_RTF is set to YES. RTF_EXTENSIONS_FILE = -# If the RTF_SOURCE_CODE tag is set to YES then doxygen will include source code -# with syntax highlighting in the RTF output. -# -# Note that which sources are shown also depends on other settings such as -# SOURCE_BROWSER. -# The default value is: NO. -# This tag requires that the tag GENERATE_RTF is set to YES. - -RTF_SOURCE_CODE = NO - #--------------------------------------------------------------------------- # Configuration options related to the man page output #--------------------------------------------------------------------------- @@ -1890,7 +2201,7 @@ MAN_LINKS = NO # captures the structure of the code including all documentation. # The default value is: NO. -GENERATE_XML = No +GENERATE_XML = NO # The XML_OUTPUT tag is used to specify where the XML pages will be put. If a # relative path is entered the value of OUTPUT_DIRECTORY will be put in front of @@ -1909,6 +2220,13 @@ XML_OUTPUT = xml XML_PROGRAMLISTING = YES +# If the XML_NS_MEMB_FILE_SCOPE tag is set to YES, doxygen will include +# namespace members in file scope as well, matching the HTML output. +# The default value is: NO. +# This tag requires that the tag GENERATE_XML is set to YES. + +XML_NS_MEMB_FILE_SCOPE = NO + #--------------------------------------------------------------------------- # Configuration options related to the DOCBOOK output #--------------------------------------------------------------------------- @@ -1927,23 +2245,14 @@ GENERATE_DOCBOOK = NO DOCBOOK_OUTPUT = docbook -# If the DOCBOOK_PROGRAMLISTING tag is set to YES, doxygen will include the -# program listings (including syntax highlighting and cross-referencing -# information) to the DOCBOOK output. Note that enabling this will significantly -# increase the size of the DOCBOOK output. -# The default value is: NO. -# This tag requires that the tag GENERATE_DOCBOOK is set to YES. - -DOCBOOK_PROGRAMLISTING = NO - #--------------------------------------------------------------------------- # Configuration options for the AutoGen Definitions output #--------------------------------------------------------------------------- # If the GENERATE_AUTOGEN_DEF tag is set to YES, doxygen will generate an -# AutoGen Definitions (see http://autogen.sf.net) file that captures the -# structure of the code including all documentation. Note that this feature is -# still experimental and incomplete at the moment. +# AutoGen Definitions (see http://autogen.sourceforge.net/) file that captures +# the structure of the code including all documentation. Note that this feature +# is still experimental and incomplete at the moment. # The default value is: NO. GENERATE_AUTOGEN_DEF = NO @@ -2022,7 +2331,8 @@ SEARCH_INCLUDES = YES # The INCLUDE_PATH tag can be used to specify one or more directories that # contain include files that are not input files but should be processed by the -# preprocessor. +# preprocessor. Note that the INCLUDE_PATH is not recursive, so the setting of +# RECURSIVE has no effect here. # This tag requires that the tag SEARCH_INCLUDES is set to YES. INCLUDE_PATH = @@ -2110,34 +2420,10 @@ EXTERNAL_GROUPS = YES EXTERNAL_PAGES = YES -# The PERL_PATH should be the absolute path and name of the perl script -# interpreter (i.e. the result of 'which perl'). -# The default file (with absolute path) is: /usr/bin/perl. - -PERL_PATH = /usr/bin/perl - #--------------------------------------------------------------------------- # Configuration options related to the dot tool #--------------------------------------------------------------------------- -# If the CLASS_DIAGRAMS tag is set to YES, doxygen will generate a class diagram -# (in HTML and LaTeX) for classes with base or super classes. Setting the tag to -# NO turns the diagrams off. Note that this option also works with HAVE_DOT -# disabled, but it is recommended to install and use dot, since it yields more -# powerful graphs. -# The default value is: YES. - -CLASS_DIAGRAMS = YES - -# You can define message sequence charts within doxygen comments using the \msc -# command. Doxygen will then run the mscgen tool (see: -# http://www.mcternan.me.uk/mscgen/)) to produce the chart and insert it in the -# documentation. The MSCGEN_PATH tag allows you to specify the directory where -# the mscgen tool resides. If left empty the tool is assumed to be found in the -# default search path. - -MSCGEN_PATH = - # You can include diagrams made with dia in doxygen documentation. Doxygen will # then run dia to produce the diagram and insert it in the documentation. The # DIA_PATH tag allows you to specify the directory where the dia binary resides. @@ -2170,35 +2456,50 @@ HAVE_DOT = NO DOT_NUM_THREADS = 0 -# When you want a differently looking font in the dot files that doxygen -# generates you can specify the font name using DOT_FONTNAME. You need to make -# sure dot is able to find the font, which can be done by putting it in a -# standard location or by setting the DOTFONTPATH environment variable or by -# setting DOT_FONTPATH to the directory containing the font. -# The default value is: Helvetica. +# DOT_COMMON_ATTR is common attributes for nodes, edges and labels of +# subgraphs. When you want a differently looking font in the dot files that +# doxygen generates you can specify fontname, fontcolor and fontsize attributes. +# For details please see Node, +# Edge and Graph Attributes specification You need to make sure dot is able +# to find the font, which can be done by putting it in a standard location or by +# setting the DOTFONTPATH environment variable or by setting DOT_FONTPATH to the +# directory containing the font. Default graphviz fontsize is 14. +# The default value is: fontname=Helvetica,fontsize=10. +# This tag requires that the tag HAVE_DOT is set to YES. + +DOT_COMMON_ATTR = "fontname=Helvetica,fontsize=10" + +# DOT_EDGE_ATTR is concatenated with DOT_COMMON_ATTR. For elegant style you can +# add 'arrowhead=open, arrowtail=open, arrowsize=0.5'. Complete documentation about +# arrows shapes. +# The default value is: labelfontname=Helvetica,labelfontsize=10. # This tag requires that the tag HAVE_DOT is set to YES. -DOT_FONTNAME = Helvetica +DOT_EDGE_ATTR = "labelfontname=Helvetica,labelfontsize=10" -# The DOT_FONTSIZE tag can be used to set the size (in points) of the font of -# dot graphs. -# Minimum value: 4, maximum value: 24, default value: 10. +# DOT_NODE_ATTR is concatenated with DOT_COMMON_ATTR. For view without boxes +# around nodes set 'shape=plain' or 'shape=plaintext' Shapes specification +# The default value is: shape=box,height=0.2,width=0.4. # This tag requires that the tag HAVE_DOT is set to YES. -DOT_FONTSIZE = 10 +DOT_NODE_ATTR = "shape=box,height=0.2,width=0.4" -# By default doxygen will tell dot to use the default font as specified with -# DOT_FONTNAME. If you specify a different font using DOT_FONTNAME you can set -# the path where dot can find it using this tag. +# You can set the path where dot can find font specified with fontname in +# DOT_COMMON_ATTR and others dot attributes. # This tag requires that the tag HAVE_DOT is set to YES. DOT_FONTPATH = -# If the CLASS_GRAPH tag is set to YES then doxygen will generate a graph for -# each documented class showing the direct and indirect inheritance relations. -# Setting this tag to YES will force the CLASS_DIAGRAMS tag to NO. +# If the CLASS_GRAPH tag is set to YES (or GRAPH) then doxygen will generate a +# graph for each documented class showing the direct and indirect inheritance +# relations. In case HAVE_DOT is set as well dot will be used to draw the graph, +# otherwise the built-in generator will be used. If the CLASS_GRAPH tag is set +# to TEXT the direct and indirect inheritance relations will be shown as texts / +# links. +# Possible values are: NO, YES, TEXT and GRAPH. # The default value is: YES. -# This tag requires that the tag HAVE_DOT is set to YES. CLASS_GRAPH = NO @@ -2212,7 +2513,8 @@ CLASS_GRAPH = NO COLLABORATION_GRAPH = NO # If the GROUP_GRAPHS tag is set to YES then doxygen will generate a graph for -# groups, showing the direct groups dependencies. +# groups, showing the direct groups dependencies. See also the chapter Grouping +# in the manual. # The default value is: YES. # This tag requires that the tag HAVE_DOT is set to YES. @@ -2235,10 +2537,32 @@ UML_LOOK = NO # but if the number exceeds 15, the total amount of fields shown is limited to # 10. # Minimum value: 0, maximum value: 100, default value: 10. -# This tag requires that the tag HAVE_DOT is set to YES. +# This tag requires that the tag UML_LOOK is set to YES. UML_LIMIT_NUM_FIELDS = 10 +# If the DOT_UML_DETAILS tag is set to NO, doxygen will show attributes and +# methods without types and arguments in the UML graphs. If the DOT_UML_DETAILS +# tag is set to YES, doxygen will add type and arguments for attributes and +# methods in the UML graphs. If the DOT_UML_DETAILS tag is set to NONE, doxygen +# will not generate fields with class member information in the UML graphs. The +# class diagrams will look similar to the default class diagrams but using UML +# notation for the relationships. +# Possible values are: NO, YES and NONE. +# The default value is: NO. +# This tag requires that the tag UML_LOOK is set to YES. + +DOT_UML_DETAILS = NO + +# The DOT_WRAP_THRESHOLD tag can be used to set the maximum number of characters +# to display on a single line. If the actual line length exceeds this threshold +# significantly it will wrapped across multiple lines. Some heuristics are apply +# to avoid ugly line breaks. +# Minimum value: 0, maximum value: 1000, default value: 17. +# This tag requires that the tag HAVE_DOT is set to YES. + +DOT_WRAP_THRESHOLD = 17 + # If the TEMPLATE_RELATIONS tag is set to YES then the inheritance and # collaboration graphs will show the relations between templates and their # instances. @@ -2305,6 +2629,13 @@ GRAPHICAL_HIERARCHY = YES DIRECTORY_GRAPH = YES +# The DIR_GRAPH_MAX_DEPTH tag can be used to limit the maximum number of levels +# of child directories generated in directory dependency graphs by dot. +# Minimum value: 1, maximum value: 25, default value: 1. +# This tag requires that the tag DIRECTORY_GRAPH is set to YES. + +DIR_GRAPH_MAX_DEPTH = 1 + # The DOT_IMAGE_FORMAT tag can be used to set the image format of the images # generated by dot. For an explanation of the image formats see the section # output formats in the documentation of the dot tool (Graphviz (see: @@ -2358,13 +2689,18 @@ MSCFILE_DIRS = DIAFILE_DIRS = # When using plantuml, the PLANTUML_JAR_PATH tag should be used to specify the -# path where java can find the plantuml.jar file. If left blank, it is assumed -# PlantUML is not used or called during a preprocessing step. Doxygen will -# generate a warning when it encounters a \startuml command in this case and -# will not generate output for the diagram. +# path where java can find the plantuml.jar file or to the filename of jar file +# to be used. If left blank, it is assumed PlantUML is not used or called during +# a preprocessing step. Doxygen will generate a warning when it encounters a +# \startuml command in this case and will not generate output for the diagram. PLANTUML_JAR_PATH = +# When using plantuml, the PLANTUML_CFG_FILE tag can be used to specify a +# configuration file for plantuml. + +PLANTUML_CFG_FILE = + # When using plantuml, the specified paths are searched for files specified by # the !include statement in a plantuml block. @@ -2394,18 +2730,6 @@ DOT_GRAPH_MAX_NODES = 50 MAX_DOT_GRAPH_DEPTH = 0 -# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent -# background. This is disabled by default, because dot on Windows does not seem -# to support this out of the box. -# -# Warning: Depending on the platform used, enabling this option may lead to -# badly anti-aliased labels on the edges of a graph (i.e. they become hard to -# read). -# The default value is: NO. -# This tag requires that the tag HAVE_DOT is set to YES. - -DOT_TRANSPARENT = NO - # Set the DOT_MULTI_TARGETS tag to YES to allow dot to generate multiple output # files in one run (i.e. multiple -o and -T options on the command line). This # makes dot run faster, but since only newer versions of dot (>1.8.10) support @@ -2418,14 +2742,18 @@ DOT_MULTI_TARGETS = NO # If the GENERATE_LEGEND tag is set to YES doxygen will generate a legend page # explaining the meaning of the various boxes and arrows in the dot generated # graphs. +# Note: This tag requires that UML_LOOK isn't set, i.e. the doxygen internal +# graphical representation for inheritance and collaboration diagrams is used. # The default value is: YES. # This tag requires that the tag HAVE_DOT is set to YES. GENERATE_LEGEND = YES -# If the DOT_CLEANUP tag is set to YES, doxygen will remove the intermediate dot +# If the DOT_CLEANUP tag is set to YES, doxygen will remove the intermediate # files that are used to generate the various graphs. +# +# Note: This setting is not only used for dot files but also for msc temporary +# files. # The default value is: YES. -# This tag requires that the tag HAVE_DOT is set to YES. DOT_CLEANUP = YES diff --git a/include/mysqlx/common_constants.h b/include/mysqlx/common_constants.h index 35861b16f..f21a7e6ea 100644 --- a/include/mysqlx/common_constants.h +++ b/include/mysqlx/common_constants.h @@ -310,8 +310,7 @@ #define COLLECTION_OPTIONS_OPTION(X)\ - X(REUSE,1) /*!< Use existing collection. Expects boolean value - @anchor OPT_COLLECTION_REUSE */ \ + X(REUSE,1) /*!< Use existing collection. Expects a boolean value. */ \ X(VALIDATION,2) /*!< Collection validation options. Expects CollectionValidation or a json string.*/ \ END_LIST diff --git a/include/mysqlx/devapi/document.h b/include/mysqlx/devapi/document.h index cac3c3726..aed18b979 100644 --- a/include/mysqlx/devapi/document.h +++ b/include/mysqlx/devapi/document.h @@ -175,7 +175,9 @@ DLL_WARNINGS_POP friend Impl; friend DocResult; friend Value; + /// \cond Note: Ignore by doxygen friend internal::Schema_detail; + /// \endcond }; diff --git a/include/mysqlx/devapi/result.h b/include/mysqlx/devapi/result.h index ddfb57fa1..d72151554 100644 --- a/include/mysqlx/devapi/result.h +++ b/include/mysqlx/devapi/result.h @@ -251,7 +251,7 @@ enum class Type : unsigned short that also use this macro. */ -/// @var mysqlx::Type::BIT +/// @var Type::BIT /// See /// @var Type::TINYINT /// See diff --git a/include/mysqlx/devapi/settings.h b/include/mysqlx/devapi/settings.h index cdefe3482..f6adcff83 100644 --- a/include/mysqlx/devapi/settings.h +++ b/include/mysqlx/devapi/settings.h @@ -69,6 +69,8 @@ class SessionOption public: + /// Possible session creation options. + enum Enum { SESSION_OPTION_LIST(SESS_OPT_ENUM) LAST @@ -124,6 +126,8 @@ class ClientOption using SessionEnum = SessionOption::Enum; + /// Possible client creation options. + enum Enum { CLIENT_OPTION_LIST(CLIENT_OPT_ENUM) }; diff --git a/include/mysqlx/xapi.h b/include/mysqlx/xapi.h index f9b0f4938..c58f2281f 100644 --- a/include/mysqlx/xapi.h +++ b/include/mysqlx/xapi.h @@ -514,6 +514,10 @@ mysqlx_collection_validation_level_t; #define OPT_COLLECTION_VALIDATION_LEVEL(X) MYSQLX_OPT_COLLECTION_VALIDATION_LEVEL, (unsigned int)X #define OPT_COLLECTION_VALIDATION_SCHEMA(X) MYSQLX_OPT_COLLECTION_VALIDATION_SCHEMA, (const char*)X +/** + Compression modes. + TODO: see... +*/ typedef enum mysqlx_compression_mode_enum { #define XAPI_COMPRESSION_ENUM(X,N) MYSQLX_COMPRESSION_##X = N, diff --git a/include/mysqlx/xdevapi.h b/include/mysqlx/xdevapi.h index cf30c27db..e9e7795dc 100644 --- a/include/mysqlx/xdevapi.h +++ b/include/mysqlx/xdevapi.h @@ -286,9 +286,11 @@ class CollectionValidation Data m_data; + /// \cond Exclude from doxygen. friend CollectionOptions; friend Schema; friend mysqlx::internal::Schema_detail; + /// \endcond }; @@ -512,7 +514,9 @@ class CollectionOptions Data m_data; + /// \cond Exclude from doxygne friend mysqlx::internal::Schema_detail; + /// \endcond }; From 4d4d98594ef0b01128850ea246b44914a338411e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lu=C3=ADs=20Silva?= Date: Thu, 9 Feb 2023 19:40:00 +0000 Subject: [PATCH 008/203] Bug#35046616 XDevAPI: Collection.modify().set("$",...) does not work. Workaround to allow this update command using the same behaviour as the replaceOne(). Change-Id: Ic4210ed71fb223ea0695402edff2ce5bbc86247f --- common/op_impl.h | 47 +++++++++++++++++++++++++++++++++----- devapi/tests/bugs-t.cc | 51 +++++++++++++++++++++++++++++++++++++++++- 2 files changed, 91 insertions(+), 7 deletions(-) diff --git a/common/op_impl.h b/common/op_impl.h index 94fab3aa6..4ac52b4f0 100644 --- a/common/op_impl.h +++ b/common/op_impl.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2020, Oracle and/or its affiliates. + * Copyright (c) 2015, 2023, Oracle and/or its affiliates. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License, version 2.0, as @@ -2209,6 +2209,8 @@ class Op_collection_add JSON_INSERT(, '$._id', ) where and are given as constructor parameters. + + can either be a string or an expression which generates the */ struct Insert_id @@ -2219,8 +2221,14 @@ struct Insert_id typedef cdk::string string; const cdk::Expression &m_doc; + const cdk::Expression *m_id_exr = nullptr; std::string m_id; + Insert_id(const cdk::Expression &doc, const cdk::Expression &id_expr) + : m_doc(doc){ + m_id_exr = &id_expr; + } + Insert_id(const cdk::Expression &doc, const std::string &id) : m_doc(doc), m_id(id) {} @@ -2248,7 +2256,11 @@ struct Insert_id sprc->list_begin(); m_doc.process_if(sprc->list_el()); // the document to modify sprc->list_el()->scalar()->val()->str("$._id"); - sprc->list_el()->scalar()->val()->str(m_id); + if (m_id_exr) { + m_id_exr->process_if(sprc->list_el()); + } else { + sprc->list_el()->scalar()->val()->str(m_id); + } sprc->list_end(); } @@ -2407,6 +2419,22 @@ class Op_collection_remove } }; +/* + Represents an expression which generates _id. + In this case, will use the _id column value. +*/ +struct Extract_id : cdk::Expression { + struct : cdk::api::Column_ref { + const cdk::api::Table_ref *table() const override { return nullptr; } + const cdk::string name() const override { return "_id"; } + } m_id; + + Extract_id() {} + + void process(cdk::Expression::Processor &prc) const override { + safe_prc(prc)->scalar()->ref(m_id, nullptr); + } +}; /* Implementation of collection CRUD modify operation (Collection_modify_if @@ -2467,7 +2495,16 @@ class Op_collection_modify if (m_expr) return m_expr->process(prc); - Value::Access::process(parser::Parser_mode::DOCUMENT, m_val, prc); + if(m_field == "$") + { + Value_expr doc(m_val, parser::Parser_mode::DOCUMENT); + + Extract_id expr_id; + Insert_id id(doc, expr_id); + id.process(prc); + } else { + Value::Access::process(parser::Parser_mode::DOCUMENT, m_val, prc); + } } }; @@ -2494,8 +2531,7 @@ class Op_collection_modify return new Op_collection_modify(*this); } - cdk::Reply* do_send_command() override - { + cdk::Reply *do_send_command() override { // Do nothing if no update specifications were added if (m_update.empty()) @@ -2629,7 +2665,6 @@ class Op_collection_replace add_operation(SET, "$", *this); add_param("id", id); } - }; diff --git a/devapi/tests/bugs-t.cc b/devapi/tests/bugs-t.cc index 3180d4082..0f2e1841f 100644 --- a/devapi/tests/bugs-t.cc +++ b/devapi/tests/bugs-t.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, 2020, Oracle and/or its affiliates. + * Copyright (c) 2017, 2023, Oracle and/or its affiliates. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License, version 2.0, as @@ -963,4 +963,53 @@ TEST_F(Bugs, Bug35000027) } EXPECT_EQ(nr_docs, add_task.execute().getAffectedItemsCount()); EXPECT_EQ(nr_docs, add_tast_2.execute().getAffectedItemsCount()); +} + +TEST_F(Bugs, Bug35046616) { + Schema sch = get_sess().createSchema("test", true); + Collection coll = sch.createCollection("c1", true); + + cout << "Inserting documents..." << endl; + + coll.remove("true").execute(); + auto ids = {"1", "MYID1", "MYID2"}; + for (auto _id : ids) { + coll.addOrReplaceOne(_id, R"({ "name": "foo", "age": 1 })"); + } + + auto find_id = coll.find("_id = :id"); + for(auto _id : ids) + { + EXPECT_EQ(std::string("foo"), find_id.bind("id", _id) + .execute() + .fetchOne()["name"] + .get()); + } + + cout << "Updating document..." << endl; + + auto modify = coll.modify("_id = :id") + .set("$", R"({ "_id": "DISCARDED", "name": "bar"})"); + for (auto _id : ids) { + modify.bind("id", _id).execute(); + } + + for (auto _id : ids) { + EXPECT_EQ(std::string("bar"), find_id.bind("id", _id) + .execute() + .fetchOne()["name"] + .get()); + } + + // Changing all documents of the collection setting name to baz + coll.modify("true") + .set("$", R"({ "_id": "DISCARDED", "name": "baz"})") + .execute(); + + for (auto _id : ids) { + EXPECT_EQ(std::string("baz"), find_id.bind("id", _id) + .execute() + .fetchOne()["name"] + .get()); + } } \ No newline at end of file From bfbb7ad04f18e631b5da0bc7db86f18d90a20e3d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lu=C3=ADs=20Silva?= Date: Tue, 28 Feb 2023 10:58:46 +0000 Subject: [PATCH 009/203] Bug#34338937 Don't receive ConnectionClose Reply When using router, we don't get ConnectionClose Reply and, as such, connector will block. To overpass this we will not wait for that message. Change-Id: I204b94a41929883adb27f0c8fdb9dd587de12842 --- cdk/mysqlx/session.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cdk/mysqlx/session.cc b/cdk/mysqlx/session.cc index c056c263f..8b78266cd 100644 --- a/cdk/mysqlx/session.cc +++ b/cdk/mysqlx/session.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2020, Oracle and/or its affiliates. + * Copyright (c) 2015, 2023, Oracle and/or its affiliates. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License, version 2.0, as @@ -796,7 +796,7 @@ void Session::close() try { clean_up(); m_protocol.snd_ConnectionClose().wait(); - m_protocol.rcv_Reply(*this).wait(); + // Not waiting for reply since it blocked on old router implementations... } catch (...) { From d2ca5cdea1a117cab31c5ea5d3cbc54c7715f87f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lu=C3=ADs=20Silva?= Date: Thu, 23 Feb 2023 19:57:39 +0000 Subject: [PATCH 010/203] Bug#35046616 XDevAPI: Collection.modify().set("$",...) does not work. If modify() receives string, it will be reported as string. To set whole document, user should pass DbDoc() object on modify("$",DbDoc()); Change-Id: I68a656a6e0ec0ba1b3a21869ba0156a9547a65a8 --- common/op_impl.h | 32 ++++--- devapi/crud.cc | 2 +- devapi/document.cc | 15 +++- devapi/tests/bugs-t.cc | 37 ++++++-- include/mysqlx/devapi/collection_crud.h | 41 ++++----- include/mysqlx/devapi/crud.h | 2 +- testing/abi2-32.map | 113 ++++++++++++------------ testing/abi2-64.map | 113 ++++++++++++------------ version.cmake | 2 +- 9 files changed, 201 insertions(+), 156 deletions(-) diff --git a/common/op_impl.h b/common/op_impl.h index 4ac52b4f0..4132e891c 100644 --- a/common/op_impl.h +++ b/common/op_impl.h @@ -2490,18 +2490,26 @@ class Op_collection_modify : m_op(op), m_field(field), m_val(val) {} - void process(Processor &prc) const - { - if (m_expr) - return m_expr->process(prc); - - if(m_field == "$") - { - Value_expr doc(m_val, parser::Parser_mode::DOCUMENT); - - Extract_id expr_id; - Insert_id id(doc, expr_id); - id.process(prc); + void process(Processor &prc) const { + if (m_expr) return m_expr->process(prc); + + // We send document given by a JSON string as an SQL expression + // `JSON_INSERT(val, '$', '{}')` to force server to interpret it as JSON + // value. Otherwise it would be interpreted as a literal string value, + // not a document. + if (Value::JSON == m_val.get_type()) { + struct : cdk::api::Object_ref { + const cdk::api::Schema_ref *schema() const override { + return nullptr; + } + const cdk::string name() const override { return "JSON_INSERT"; } + } json_insert; + auto json_set_args = safe_prc(prc.scalar()->call(json_insert)); + json_set_args->list_begin(); + json_set_args->list_el()->scalar()->val()->str(m_val.get_string()); + json_set_args->list_el()->scalar()->val()->str("$"); + json_set_args->list_el()->scalar()->val()->str("{}"); + json_set_args->list_end(); } else { Value::Access::process(parser::Parser_mode::DOCUMENT, m_val, prc); } diff --git a/devapi/crud.cc b/devapi/crud.cc index 055fb5ea3..98826147d 100644 --- a/devapi/crud.cc +++ b/devapi/crud.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2020, Oracle and/or its affiliates. + * Copyright (c) 2015, 2023, Oracle and/or its affiliates. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License, version 2.0, as diff --git a/devapi/document.cc b/devapi/document.cc index 234021c20..a460d3feb 100644 --- a/devapi/document.cc +++ b/devapi/document.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2020, Oracle and/or its affiliates. + * Copyright (c) 2015, 2023, Oracle and/or its affiliates. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License, version 2.0, as @@ -47,6 +47,19 @@ using namespace ::mysqlx; using std::endl; +// Value::get specialization to allow convertion to common::Value type +// -------------------- + +// We need to export this template instantiation +template PUBLIC_API common::Value Value::get() const; + +template <> +common::Value Value::get() const { + if (getType() == DOCUMENT) { + return common::Value::Access::mk_json(m_doc.get_json()); + } + return *this; +} // DbDoc implementation // -------------------- diff --git a/devapi/tests/bugs-t.cc b/devapi/tests/bugs-t.cc index 0f2e1841f..ccbc475e7 100644 --- a/devapi/tests/bugs-t.cc +++ b/devapi/tests/bugs-t.cc @@ -972,9 +972,13 @@ TEST_F(Bugs, Bug35046616) { cout << "Inserting documents..." << endl; coll.remove("true").execute(); + auto ids = {"1", "MYID1", "MYID2"}; + for (auto _id : ids) { - coll.addOrReplaceOne(_id, R"({ "name": "foo", "age": 1 })"); + coll.add(std::string(R"({ "_id": ")") + _id + + R"(", "name": "foo", "age": 1 })") + .execute(); } auto find_id = coll.find("_id = :id"); @@ -989,12 +993,10 @@ TEST_F(Bugs, Bug35046616) { cout << "Updating document..." << endl; auto modify = coll.modify("_id = :id") - .set("$", R"({ "_id": "DISCARDED", "name": "bar"})"); + .set("$",expr( R"({ "_id": "DISCARDED", "name": "bar"})")); for (auto _id : ids) { modify.bind("id", _id).execute(); - } - for (auto _id : ids) { EXPECT_EQ(std::string("bar"), find_id.bind("id", _id) .execute() .fetchOne()["name"] @@ -1003,7 +1005,7 @@ TEST_F(Bugs, Bug35046616) { // Changing all documents of the collection setting name to baz coll.modify("true") - .set("$", R"({ "_id": "DISCARDED", "name": "baz"})") + .set("$", DbDoc(R"({ "_id": "DISCARDED", "name": "baz"})")) .execute(); for (auto _id : ids) { @@ -1012,4 +1014,29 @@ TEST_F(Bugs, Bug35046616) { .fetchOne()["name"] .get()); } + + // Changing all documents of the collection setting name to a document + // {first: last:} + coll.modify("true") + .set("$.name", DbDoc(R"({"first": "foo", "last": "bar"})")) + .execute(); + + for (auto _id : ids) { + auto doc = find_id.bind("id", _id).execute().fetchOne(); + EXPECT_EQ(Value::DOCUMENT, doc["name"].getType()); + EXPECT_EQ(std::string("foo"), doc["name"]["first"].get()); + } + + // Changing all documents of the collection setting name to a string with a + // JSON. JSON should not be processed. + coll.modify("true") + .set("$.name", R"({"first": "foo", "last": "bar"})") + .execute(); + + for (auto _id : ids) { + auto doc = find_id.bind("id", _id).execute().fetchOne(); + EXPECT_EQ(Value::STRING, doc["name"].getType()); + EXPECT_EQ(std::string(R"({"first": "foo", "last": "bar"})"), + doc["name"].get()); + } } \ No newline at end of file diff --git a/include/mysqlx/devapi/collection_crud.h b/include/mysqlx/devapi/collection_crud.h index a334ecbf6..5250fe563 100644 --- a/include/mysqlx/devapi/collection_crud.h +++ b/include/mysqlx/devapi/collection_crud.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2023, Oracle and/or its affiliates. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License, version 2.0, as @@ -82,6 +82,8 @@ class Session; class Collection; class Table; +template<> +common::Value Value::get() const; // ---------------------------------------------------------------------- @@ -435,19 +437,19 @@ struct Collection_modify_base /** An operation which modifies all or selected documents in a collection. - Note that in operations such as `set()`, `unset()`, `arrayInsert()` and - `arrayAppend()` the field argument is specified as a document path. It can be + Note that in operations such as `set()`, `unset()`, `arrayInsert()` and + `arrayAppend()` the field argument is specified as a document path. It can be a simple field name, but it can be a more complex expression like - `$.foo.bar[3]`. One consequence of this is that document field names that - contain spaces or other special characters need to be quoted, for example one + `$.foo.bar[3]`. One consequence of this is that document field names that + contain spaces or other special characters need to be quoted, for example one needs to use this form ``` .unset("\"field name with spaces\"") ``` - as `.unset("field name with spaces")` would be an invalid document path + as `.unset("field name with spaces")` would be an invalid document path expression. - - Note also that wildcard paths that use `*` or `**` are not valid for these + + Note also that wildcard paths that use `*` or `**` are not valid for these operations that modify documents. See [MySQL Reference Manual](https://dev.mysql.com/doc/refman/en/json.html#json-path-syntax) @@ -494,16 +496,15 @@ class CollectionModify Set the given field in a document to the given value. The field is given by a document path. The value can be either a direct - literal or an expression given as `expr()`, to be evaluated on - the server. + literal, `DbDoc` instance or an expression given as `expr()`, to be + evaluated on the server. */ CollectionModify& set(const Field &field, const Value &val) { try { - get_impl()->add_operation( - Impl::SET, field, (const common::Value&)val - ); + get_impl()->add_operation(Impl::SET, field, + val.get()); return *this; } CATCH_AND_WRAP @@ -534,11 +535,8 @@ class CollectionModify CollectionModify& arrayInsert(const Field &field, const Value &val) { try { - get_impl()->add_operation( - Impl::ARRAY_INSERT, - field, - (const common::Value&)val - ); + get_impl()->add_operation(Impl::ARRAY_INSERT, field, + val.get()); return *this; } CATCH_AND_WRAP @@ -555,11 +553,8 @@ class CollectionModify CollectionModify& arrayAppend(const Field &field, const Value &val) { try { - get_impl()->add_operation( - Impl::ARRAY_APPEND, - field, - (const common::Value&)val - ); + get_impl()->add_operation(Impl::ARRAY_APPEND, field, + val.get()); return *this; } CATCH_AND_WRAP diff --git a/include/mysqlx/devapi/crud.h b/include/mysqlx/devapi/crud.h index ffe522be1..6a35d855d 100644 --- a/include/mysqlx/devapi/crud.h +++ b/include/mysqlx/devapi/crud.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2023, Oracle and/or its affiliates. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License, version 2.0, as diff --git a/testing/abi2-32.map b/testing/abi2-32.map index 12849d7a1..f082b7d31 100644 --- a/testing/abi2-32.map +++ b/testing/abi2-32.map @@ -1,7 +1,8 @@ -ABI version: 2.0 (32bit) -Note: Generated at connector version 2.0.30 +ABI version: 2.1 (32bit) +Note: Generated at connector version 8.0.33 ?$TSS0@?1??get@Settings_impl@common@r0@abi2@mysqlx@@QBEABVValue@3456@H@Z@4HA __==__ int `public: class mysqlx::abi2::r0::common::Value const & __thiscall mysqlx::abi2::r0::common::Settings_impl::get(int)const '::`2'::$TSS0 +??$get@VValue@common@r0@abi2@mysqlx@@@Value@r0@abi2@mysqlx@@QBE?AV0common@123@XZ __==__ public: class mysqlx::abi2::r0::common::Value __thiscall mysqlx::abi2::r0::Value::get(void)const ??0?$Row_result_detail@VColumns@r0@abi2@mysqlx@@@internal@r0@abi2@mysqlx@@IAE@AAVResult_init@common@234@@Z __==__ protected: __thiscall mysqlx::abi2::r0::internal::Row_result_detail::Row_result_detail(class mysqlx::abi2::r0::common::Result_init &) ??0Client_detail@internal@r0@abi2@mysqlx@@IAE@$$QAU01234@@Z __==__ protected: __thiscall mysqlx::abi2::r0::internal::Client_detail::Client_detail(struct mysqlx::abi2::r0::internal::Client_detail &&) ??0Client_detail@internal@r0@abi2@mysqlx@@QAE@AAVSettings_impl@common@234@@Z __==__ public: __thiscall mysqlx::abi2::r0::internal::Client_detail::Client_detail(class mysqlx::abi2::r0::common::Settings_impl &) @@ -130,12 +131,12 @@ Note: Generated at connector version 2.0.30 ??4Table_insert_detail@internal@r0@abi2@mysqlx@@QAEAAU01234@ABU01234@@Z __==__ public: struct mysqlx::abi2::r0::internal::Table_insert_detail & __thiscall mysqlx::abi2::r0::internal::Table_insert_detail::operator=(struct mysqlx::abi2::r0::internal::Table_insert_detail const &) ??4Value@common@r0@abi2@mysqlx@@QAEAAV01234@$$QAV01234@@Z __==__ public: class mysqlx::abi2::r0::common::Value & __thiscall mysqlx::abi2::r0::common::Value::operator=(class mysqlx::abi2::r0::common::Value &&) ??4Value@common@r0@abi2@mysqlx@@QAEAAV01234@ABV01234@@Z __==__ public: class mysqlx::abi2::r0::common::Value & __thiscall mysqlx::abi2::r0::common::Value::operator=(class mysqlx::abi2::r0::common::Value const &) -??8Iterator@DbDoc@r0@abi2@mysqlx@@QBE_NABV01234@@Z __==__ public: bool __thiscall mysqlx::abi2::r0::DbDoc::Iterator::operator==(class mysqlx::abi2::r0::DbDoc::Iterator const &)const -??9Iterator@DbDoc@r0@abi2@mysqlx@@QBE_NABV01234@@Z __==__ public: bool __thiscall mysqlx::abi2::r0::DbDoc::Iterator::operator!=(class mysqlx::abi2::r0::DbDoc::Iterator const &)const -??ADbDoc@r0@abi2@mysqlx@@QBEABVValue@123@ABVstring@123@@Z __==__ public: class mysqlx::abi2::r0::Value const & __thiscall mysqlx::abi2::r0::DbDoc::operator[](class mysqlx::abi2::r0::string const &)const -??ADbDoc@r0@abi2@mysqlx@@QBEABVValue@123@PBD@Z __==__ public: class mysqlx::abi2::r0::Value const & __thiscall mysqlx::abi2::r0::DbDoc::operator[](char const *)const -??ADbDoc@r0@abi2@mysqlx@@UBEABVValue@123@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z __==__ public: virtual class mysqlx::abi2::r0::Value const & __thiscall mysqlx::abi2::r0::DbDoc::operator[](class std::basic_string,class std::allocator > const &)const -??BDbDoc@r0@abi2@mysqlx@@QBE_NXZ __==__ public: __thiscall mysqlx::abi2::r0::DbDoc::operator bool(void)const +??8Iterator@DbDoc@r0@abi2@mysqlx@@QBE_NABV01234@@Z __==__ public: bool __thiscall mysqlx::abi2::r0::DbDoc::Iterator::operator==(class mysqlx::abi2::r0::DbDoc::Iterator const &)const +??9Iterator@DbDoc@r0@abi2@mysqlx@@QBE_NABV01234@@Z __==__ public: bool __thiscall mysqlx::abi2::r0::DbDoc::Iterator::operator!=(class mysqlx::abi2::r0::DbDoc::Iterator const &)const +??ADbDoc@r0@abi2@mysqlx@@QBEABVValue@123@ABVstring@123@@Z __==__ public: class mysqlx::abi2::r0::Value const & __thiscall mysqlx::abi2::r0::DbDoc::operator[](class mysqlx::abi2::r0::string const &)const +??ADbDoc@r0@abi2@mysqlx@@QBEABVValue@123@PBD@Z __==__ public: class mysqlx::abi2::r0::Value const & __thiscall mysqlx::abi2::r0::DbDoc::operator[](char const *)const +??ADbDoc@r0@abi2@mysqlx@@UBEABVValue@123@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z __==__ public: virtual class mysqlx::abi2::r0::Value const & __thiscall mysqlx::abi2::r0::DbDoc::operator[](class std::basic_string,class std::allocator > const &)const +??BDbDoc@r0@abi2@mysqlx@@QBE_NXZ __==__ public: __thiscall mysqlx::abi2::r0::DbDoc::operator bool(void)const ??DIterator@DbDoc@r0@abi2@mysqlx@@QAEABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@XZ __==__ public: class std::basic_string,class std::allocator > const & __thiscall mysqlx::abi2::r0::DbDoc::Iterator::operator*(void) ??EIterator@DbDoc@r0@abi2@mysqlx@@QAEAAV01234@XZ __==__ public: class mysqlx::abi2::r0::DbDoc::Iterator & __thiscall mysqlx::abi2::r0::DbDoc::Iterator::operator++(void) ??_7Collection_detail@internal@r0@abi2@mysqlx@@6B@ __==__ const mysqlx::abi2::r0::internal::Collection_detail::`vftable' @@ -160,7 +161,7 @@ Note: Generated at connector version 2.0.30 ?auth_method_name@Settings_impl@common@r0@abi2@mysqlx@@SAPBDW4Auth_method@12345@@Z __==__ public: static char const * __cdecl mysqlx::abi2::r0::common::Settings_impl::auth_method_name(enum mysqlx::abi2::r0::common::Settings_impl::Auth_method) ?begin@DbDoc@r0@abi2@mysqlx@@UAE?AVIterator@1234@XZ __==__ public: virtual class mysqlx::abi2::r0::DbDoc::Iterator __thiscall mysqlx::abi2::r0::DbDoc::begin(void) ?begin@Doc_result_detail@internal@r0@abi2@mysqlx@@QAE?AU?$Iterator@VDoc_result_detail@internal@r0@abi2@mysqlx@@VDbDoc@345@HPAV6345@AAV6345@@2345@XZ __==__ public: struct mysqlx::abi2::r0::internal::Iterator __thiscall mysqlx::abi2::r0::internal::Doc_result_detail::begin(void) -?begin@Settings_impl@common@r0@abi2@mysqlx@@QBE?AV?$_Vector_const_iterator@V?$_Vector_val@U?$_Simple_types@U?$pair@HVValue@common@r0@abi2@mysqlx@@@std@@@std@@@std@@@std@@XZ __==__ public: class std::_Vector_const_iterator > > > __thiscall mysqlx::abi2::r0::common::Settings_impl::begin(void)const +?begin@Settings_impl@common@r0@abi2@mysqlx@@QBE?AV?$_Vector_const_iterator@V?$_Vector_val@U?$_Simple_types@U?$pair@HVValue@common@r0@abi2@mysqlx@@@std@@@std@@@std@@@std@@XZ __==__ public: class std::_Vector_const_iterator > > > __thiscall mysqlx::abi2::r0::common::Settings_impl::begin(void)const ?bg_0900_ai_ci@?$Collation@$0BN@@r0@abi2@mysqlx@@2UCollationInfo@234@B __==__ public: static struct mysqlx::abi2::r0::CollationInfo const mysqlx::abi2::r0::Collation<29>::bg_0900_ai_ci ?bg_0900_as_cs@?$Collation@$0BN@@r0@abi2@mysqlx@@2UCollationInfo@234@B __==__ public: static struct mysqlx::abi2::r0::CollationInfo const mysqlx::abi2::r0::Collation<29>::bg_0900_as_cs ?bin@?$Collation@$00@r0@abi2@mysqlx@@2UCollationInfo@234@B __==__ public: static struct mysqlx::abi2::r0::CollationInfo const mysqlx::abi2::r0::Collation<1>::bin @@ -207,7 +208,7 @@ Note: Generated at connector version 2.0.30 ?bs_0900_ai_ci@?$Collation@$0BN@@r0@abi2@mysqlx@@2UCollationInfo@234@B __==__ public: static struct mysqlx::abi2::r0::CollationInfo const mysqlx::abi2::r0::Collation<29>::bs_0900_ai_ci ?bs_0900_as_cs@?$Collation@$0BN@@r0@abi2@mysqlx@@2UCollationInfo@234@B __==__ public: static struct mysqlx::abi2::r0::CollationInfo const mysqlx::abi2::r0::Collation<29>::bs_0900_as_cs ?bulgarian_ci@?$Collation@$0BO@@r0@abi2@mysqlx@@2UCollationInfo@234@B __==__ public: static struct mysqlx::abi2::r0::CollationInfo const mysqlx::abi2::r0::Collation<30>::bulgarian_ci -?check_result@Result_detail@internal@r0@abi2@mysqlx@@IBEXXZ __==__ protected: void __thiscall mysqlx::abi2::r0::internal::Result_detail::check_result(void)const +?check_result@Result_detail@internal@r0@abi2@mysqlx@@IBEXXZ __==__ protected: void __thiscall mysqlx::abi2::r0::internal::Result_detail::check_result(void)const ?chinese_ci@?$Collation@$0A@@r0@abi2@mysqlx@@2UCollationInfo@234@B __==__ public: static struct mysqlx::abi2::r0::CollationInfo const mysqlx::abi2::r0::Collation<0>::chinese_ci ?chinese_ci@?$Collation@$0BC@@r0@abi2@mysqlx@@2UCollationInfo@234@B __==__ public: static struct mysqlx::abi2::r0::CollationInfo const mysqlx::abi2::r0::Collation<18>::chinese_ci ?chinese_ci@?$Collation@$0CI@@r0@abi2@mysqlx@@2UCollationInfo@234@B __==__ public: static struct mysqlx::abi2::r0::CollationInfo const mysqlx::abi2::r0::Collation<40>::chinese_ci @@ -217,8 +218,8 @@ Note: Generated at connector version 2.0.30 ?clear_connection_attr@Data@Settings_impl@common@r0@abi2@mysqlx@@QAEXXZ __==__ public: void __thiscall mysqlx::abi2::r0::common::Settings_impl::Data::clear_connection_attr(void) ?close@Client_detail@internal@r0@abi2@mysqlx@@QAEXXZ __==__ public: void __thiscall mysqlx::abi2::r0::internal::Client_detail::close(void) ?close@Session_detail@internal@r0@abi2@mysqlx@@IAEXXZ __==__ protected: void __thiscall mysqlx::abi2::r0::internal::Session_detail::close(void) -?col_count@?$Row_result_detail@VColumns@r0@abi2@mysqlx@@@internal@r0@abi2@mysqlx@@IBEKXZ __==__ protected: unsigned long __thiscall mysqlx::abi2::r0::internal::Row_result_detail::col_count(void)const -?col_count@Row_detail@internal@r0@abi2@mysqlx@@IBEKXZ __==__ protected: unsigned long __thiscall mysqlx::abi2::r0::internal::Row_detail::col_count(void)const +?col_count@?$Row_result_detail@VColumns@r0@abi2@mysqlx@@@internal@r0@abi2@mysqlx@@IBEKXZ __==__ protected: unsigned long __thiscall mysqlx::abi2::r0::internal::Row_result_detail::col_count(void)const +?col_count@Row_detail@internal@r0@abi2@mysqlx@@IBEKXZ __==__ protected: unsigned long __thiscall mysqlx::abi2::r0::internal::Row_detail::col_count(void)const ?commit@Session_detail@internal@r0@abi2@mysqlx@@IAEXXZ __==__ protected: void __thiscall mysqlx::abi2::r0::internal::Session_detail::commit(void) ?compression_mode_name@Settings_impl@common@r0@abi2@mysqlx@@SAPBDW4Compression_mode@12345@@Z __==__ public: static char const * __cdecl mysqlx::abi2::r0::common::Settings_impl::compression_mode_name(enum mysqlx::abi2::r0::common::Settings_impl::Compression_mode) ?count@Doc_result_detail@internal@r0@abi2@mysqlx@@IAE_KXZ __==__ protected: unsigned __int64 __thiscall mysqlx::abi2::r0::internal::Doc_result_detail::count(void) @@ -256,8 +257,8 @@ Note: Generated at connector version 2.0.30 ?drop_collection@Schema_detail@internal@r0@abi2@mysqlx@@IAEXABVstring@345@@Z __==__ protected: void __thiscall mysqlx::abi2::r0::internal::Schema_detail::drop_collection(class mysqlx::abi2::r0::string const &) ?drop_schema@Session_detail@internal@r0@abi2@mysqlx@@IAEXABVstring@345@@Z __==__ protected: void __thiscall mysqlx::abi2::r0::internal::Session_detail::drop_schema(class mysqlx::abi2::r0::string const &) ?end@DbDoc@r0@abi2@mysqlx@@UAE?AVIterator@1234@XZ __==__ public: virtual class mysqlx::abi2::r0::DbDoc::Iterator __thiscall mysqlx::abi2::r0::DbDoc::end(void) -?end@Doc_result_detail@internal@r0@abi2@mysqlx@@QBE?AU?$Iterator@VDoc_result_detail@internal@r0@abi2@mysqlx@@VDbDoc@345@HPAV6345@AAV6345@@2345@XZ __==__ public: struct mysqlx::abi2::r0::internal::Iterator __thiscall mysqlx::abi2::r0::internal::Doc_result_detail::end(void)const -?end@Settings_impl@common@r0@abi2@mysqlx@@QBE?AV?$_Vector_const_iterator@V?$_Vector_val@U?$_Simple_types@U?$pair@HVValue@common@r0@abi2@mysqlx@@@std@@@std@@@std@@@std@@XZ __==__ public: class std::_Vector_const_iterator > > > __thiscall mysqlx::abi2::r0::common::Settings_impl::end(void)const +?end@Doc_result_detail@internal@r0@abi2@mysqlx@@QBE?AU?$Iterator@VDoc_result_detail@internal@r0@abi2@mysqlx@@VDbDoc@345@HPAV6345@AAV6345@@2345@XZ __==__ public: struct mysqlx::abi2::r0::internal::Iterator __thiscall mysqlx::abi2::r0::internal::Doc_result_detail::end(void)const +?end@Settings_impl@common@r0@abi2@mysqlx@@QBE?AV?$_Vector_const_iterator@V?$_Vector_val@U?$_Simple_types@U?$pair@HVValue@common@r0@abi2@mysqlx@@@std@@@std@@@std@@@std@@XZ __==__ public: class std::_Vector_const_iterator > > > __thiscall mysqlx::abi2::r0::common::Settings_impl::end(void)const ?english_ci@?$Collation@$02@r0@abi2@mysqlx@@2UCollationInfo@234@B __==__ public: static struct mysqlx::abi2::r0::CollationInfo const mysqlx::abi2::r0::Collation<3>::english_ci ?ensure_impl@Row_detail@internal@r0@abi2@mysqlx@@IAEXXZ __==__ protected: void __thiscall mysqlx::abi2::r0::internal::Row_detail::ensure_impl(void) ?eo_0900_ai_ci@?$Collation@$0BN@@r0@abi2@mysqlx@@2UCollationInfo@234@B __==__ public: static struct mysqlx::abi2::r0::CollationInfo const mysqlx::abi2::r0::Collation<29>::eo_0900_ai_ci @@ -281,7 +282,7 @@ Note: Generated at connector version 2.0.30 ?estonian_cs@?$Collation@$0BM@@r0@abi2@mysqlx@@2UCollationInfo@234@B __==__ public: static struct mysqlx::abi2::r0::CollationInfo const mysqlx::abi2::r0::Collation<28>::estonian_cs ?et_0900_ai_ci@?$Collation@$0BN@@r0@abi2@mysqlx@@2UCollationInfo@234@B __==__ public: static struct mysqlx::abi2::r0::CollationInfo const mysqlx::abi2::r0::Collation<29>::et_0900_ai_ci ?et_0900_as_cs@?$Collation@$0BN@@r0@abi2@mysqlx@@2UCollationInfo@234@B __==__ public: static struct mysqlx::abi2::r0::CollationInfo const mysqlx::abi2::r0::Collation<29>::et_0900_as_cs -?fieldType@DbDoc@r0@abi2@mysqlx@@UBEHABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z __==__ public: virtual int __thiscall mysqlx::abi2::r0::DbDoc::fieldType(class std::basic_string,class std::allocator > const &)const +?fieldType@DbDoc@r0@abi2@mysqlx@@UBEHABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z __==__ public: virtual int __thiscall mysqlx::abi2::r0::DbDoc::fieldType(class std::basic_string,class std::allocator > const &)const ?from_ucs4@Impl@string@r0@abi2@mysqlx@@SAXAAV2345@ABV?$basic_string@_UU?$char_traits@_U@std@@V?$allocator@_U@2@@std@@@Z __==__ public: static void __cdecl mysqlx::abi2::r0::string::Impl::from_ucs4(class mysqlx::abi2::r0::string &,class std::basic_string,class std::allocator > const &) ?from_utf8@Impl@string@r0@abi2@mysqlx@@SAXAAV2345@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z __==__ public: static void __cdecl mysqlx::abi2::r0::string::Impl::from_utf8(class mysqlx::abi2::r0::string &,class std::basic_string,class std::allocator > const &) ?from_wide@Impl@string@r0@abi2@mysqlx@@SAXAAV2345@ABV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@@Z __==__ public: static void __cdecl mysqlx::abi2::r0::string::Impl::from_wide(class mysqlx::abi2::r0::string &,class std::basic_string,class std::allocator > const &) @@ -323,55 +324,55 @@ Note: Generated at connector version 2.0.30 ?german2_ci@?$Collation@$0BN@@r0@abi2@mysqlx@@2UCollationInfo@234@B __==__ public: static struct mysqlx::abi2::r0::CollationInfo const mysqlx::abi2::r0::Collation<29>::german2_ci ?german2_ci@?$Collation@$0BP@@r0@abi2@mysqlx@@2UCollationInfo@234@B __==__ public: static struct mysqlx::abi2::r0::CollationInfo const mysqlx::abi2::r0::Collation<31>::german2_ci ?german2_ci@?$Collation@$0CD@@r0@abi2@mysqlx@@2UCollationInfo@234@B __==__ public: static struct mysqlx::abi2::r0::CollationInfo const mysqlx::abi2::r0::Collation<35>::german2_ci -?get@Settings_impl@common@r0@abi2@mysqlx@@QBEABVValue@2345@H@Z __==__ public: class mysqlx::abi2::r0::common::Value const & __thiscall mysqlx::abi2::r0::common::Settings_impl::get(int)const -?get_affected_rows@Result_detail@internal@r0@abi2@mysqlx@@IBE_KXZ __==__ protected: unsigned __int64 __thiscall mysqlx::abi2::r0::internal::Result_detail::get_affected_rows(void)const +?get@Settings_impl@common@r0@abi2@mysqlx@@QBEABVValue@2345@H@Z __==__ public: class mysqlx::abi2::r0::common::Value const & __thiscall mysqlx::abi2::r0::common::Settings_impl::get(int)const +?get_affected_rows@Result_detail@internal@r0@abi2@mysqlx@@IBE_KXZ __==__ protected: unsigned __int64 __thiscall mysqlx::abi2::r0::internal::Result_detail::get_affected_rows(void)const ?get_attributes@Settings_impl@common@r0@abi2@mysqlx@@QAEXAAUAttr_processor@ds@cdk@@@Z __==__ public: void __thiscall mysqlx::abi2::r0::common::Settings_impl::get_attributes(struct cdk::ds::Attr_processor &) -?get_auto_increment@Result_detail@internal@r0@abi2@mysqlx@@IBE_KXZ __==__ protected: unsigned __int64 __thiscall mysqlx::abi2::r0::internal::Result_detail::get_auto_increment(void)const -?get_bool@Value@common@r0@abi2@mysqlx@@QBE_NXZ __==__ public: bool __thiscall mysqlx::abi2::r0::common::Value::get_bool(void)const -?get_bytes@Row_detail@internal@r0@abi2@mysqlx@@IBE?AVbytes@345@K@Z __==__ protected: class mysqlx::abi2::r0::bytes __thiscall mysqlx::abi2::r0::internal::Row_detail::get_bytes(unsigned long)const -?get_bytes@Value@common@r0@abi2@mysqlx@@QBEPBEPAI@Z __==__ public: unsigned char const * __thiscall mysqlx::abi2::r0::common::Value::get_bytes(unsigned int *)const +?get_auto_increment@Result_detail@internal@r0@abi2@mysqlx@@IBE_KXZ __==__ protected: unsigned __int64 __thiscall mysqlx::abi2::r0::internal::Result_detail::get_auto_increment(void)const +?get_bool@Value@common@r0@abi2@mysqlx@@QBE_NXZ __==__ public: bool __thiscall mysqlx::abi2::r0::common::Value::get_bool(void)const +?get_bytes@Row_detail@internal@r0@abi2@mysqlx@@IBE?AVbytes@345@K@Z __==__ protected: class mysqlx::abi2::r0::bytes __thiscall mysqlx::abi2::r0::internal::Row_detail::get_bytes(unsigned long)const +?get_bytes@Value@common@r0@abi2@mysqlx@@QBEPBEPAI@Z __==__ public: unsigned char const * __thiscall mysqlx::abi2::r0::common::Value::get_bytes(unsigned int *)const ?get_cdk_session@Session_detail@internal@r0@abi2@mysqlx@@IAEAAVSession@cdk@@XZ __==__ protected: class cdk::Session & __thiscall mysqlx::abi2::r0::internal::Session_detail::get_cdk_session(void) -?get_charset@Column_detail@internal@r0@abi2@mysqlx@@IBE?AW4CharacterSet@345@XZ __==__ protected: enum mysqlx::abi2::r0::CharacterSet __thiscall mysqlx::abi2::r0::internal::Column_detail::get_charset(void)const -?get_collation@Column_detail@internal@r0@abi2@mysqlx@@IBEABUCollationInfo@345@XZ __==__ protected: struct mysqlx::abi2::r0::CollationInfo const & __thiscall mysqlx::abi2::r0::internal::Column_detail::get_collation(void)const -?get_column@?$Row_result_detail@VColumns@r0@abi2@mysqlx@@@internal@r0@abi2@mysqlx@@IBEABVColumn@345@K@Z __==__ protected: class mysqlx::abi2::r0::Column const & __thiscall mysqlx::abi2::r0::internal::Row_result_detail::get_column(unsigned long)const -?get_columns@?$Row_result_detail@VColumns@r0@abi2@mysqlx@@@internal@r0@abi2@mysqlx@@IBEABVColumns@345@XZ __==__ protected: class mysqlx::abi2::r0::Columns const & __thiscall mysqlx::abi2::r0::internal::Row_result_detail::get_columns(void)const +?get_charset@Column_detail@internal@r0@abi2@mysqlx@@IBE?AW4CharacterSet@345@XZ __==__ protected: enum mysqlx::abi2::r0::CharacterSet __thiscall mysqlx::abi2::r0::internal::Column_detail::get_charset(void)const +?get_collation@Column_detail@internal@r0@abi2@mysqlx@@IBEABUCollationInfo@345@XZ __==__ protected: struct mysqlx::abi2::r0::CollationInfo const & __thiscall mysqlx::abi2::r0::internal::Column_detail::get_collation(void)const +?get_column@?$Row_result_detail@VColumns@r0@abi2@mysqlx@@@internal@r0@abi2@mysqlx@@IBEABVColumn@345@K@Z __==__ protected: class mysqlx::abi2::r0::Column const & __thiscall mysqlx::abi2::r0::internal::Row_result_detail::get_column(unsigned long)const +?get_columns@?$Row_result_detail@VColumns@r0@abi2@mysqlx@@@internal@r0@abi2@mysqlx@@IBEABVColumns@345@XZ __==__ protected: class mysqlx::abi2::r0::Columns const & __thiscall mysqlx::abi2::r0::internal::Row_result_detail::get_columns(void)const ?get_data_source@Settings_impl@common@r0@abi2@mysqlx@@QAEXAAVMulti_source@ds@cdk@@@Z __==__ public: void __thiscall mysqlx::abi2::r0::common::Settings_impl::get_data_source(class cdk::ds::Multi_source &) -?get_decimals@Column_detail@internal@r0@abi2@mysqlx@@IBEGXZ __==__ protected: unsigned short __thiscall mysqlx::abi2::r0::internal::Column_detail::get_decimals(void)const +?get_decimals@Column_detail@internal@r0@abi2@mysqlx@@IBEGXZ __==__ protected: unsigned short __thiscall mysqlx::abi2::r0::internal::Column_detail::get_decimals(void)const ?get_default_schema_name@Session_detail@internal@r0@abi2@mysqlx@@IAE?AVstring@345@XZ __==__ protected: class mysqlx::abi2::r0::string __thiscall mysqlx::abi2::r0::internal::Session_detail::get_default_schema_name(void) ?get_doc@Doc_result_detail@internal@r0@abi2@mysqlx@@IAE?AVDbDoc@345@XZ __==__ protected: class mysqlx::abi2::r0::DbDoc __thiscall mysqlx::abi2::r0::internal::Doc_result_detail::get_doc(void) ?get_docs@Doc_result_detail@internal@r0@abi2@mysqlx@@IAE?AV?$List_initializer@AAVDoc_result_detail@internal@r0@abi2@mysqlx@@@2345@XZ __==__ protected: class mysqlx::abi2::r0::internal::List_initializer __thiscall mysqlx::abi2::r0::internal::Doc_result_detail::get_docs(void) -?get_double@Value@common@r0@abi2@mysqlx@@QBENXZ __==__ public: double __thiscall mysqlx::abi2::r0::common::Value::get_double(void)const -?get_float@Value@common@r0@abi2@mysqlx@@QBEMXZ __==__ public: float __thiscall mysqlx::abi2::r0::common::Value::get_float(void)const -?get_generated_ids@Result_detail@internal@r0@abi2@mysqlx@@IBE?AV?$List_initializer@ABV?$vector@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V?$allocator@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@@std@@@2345@XZ __==__ protected: class mysqlx::abi2::r0::internal::List_initializer,class std::allocator >,class std::allocator,class std::allocator > > > const &> __thiscall mysqlx::abi2::r0::internal::Result_detail::get_generated_ids(void)const -?get_impl@Column_detail@internal@r0@abi2@mysqlx@@IBEABVColumn_info@common@345@XZ __==__ protected: class mysqlx::abi2::r0::common::Column_info const & __thiscall mysqlx::abi2::r0::internal::Column_detail::get_impl(void)const +?get_double@Value@common@r0@abi2@mysqlx@@QBENXZ __==__ public: double __thiscall mysqlx::abi2::r0::common::Value::get_double(void)const +?get_float@Value@common@r0@abi2@mysqlx@@QBEMXZ __==__ public: float __thiscall mysqlx::abi2::r0::common::Value::get_float(void)const +?get_generated_ids@Result_detail@internal@r0@abi2@mysqlx@@IBE?AV?$List_initializer@ABV?$vector@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V?$allocator@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@@std@@@2345@XZ __==__ protected: class mysqlx::abi2::r0::internal::List_initializer,class std::allocator >,class std::allocator,class std::allocator > > > const &> __thiscall mysqlx::abi2::r0::internal::Result_detail::get_generated_ids(void)const +?get_impl@Column_detail@internal@r0@abi2@mysqlx@@IBEABVColumn_info@common@345@XZ __==__ protected: class mysqlx::abi2::r0::common::Column_info const & __thiscall mysqlx::abi2::r0::internal::Column_detail::get_impl(void)const ?get_impl@Result_detail@internal@r0@abi2@mysqlx@@IAEAAVResult_impl@common@345@XZ __==__ protected: class mysqlx::abi2::r0::common::Result_impl & __thiscall mysqlx::abi2::r0::internal::Result_detail::get_impl(void) -?get_impl@Result_detail@internal@r0@abi2@mysqlx@@IBEABVResult_impl@common@345@XZ __==__ protected: class mysqlx::abi2::r0::common::Result_impl const & __thiscall mysqlx::abi2::r0::internal::Result_detail::get_impl(void)const +?get_impl@Result_detail@internal@r0@abi2@mysqlx@@IBEABVResult_impl@common@345@XZ __==__ protected: class mysqlx::abi2::r0::common::Result_impl const & __thiscall mysqlx::abi2::r0::internal::Result_detail::get_impl(void)const ?get_impl@Row_detail@internal@r0@abi2@mysqlx@@IAEAAVImpl@12345@XZ __==__ protected: class mysqlx::abi2::r0::internal::Row_detail::Impl & __thiscall mysqlx::abi2::r0::internal::Row_detail::get_impl(void) -?get_impl@Row_detail@internal@r0@abi2@mysqlx@@IBEABVImpl@12345@XZ __==__ protected: class mysqlx::abi2::r0::internal::Row_detail::Impl const & __thiscall mysqlx::abi2::r0::internal::Row_detail::get_impl(void)const +?get_impl@Row_detail@internal@r0@abi2@mysqlx@@IBEABVImpl@12345@XZ __==__ protected: class mysqlx::abi2::r0::internal::Row_detail::Impl const & __thiscall mysqlx::abi2::r0::internal::Row_detail::get_impl(void)const ?get_impl@Session_detail@internal@r0@abi2@mysqlx@@IAEAAVSession_impl@common@345@XZ __==__ protected: class mysqlx::abi2::r0::common::Session_impl & __thiscall mysqlx::abi2::r0::internal::Session_detail::get_impl(void) -?get_json@DbDoc@r0@abi2@mysqlx@@ABEPBDXZ __==__ private: char const * __thiscall mysqlx::abi2::r0::DbDoc::get_json(void)const -?get_label@Column_detail@internal@r0@abi2@mysqlx@@IBE?AVstring@345@XZ __==__ protected: class mysqlx::abi2::r0::string __thiscall mysqlx::abi2::r0::internal::Column_detail::get_label(void)const -?get_length@Column_detail@internal@r0@abi2@mysqlx@@IBEKXZ __==__ protected: unsigned long __thiscall mysqlx::abi2::r0::internal::Column_detail::get_length(void)const -?get_name@Column_detail@internal@r0@abi2@mysqlx@@IBE?AVstring@345@XZ __==__ protected: class mysqlx::abi2::r0::string __thiscall mysqlx::abi2::r0::internal::Column_detail::get_name(void)const -?get_schema_name@Column_detail@internal@r0@abi2@mysqlx@@IBE?AVstring@345@XZ __==__ protected: class mysqlx::abi2::r0::string __thiscall mysqlx::abi2::r0::internal::Column_detail::get_schema_name(void)const +?get_json@DbDoc@r0@abi2@mysqlx@@ABEPBDXZ __==__ private: char const * __thiscall mysqlx::abi2::r0::DbDoc::get_json(void)const +?get_label@Column_detail@internal@r0@abi2@mysqlx@@IBE?AVstring@345@XZ __==__ protected: class mysqlx::abi2::r0::string __thiscall mysqlx::abi2::r0::internal::Column_detail::get_label(void)const +?get_length@Column_detail@internal@r0@abi2@mysqlx@@IBEKXZ __==__ protected: unsigned long __thiscall mysqlx::abi2::r0::internal::Column_detail::get_length(void)const +?get_name@Column_detail@internal@r0@abi2@mysqlx@@IBE?AVstring@345@XZ __==__ protected: class mysqlx::abi2::r0::string __thiscall mysqlx::abi2::r0::internal::Column_detail::get_name(void)const +?get_schema_name@Column_detail@internal@r0@abi2@mysqlx@@IBE?AVstring@345@XZ __==__ protected: class mysqlx::abi2::r0::string __thiscall mysqlx::abi2::r0::internal::Column_detail::get_schema_name(void)const ?get_session_pool@Client_detail@internal@r0@abi2@mysqlx@@IAEAAV?$shared_ptr@VSession_pool@common@r0@abi2@mysqlx@@@std@@XZ __==__ protected: class std::shared_ptr & __thiscall mysqlx::abi2::r0::internal::Client_detail::get_session_pool(void) -?get_sint@Value@common@r0@abi2@mysqlx@@QBE_JXZ __==__ public: __int64 __thiscall mysqlx::abi2::r0::common::Value::get_sint(void)const -?get_string@Value@common@r0@abi2@mysqlx@@QBEABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@XZ __==__ public: class std::basic_string,class std::allocator > const & __thiscall mysqlx::abi2::r0::common::Value::get_string(void)const -?get_table_label@Column_detail@internal@r0@abi2@mysqlx@@IBE?AVstring@345@XZ __==__ protected: class mysqlx::abi2::r0::string __thiscall mysqlx::abi2::r0::internal::Column_detail::get_table_label(void)const -?get_table_name@Column_detail@internal@r0@abi2@mysqlx@@IBE?AVstring@345@XZ __==__ protected: class mysqlx::abi2::r0::string __thiscall mysqlx::abi2::r0::internal::Column_detail::get_table_name(void)const -?get_type@Column_detail@internal@r0@abi2@mysqlx@@IBEIXZ __==__ protected: unsigned int __thiscall mysqlx::abi2::r0::internal::Column_detail::get_type(void)const -?get_type@Value@common@r0@abi2@mysqlx@@QBE?AW4Type@12345@XZ __==__ public: enum mysqlx::abi2::r0::common::Value::Type __thiscall mysqlx::abi2::r0::common::Value::get_type(void)const -?get_uint@Value@common@r0@abi2@mysqlx@@QBE_KXZ __==__ public: unsigned __int64 __thiscall mysqlx::abi2::r0::common::Value::get_uint(void)const -?get_ustring@Value@common@r0@abi2@mysqlx@@QBEABV?$basic_string@_SU?$char_traits@_S@std@@V?$allocator@_S@2@@std@@XZ __==__ public: class std::basic_string,class std::allocator > const & __thiscall mysqlx::abi2::r0::common::Value::get_ustring(void)const +?get_sint@Value@common@r0@abi2@mysqlx@@QBE_JXZ __==__ public: __int64 __thiscall mysqlx::abi2::r0::common::Value::get_sint(void)const +?get_string@Value@common@r0@abi2@mysqlx@@QBEABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@XZ __==__ public: class std::basic_string,class std::allocator > const & __thiscall mysqlx::abi2::r0::common::Value::get_string(void)const +?get_table_label@Column_detail@internal@r0@abi2@mysqlx@@IBE?AVstring@345@XZ __==__ protected: class mysqlx::abi2::r0::string __thiscall mysqlx::abi2::r0::internal::Column_detail::get_table_label(void)const +?get_table_name@Column_detail@internal@r0@abi2@mysqlx@@IBE?AVstring@345@XZ __==__ protected: class mysqlx::abi2::r0::string __thiscall mysqlx::abi2::r0::internal::Column_detail::get_table_name(void)const +?get_type@Column_detail@internal@r0@abi2@mysqlx@@IBEIXZ __==__ protected: unsigned int __thiscall mysqlx::abi2::r0::internal::Column_detail::get_type(void)const +?get_type@Value@common@r0@abi2@mysqlx@@QBE?AW4Type@12345@XZ __==__ public: enum mysqlx::abi2::r0::common::Value::Type __thiscall mysqlx::abi2::r0::common::Value::get_type(void)const +?get_uint@Value@common@r0@abi2@mysqlx@@QBE_KXZ __==__ public: unsigned __int64 __thiscall mysqlx::abi2::r0::common::Value::get_uint(void)const +?get_ustring@Value@common@r0@abi2@mysqlx@@QBEABV?$basic_string@_SU?$char_traits@_S@std@@V?$allocator@_S@2@@std@@XZ __==__ public: class std::basic_string,class std::allocator > const & __thiscall mysqlx::abi2::r0::common::Value::get_ustring(void)const ?get_val@Row_detail@internal@r0@abi2@mysqlx@@IAEAAVValue@345@K@Z __==__ protected: class mysqlx::abi2::r0::Value & __thiscall mysqlx::abi2::r0::internal::Row_detail::get_val(unsigned long) ?get_warning@Result_detail@internal@r0@abi2@mysqlx@@IAE?AVWarning@345@I@Z __==__ protected: class mysqlx::abi2::r0::Warning __thiscall mysqlx::abi2::r0::internal::Result_detail::get_warning(unsigned int) -?get_warning_count@Result_detail@internal@r0@abi2@mysqlx@@IBEIXZ __==__ protected: unsigned int __thiscall mysqlx::abi2::r0::internal::Result_detail::get_warning_count(void)const +?get_warning_count@Result_detail@internal@r0@abi2@mysqlx@@IBEIXZ __==__ protected: unsigned int __thiscall mysqlx::abi2::r0::internal::Result_detail::get_warning_count(void)const ?get_warnings@Result_detail@internal@r0@abi2@mysqlx@@IAE?AV?$List_initializer@V?$Array_source@UWarning_src@Result_detail@internal@r0@abi2@mysqlx@@VWarning@456@HPAV7456@AAV7456@@internal@r0@abi2@mysqlx@@@2345@XZ __==__ protected: class mysqlx::abi2::r0::internal::List_initializer > __thiscall mysqlx::abi2::r0::internal::Result_detail::get_warnings(void) ?gl_0900_ai_ci@?$Collation@$0BN@@r0@abi2@mysqlx@@2UCollationInfo@234@B __==__ public: static struct mysqlx::abi2::r0::CollationInfo const mysqlx::abi2::r0::Collation<29>::gl_0900_ai_ci ?gl_0900_as_cs@?$Collation@$0BN@@r0@abi2@mysqlx@@2UCollationInfo@234@B __==__ public: static struct mysqlx::abi2::r0::CollationInfo const mysqlx::abi2::r0::Collation<29>::gl_0900_as_cs -?hasField@DbDoc@r0@abi2@mysqlx@@UBE_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z __==__ public: virtual bool __thiscall mysqlx::abi2::r0::DbDoc::hasField(class std::basic_string,class std::allocator > const &)const -?has_data@Result_detail@internal@r0@abi2@mysqlx@@IBE_NXZ __==__ protected: bool __thiscall mysqlx::abi2::r0::internal::Result_detail::has_data(void)const -?has_option@Settings_impl@common@r0@abi2@mysqlx@@QBE_NH@Z __==__ public: bool __thiscall mysqlx::abi2::r0::common::Settings_impl::has_option(int)const +?hasField@DbDoc@r0@abi2@mysqlx@@UBE_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z __==__ public: virtual bool __thiscall mysqlx::abi2::r0::DbDoc::hasField(class std::basic_string,class std::allocator > const &)const +?has_data@Result_detail@internal@r0@abi2@mysqlx@@IBE_NXZ __==__ protected: bool __thiscall mysqlx::abi2::r0::internal::Result_detail::has_data(void)const +?has_option@Settings_impl@common@r0@abi2@mysqlx@@QBE_NH@Z __==__ public: bool __thiscall mysqlx::abi2::r0::common::Settings_impl::has_option(int)const ?hr_0900_ai_ci@?$Collation@$0BN@@r0@abi2@mysqlx@@2UCollationInfo@234@B __==__ public: static struct mysqlx::abi2::r0::CollationInfo const mysqlx::abi2::r0::Collation<29>::hr_0900_ai_ci ?hr_0900_as_cs@?$Collation@$0BN@@r0@abi2@mysqlx@@2UCollationInfo@234@B __==__ public: static struct mysqlx::abi2::r0::CollationInfo const mysqlx::abi2::r0::Collation<29>::hr_0900_as_cs ?hu_0900_ai_ci@?$Collation@$0BN@@r0@abi2@mysqlx@@2UCollationInfo@234@B __==__ public: static struct mysqlx::abi2::r0::CollationInfo const mysqlx::abi2::r0::Collation<29>::hu_0900_ai_ci @@ -391,12 +392,12 @@ Note: Generated at connector version 2.0.30 ?index_drop@Collection_detail@internal@r0@abi2@mysqlx@@IAEXABVstring@345@@Z __==__ protected: void __thiscall mysqlx::abi2::r0::internal::Collection_detail::index_drop(class mysqlx::abi2::r0::string const &) ?init@?$Columns_detail@VColumn@r0@abi2@mysqlx@@@internal@r0@abi2@mysqlx@@IAEXABVResult_impl@common@345@@Z __==__ protected: void __thiscall mysqlx::abi2::r0::internal::Columns_detail::init(class mysqlx::abi2::r0::common::Result_impl const &) ?init_connection_attr@Data@Settings_impl@common@r0@abi2@mysqlx@@QAEXXZ __==__ public: void __thiscall mysqlx::abi2::r0::common::Settings_impl::Data::init_connection_attr(void) -?isNull@DbDoc@r0@abi2@mysqlx@@QBE_NXZ __==__ public: bool __thiscall mysqlx::abi2::r0::DbDoc::isNull(void)const +?isNull@DbDoc@r0@abi2@mysqlx@@QBE_NXZ __==__ public: bool __thiscall mysqlx::abi2::r0::DbDoc::isNull(void)const ?is_0900_ai_ci@?$Collation@$0BN@@r0@abi2@mysqlx@@2UCollationInfo@234@B __==__ public: static struct mysqlx::abi2::r0::CollationInfo const mysqlx::abi2::r0::Collation<29>::is_0900_ai_ci ?is_0900_as_cs@?$Collation@$0BN@@r0@abi2@mysqlx@@2UCollationInfo@234@B __==__ public: static struct mysqlx::abi2::r0::CollationInfo const mysqlx::abi2::r0::Collation<29>::is_0900_as_cs -?is_null@Value@common@r0@abi2@mysqlx@@QBE_NXZ __==__ public: bool __thiscall mysqlx::abi2::r0::common::Value::is_null(void)const -?is_padded@Column_detail@internal@r0@abi2@mysqlx@@IBE_NXZ __==__ protected: bool __thiscall mysqlx::abi2::r0::internal::Column_detail::is_padded(void)const -?is_signed@Column_detail@internal@r0@abi2@mysqlx@@IBE_NXZ __==__ protected: bool __thiscall mysqlx::abi2::r0::internal::Column_detail::is_signed(void)const +?is_null@Value@common@r0@abi2@mysqlx@@QBE_NXZ __==__ public: bool __thiscall mysqlx::abi2::r0::common::Value::is_null(void)const +?is_padded@Column_detail@internal@r0@abi2@mysqlx@@IBE_NXZ __==__ protected: bool __thiscall mysqlx::abi2::r0::internal::Column_detail::is_padded(void)const +?is_signed@Column_detail@internal@r0@abi2@mysqlx@@IBE_NXZ __==__ protected: bool __thiscall mysqlx::abi2::r0::internal::Column_detail::is_signed(void)const ?iterator_get@Collection_src@Schema_detail@internal@r0@abi2@mysqlx@@QAE?AVCollection@456@XZ __==__ public: class mysqlx::abi2::r0::Collection __thiscall mysqlx::abi2::r0::internal::Schema_detail::Collection_src::iterator_get(void) ?iterator_get@Doc_result_detail@internal@r0@abi2@mysqlx@@AAE?AVDbDoc@345@XZ __==__ private: class mysqlx::abi2::r0::DbDoc __thiscall mysqlx::abi2::r0::internal::Doc_result_detail::iterator_get(void) ?iterator_get@Query_src@internal@r0@abi2@mysqlx@@QAE?AVstring@345@XZ __==__ public: class mysqlx::abi2::r0::string __thiscall mysqlx::abi2::r0::internal::Query_src::iterator_get(void) @@ -465,9 +466,9 @@ Note: Generated at connector version 2.0.30 ?polish_ci@?$Collation@$0BP@@r0@abi2@mysqlx@@2UCollationInfo@234@B __==__ public: static struct mysqlx::abi2::r0::CollationInfo const mysqlx::abi2::r0::Collation<31>::polish_ci ?polish_ci@?$Collation@$0CD@@r0@abi2@mysqlx@@2UCollationInfo@234@B __==__ public: static struct mysqlx::abi2::r0::CollationInfo const mysqlx::abi2::r0::Collation<35>::polish_ci ?prepare_for_cmd@Session_detail@internal@r0@abi2@mysqlx@@IAEXXZ __==__ protected: void __thiscall mysqlx::abi2::r0::internal::Session_detail::prepare_for_cmd(void) -?print@Column_detail@internal@r0@abi2@mysqlx@@MBEXAAV?$basic_ostream@DU?$char_traits@D@std@@@std@@@Z __==__ protected: virtual void __thiscall mysqlx::abi2::r0::internal::Column_detail::print(class std::basic_ostream > &)const -?print@DbDoc@r0@abi2@mysqlx@@UBEXAAV?$basic_ostream@DU?$char_traits@D@std@@@std@@@Z __==__ public: virtual void __thiscall mysqlx::abi2::r0::DbDoc::print(class std::basic_ostream > &)const -?print@Value@common@r0@abi2@mysqlx@@MBEXAAV?$basic_ostream@DU?$char_traits@D@std@@@std@@@Z __==__ protected: virtual void __thiscall mysqlx::abi2::r0::common::Value::print(class std::basic_ostream > &)const +?print@Column_detail@internal@r0@abi2@mysqlx@@MBEXAAV?$basic_ostream@DU?$char_traits@D@std@@@std@@@Z __==__ protected: virtual void __thiscall mysqlx::abi2::r0::internal::Column_detail::print(class std::basic_ostream > &)const +?print@DbDoc@r0@abi2@mysqlx@@UBEXAAV?$basic_ostream@DU?$char_traits@D@std@@@std@@@Z __==__ public: virtual void __thiscall mysqlx::abi2::r0::DbDoc::print(class std::basic_ostream > &)const +?print@Value@common@r0@abi2@mysqlx@@MBEXAAV?$basic_ostream@DU?$char_traits@D@std@@@std@@@Z __==__ protected: virtual void __thiscall mysqlx::abi2::r0::common::Value::print(class std::basic_ostream > &)const ?process_one@Bind_detail@internal@r0@abi2@mysqlx@@KAXPAUBind_if@common@345@ABVValue@345@@Z __==__ protected: static void __cdecl mysqlx::abi2::r0::internal::Bind_detail::process_one(struct mysqlx::abi2::r0::common::Bind_if *,class mysqlx::abi2::r0::Value const &) ?process_one@Collection_add_detail@internal@r0@abi2@mysqlx@@KAXPAUCollection_add_if@common@345@ABVDbDoc@345@@Z __==__ protected: static void __cdecl mysqlx::abi2::r0::internal::Collection_add_detail::process_one(struct mysqlx::abi2::r0::common::Collection_add_if *,class mysqlx::abi2::r0::DbDoc const &) ?process_one@Collection_add_detail@internal@r0@abi2@mysqlx@@KAXPAUCollection_add_if@common@345@ABVstring@345@@Z __==__ protected: static void __cdecl mysqlx::abi2::r0::internal::Collection_add_detail::process_one(struct mysqlx::abi2::r0::common::Collection_add_if *,class mysqlx::abi2::r0::string const &) diff --git a/testing/abi2-64.map b/testing/abi2-64.map index 4d1cfda15..747b9cfcc 100644 --- a/testing/abi2-64.map +++ b/testing/abi2-64.map @@ -1,7 +1,8 @@ -ABI version: 2.0 (64bit) -Note: Generated at connector version 2.0.30 +ABI version: 2.1 (64bit) +Note: Generated at connector version 8.0.33 ?$TSS0@?1??get@Settings_impl@common@r0@abi2@mysqlx@@QEBAAEBVValue@3456@H@Z@4HA __==__ int `public: class mysqlx::abi2::r0::common::Value const & __cdecl mysqlx::abi2::r0::common::Settings_impl::get(int)const '::`2'::$TSS0 +??$get@VValue@common@r0@abi2@mysqlx@@@Value@r0@abi2@mysqlx@@QEBA?AV0common@123@XZ __==__ public: class mysqlx::abi2::r0::common::Value __cdecl mysqlx::abi2::r0::Value::get(void)const ??0?$Row_result_detail@VColumns@r0@abi2@mysqlx@@@internal@r0@abi2@mysqlx@@IEAA@AEAVResult_init@common@234@@Z __==__ protected: __cdecl mysqlx::abi2::r0::internal::Row_result_detail::Row_result_detail(class mysqlx::abi2::r0::common::Result_init &) ??0Client_detail@internal@r0@abi2@mysqlx@@IEAA@$$QEAU01234@@Z __==__ protected: __cdecl mysqlx::abi2::r0::internal::Client_detail::Client_detail(struct mysqlx::abi2::r0::internal::Client_detail &&) ??0Client_detail@internal@r0@abi2@mysqlx@@QEAA@AEAVSettings_impl@common@234@@Z __==__ public: __cdecl mysqlx::abi2::r0::internal::Client_detail::Client_detail(class mysqlx::abi2::r0::common::Settings_impl &) @@ -130,12 +131,12 @@ Note: Generated at connector version 2.0.30 ??4Table_insert_detail@internal@r0@abi2@mysqlx@@QEAAAEAU01234@AEBU01234@@Z __==__ public: struct mysqlx::abi2::r0::internal::Table_insert_detail & __cdecl mysqlx::abi2::r0::internal::Table_insert_detail::operator=(struct mysqlx::abi2::r0::internal::Table_insert_detail const &) ??4Value@common@r0@abi2@mysqlx@@QEAAAEAV01234@$$QEAV01234@@Z __==__ public: class mysqlx::abi2::r0::common::Value & __cdecl mysqlx::abi2::r0::common::Value::operator=(class mysqlx::abi2::r0::common::Value &&) ??4Value@common@r0@abi2@mysqlx@@QEAAAEAV01234@AEBV01234@@Z __==__ public: class mysqlx::abi2::r0::common::Value & __cdecl mysqlx::abi2::r0::common::Value::operator=(class mysqlx::abi2::r0::common::Value const &) -??8Iterator@DbDoc@r0@abi2@mysqlx@@QEBA_NAEBV01234@@Z __==__ public: bool __cdecl mysqlx::abi2::r0::DbDoc::Iterator::operator==(class mysqlx::abi2::r0::DbDoc::Iterator const &)const -??9Iterator@DbDoc@r0@abi2@mysqlx@@QEBA_NAEBV01234@@Z __==__ public: bool __cdecl mysqlx::abi2::r0::DbDoc::Iterator::operator!=(class mysqlx::abi2::r0::DbDoc::Iterator const &)const -??ADbDoc@r0@abi2@mysqlx@@QEBAAEBVValue@123@AEBVstring@123@@Z __==__ public: class mysqlx::abi2::r0::Value const & __cdecl mysqlx::abi2::r0::DbDoc::operator[](class mysqlx::abi2::r0::string const &)const -??ADbDoc@r0@abi2@mysqlx@@QEBAAEBVValue@123@PEBD@Z __==__ public: class mysqlx::abi2::r0::Value const & __cdecl mysqlx::abi2::r0::DbDoc::operator[](char const *)const -??ADbDoc@r0@abi2@mysqlx@@UEBAAEBVValue@123@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z __==__ public: virtual class mysqlx::abi2::r0::Value const & __cdecl mysqlx::abi2::r0::DbDoc::operator[](class std::basic_string,class std::allocator > const &)const -??BDbDoc@r0@abi2@mysqlx@@QEBA_NXZ __==__ public: __cdecl mysqlx::abi2::r0::DbDoc::operator bool(void)const +??8Iterator@DbDoc@r0@abi2@mysqlx@@QEBA_NAEBV01234@@Z __==__ public: bool __cdecl mysqlx::abi2::r0::DbDoc::Iterator::operator==(class mysqlx::abi2::r0::DbDoc::Iterator const &)const +??9Iterator@DbDoc@r0@abi2@mysqlx@@QEBA_NAEBV01234@@Z __==__ public: bool __cdecl mysqlx::abi2::r0::DbDoc::Iterator::operator!=(class mysqlx::abi2::r0::DbDoc::Iterator const &)const +??ADbDoc@r0@abi2@mysqlx@@QEBAAEBVValue@123@AEBVstring@123@@Z __==__ public: class mysqlx::abi2::r0::Value const & __cdecl mysqlx::abi2::r0::DbDoc::operator[](class mysqlx::abi2::r0::string const &)const +??ADbDoc@r0@abi2@mysqlx@@QEBAAEBVValue@123@PEBD@Z __==__ public: class mysqlx::abi2::r0::Value const & __cdecl mysqlx::abi2::r0::DbDoc::operator[](char const *)const +??ADbDoc@r0@abi2@mysqlx@@UEBAAEBVValue@123@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z __==__ public: virtual class mysqlx::abi2::r0::Value const & __cdecl mysqlx::abi2::r0::DbDoc::operator[](class std::basic_string,class std::allocator > const &)const +??BDbDoc@r0@abi2@mysqlx@@QEBA_NXZ __==__ public: __cdecl mysqlx::abi2::r0::DbDoc::operator bool(void)const ??DIterator@DbDoc@r0@abi2@mysqlx@@QEAAAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@XZ __==__ public: class std::basic_string,class std::allocator > const & __cdecl mysqlx::abi2::r0::DbDoc::Iterator::operator*(void) ??EIterator@DbDoc@r0@abi2@mysqlx@@QEAAAEAV01234@XZ __==__ public: class mysqlx::abi2::r0::DbDoc::Iterator & __cdecl mysqlx::abi2::r0::DbDoc::Iterator::operator++(void) ??_7Collection_detail@internal@r0@abi2@mysqlx@@6B@ __==__ const mysqlx::abi2::r0::internal::Collection_detail::`vftable' @@ -160,7 +161,7 @@ Note: Generated at connector version 2.0.30 ?auth_method_name@Settings_impl@common@r0@abi2@mysqlx@@SAPEBDW4Auth_method@12345@@Z __==__ public: static char const * __cdecl mysqlx::abi2::r0::common::Settings_impl::auth_method_name(enum mysqlx::abi2::r0::common::Settings_impl::Auth_method) ?begin@DbDoc@r0@abi2@mysqlx@@UEAA?AVIterator@1234@XZ __==__ public: virtual class mysqlx::abi2::r0::DbDoc::Iterator __cdecl mysqlx::abi2::r0::DbDoc::begin(void) ?begin@Doc_result_detail@internal@r0@abi2@mysqlx@@QEAA?AU?$Iterator@VDoc_result_detail@internal@r0@abi2@mysqlx@@VDbDoc@345@_JPEAV6345@AEAV6345@@2345@XZ __==__ public: struct mysqlx::abi2::r0::internal::Iterator __cdecl mysqlx::abi2::r0::internal::Doc_result_detail::begin(void) -?begin@Settings_impl@common@r0@abi2@mysqlx@@QEBA?AV?$_Vector_const_iterator@V?$_Vector_val@U?$_Simple_types@U?$pair@HVValue@common@r0@abi2@mysqlx@@@std@@@std@@@std@@@std@@XZ __==__ public: class std::_Vector_const_iterator > > > __cdecl mysqlx::abi2::r0::common::Settings_impl::begin(void)const +?begin@Settings_impl@common@r0@abi2@mysqlx@@QEBA?AV?$_Vector_const_iterator@V?$_Vector_val@U?$_Simple_types@U?$pair@HVValue@common@r0@abi2@mysqlx@@@std@@@std@@@std@@@std@@XZ __==__ public: class std::_Vector_const_iterator > > > __cdecl mysqlx::abi2::r0::common::Settings_impl::begin(void)const ?bg_0900_ai_ci@?$Collation@$0BN@@r0@abi2@mysqlx@@2UCollationInfo@234@B __==__ public: static struct mysqlx::abi2::r0::CollationInfo const mysqlx::abi2::r0::Collation<29>::bg_0900_ai_ci ?bg_0900_as_cs@?$Collation@$0BN@@r0@abi2@mysqlx@@2UCollationInfo@234@B __==__ public: static struct mysqlx::abi2::r0::CollationInfo const mysqlx::abi2::r0::Collation<29>::bg_0900_as_cs ?bin@?$Collation@$00@r0@abi2@mysqlx@@2UCollationInfo@234@B __==__ public: static struct mysqlx::abi2::r0::CollationInfo const mysqlx::abi2::r0::Collation<1>::bin @@ -207,7 +208,7 @@ Note: Generated at connector version 2.0.30 ?bs_0900_ai_ci@?$Collation@$0BN@@r0@abi2@mysqlx@@2UCollationInfo@234@B __==__ public: static struct mysqlx::abi2::r0::CollationInfo const mysqlx::abi2::r0::Collation<29>::bs_0900_ai_ci ?bs_0900_as_cs@?$Collation@$0BN@@r0@abi2@mysqlx@@2UCollationInfo@234@B __==__ public: static struct mysqlx::abi2::r0::CollationInfo const mysqlx::abi2::r0::Collation<29>::bs_0900_as_cs ?bulgarian_ci@?$Collation@$0BO@@r0@abi2@mysqlx@@2UCollationInfo@234@B __==__ public: static struct mysqlx::abi2::r0::CollationInfo const mysqlx::abi2::r0::Collation<30>::bulgarian_ci -?check_result@Result_detail@internal@r0@abi2@mysqlx@@IEBAXXZ __==__ protected: void __cdecl mysqlx::abi2::r0::internal::Result_detail::check_result(void)const +?check_result@Result_detail@internal@r0@abi2@mysqlx@@IEBAXXZ __==__ protected: void __cdecl mysqlx::abi2::r0::internal::Result_detail::check_result(void)const ?chinese_ci@?$Collation@$0A@@r0@abi2@mysqlx@@2UCollationInfo@234@B __==__ public: static struct mysqlx::abi2::r0::CollationInfo const mysqlx::abi2::r0::Collation<0>::chinese_ci ?chinese_ci@?$Collation@$0BC@@r0@abi2@mysqlx@@2UCollationInfo@234@B __==__ public: static struct mysqlx::abi2::r0::CollationInfo const mysqlx::abi2::r0::Collation<18>::chinese_ci ?chinese_ci@?$Collation@$0CI@@r0@abi2@mysqlx@@2UCollationInfo@234@B __==__ public: static struct mysqlx::abi2::r0::CollationInfo const mysqlx::abi2::r0::Collation<40>::chinese_ci @@ -217,8 +218,8 @@ Note: Generated at connector version 2.0.30 ?clear_connection_attr@Data@Settings_impl@common@r0@abi2@mysqlx@@QEAAXXZ __==__ public: void __cdecl mysqlx::abi2::r0::common::Settings_impl::Data::clear_connection_attr(void) ?close@Client_detail@internal@r0@abi2@mysqlx@@QEAAXXZ __==__ public: void __cdecl mysqlx::abi2::r0::internal::Client_detail::close(void) ?close@Session_detail@internal@r0@abi2@mysqlx@@IEAAXXZ __==__ protected: void __cdecl mysqlx::abi2::r0::internal::Session_detail::close(void) -?col_count@?$Row_result_detail@VColumns@r0@abi2@mysqlx@@@internal@r0@abi2@mysqlx@@IEBAKXZ __==__ protected: unsigned long __cdecl mysqlx::abi2::r0::internal::Row_result_detail::col_count(void)const -?col_count@Row_detail@internal@r0@abi2@mysqlx@@IEBAKXZ __==__ protected: unsigned long __cdecl mysqlx::abi2::r0::internal::Row_detail::col_count(void)const +?col_count@?$Row_result_detail@VColumns@r0@abi2@mysqlx@@@internal@r0@abi2@mysqlx@@IEBAKXZ __==__ protected: unsigned long __cdecl mysqlx::abi2::r0::internal::Row_result_detail::col_count(void)const +?col_count@Row_detail@internal@r0@abi2@mysqlx@@IEBAKXZ __==__ protected: unsigned long __cdecl mysqlx::abi2::r0::internal::Row_detail::col_count(void)const ?commit@Session_detail@internal@r0@abi2@mysqlx@@IEAAXXZ __==__ protected: void __cdecl mysqlx::abi2::r0::internal::Session_detail::commit(void) ?compression_mode_name@Settings_impl@common@r0@abi2@mysqlx@@SAPEBDW4Compression_mode@12345@@Z __==__ public: static char const * __cdecl mysqlx::abi2::r0::common::Settings_impl::compression_mode_name(enum mysqlx::abi2::r0::common::Settings_impl::Compression_mode) ?count@Doc_result_detail@internal@r0@abi2@mysqlx@@IEAA_KXZ __==__ protected: unsigned __int64 __cdecl mysqlx::abi2::r0::internal::Doc_result_detail::count(void) @@ -256,8 +257,8 @@ Note: Generated at connector version 2.0.30 ?drop_collection@Schema_detail@internal@r0@abi2@mysqlx@@IEAAXAEBVstring@345@@Z __==__ protected: void __cdecl mysqlx::abi2::r0::internal::Schema_detail::drop_collection(class mysqlx::abi2::r0::string const &) ?drop_schema@Session_detail@internal@r0@abi2@mysqlx@@IEAAXAEBVstring@345@@Z __==__ protected: void __cdecl mysqlx::abi2::r0::internal::Session_detail::drop_schema(class mysqlx::abi2::r0::string const &) ?end@DbDoc@r0@abi2@mysqlx@@UEAA?AVIterator@1234@XZ __==__ public: virtual class mysqlx::abi2::r0::DbDoc::Iterator __cdecl mysqlx::abi2::r0::DbDoc::end(void) -?end@Doc_result_detail@internal@r0@abi2@mysqlx@@QEBA?AU?$Iterator@VDoc_result_detail@internal@r0@abi2@mysqlx@@VDbDoc@345@_JPEAV6345@AEAV6345@@2345@XZ __==__ public: struct mysqlx::abi2::r0::internal::Iterator __cdecl mysqlx::abi2::r0::internal::Doc_result_detail::end(void)const -?end@Settings_impl@common@r0@abi2@mysqlx@@QEBA?AV?$_Vector_const_iterator@V?$_Vector_val@U?$_Simple_types@U?$pair@HVValue@common@r0@abi2@mysqlx@@@std@@@std@@@std@@@std@@XZ __==__ public: class std::_Vector_const_iterator > > > __cdecl mysqlx::abi2::r0::common::Settings_impl::end(void)const +?end@Doc_result_detail@internal@r0@abi2@mysqlx@@QEBA?AU?$Iterator@VDoc_result_detail@internal@r0@abi2@mysqlx@@VDbDoc@345@_JPEAV6345@AEAV6345@@2345@XZ __==__ public: struct mysqlx::abi2::r0::internal::Iterator __cdecl mysqlx::abi2::r0::internal::Doc_result_detail::end(void)const +?end@Settings_impl@common@r0@abi2@mysqlx@@QEBA?AV?$_Vector_const_iterator@V?$_Vector_val@U?$_Simple_types@U?$pair@HVValue@common@r0@abi2@mysqlx@@@std@@@std@@@std@@@std@@XZ __==__ public: class std::_Vector_const_iterator > > > __cdecl mysqlx::abi2::r0::common::Settings_impl::end(void)const ?english_ci@?$Collation@$02@r0@abi2@mysqlx@@2UCollationInfo@234@B __==__ public: static struct mysqlx::abi2::r0::CollationInfo const mysqlx::abi2::r0::Collation<3>::english_ci ?ensure_impl@Row_detail@internal@r0@abi2@mysqlx@@IEAAXXZ __==__ protected: void __cdecl mysqlx::abi2::r0::internal::Row_detail::ensure_impl(void) ?eo_0900_ai_ci@?$Collation@$0BN@@r0@abi2@mysqlx@@2UCollationInfo@234@B __==__ public: static struct mysqlx::abi2::r0::CollationInfo const mysqlx::abi2::r0::Collation<29>::eo_0900_ai_ci @@ -281,7 +282,7 @@ Note: Generated at connector version 2.0.30 ?estonian_cs@?$Collation@$0BM@@r0@abi2@mysqlx@@2UCollationInfo@234@B __==__ public: static struct mysqlx::abi2::r0::CollationInfo const mysqlx::abi2::r0::Collation<28>::estonian_cs ?et_0900_ai_ci@?$Collation@$0BN@@r0@abi2@mysqlx@@2UCollationInfo@234@B __==__ public: static struct mysqlx::abi2::r0::CollationInfo const mysqlx::abi2::r0::Collation<29>::et_0900_ai_ci ?et_0900_as_cs@?$Collation@$0BN@@r0@abi2@mysqlx@@2UCollationInfo@234@B __==__ public: static struct mysqlx::abi2::r0::CollationInfo const mysqlx::abi2::r0::Collation<29>::et_0900_as_cs -?fieldType@DbDoc@r0@abi2@mysqlx@@UEBAHAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z __==__ public: virtual int __cdecl mysqlx::abi2::r0::DbDoc::fieldType(class std::basic_string,class std::allocator > const &)const +?fieldType@DbDoc@r0@abi2@mysqlx@@UEBAHAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z __==__ public: virtual int __cdecl mysqlx::abi2::r0::DbDoc::fieldType(class std::basic_string,class std::allocator > const &)const ?from_ucs4@Impl@string@r0@abi2@mysqlx@@SAXAEAV2345@AEBV?$basic_string@_UU?$char_traits@_U@std@@V?$allocator@_U@2@@std@@@Z __==__ public: static void __cdecl mysqlx::abi2::r0::string::Impl::from_ucs4(class mysqlx::abi2::r0::string &,class std::basic_string,class std::allocator > const &) ?from_utf8@Impl@string@r0@abi2@mysqlx@@SAXAEAV2345@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z __==__ public: static void __cdecl mysqlx::abi2::r0::string::Impl::from_utf8(class mysqlx::abi2::r0::string &,class std::basic_string,class std::allocator > const &) ?from_wide@Impl@string@r0@abi2@mysqlx@@SAXAEAV2345@AEBV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@@Z __==__ public: static void __cdecl mysqlx::abi2::r0::string::Impl::from_wide(class mysqlx::abi2::r0::string &,class std::basic_string,class std::allocator > const &) @@ -323,55 +324,55 @@ Note: Generated at connector version 2.0.30 ?german2_ci@?$Collation@$0BN@@r0@abi2@mysqlx@@2UCollationInfo@234@B __==__ public: static struct mysqlx::abi2::r0::CollationInfo const mysqlx::abi2::r0::Collation<29>::german2_ci ?german2_ci@?$Collation@$0BP@@r0@abi2@mysqlx@@2UCollationInfo@234@B __==__ public: static struct mysqlx::abi2::r0::CollationInfo const mysqlx::abi2::r0::Collation<31>::german2_ci ?german2_ci@?$Collation@$0CD@@r0@abi2@mysqlx@@2UCollationInfo@234@B __==__ public: static struct mysqlx::abi2::r0::CollationInfo const mysqlx::abi2::r0::Collation<35>::german2_ci -?get@Settings_impl@common@r0@abi2@mysqlx@@QEBAAEBVValue@2345@H@Z __==__ public: class mysqlx::abi2::r0::common::Value const & __cdecl mysqlx::abi2::r0::common::Settings_impl::get(int)const -?get_affected_rows@Result_detail@internal@r0@abi2@mysqlx@@IEBA_KXZ __==__ protected: unsigned __int64 __cdecl mysqlx::abi2::r0::internal::Result_detail::get_affected_rows(void)const +?get@Settings_impl@common@r0@abi2@mysqlx@@QEBAAEBVValue@2345@H@Z __==__ public: class mysqlx::abi2::r0::common::Value const & __cdecl mysqlx::abi2::r0::common::Settings_impl::get(int)const +?get_affected_rows@Result_detail@internal@r0@abi2@mysqlx@@IEBA_KXZ __==__ protected: unsigned __int64 __cdecl mysqlx::abi2::r0::internal::Result_detail::get_affected_rows(void)const ?get_attributes@Settings_impl@common@r0@abi2@mysqlx@@QEAAXAEAUAttr_processor@ds@cdk@@@Z __==__ public: void __cdecl mysqlx::abi2::r0::common::Settings_impl::get_attributes(struct cdk::ds::Attr_processor &) -?get_auto_increment@Result_detail@internal@r0@abi2@mysqlx@@IEBA_KXZ __==__ protected: unsigned __int64 __cdecl mysqlx::abi2::r0::internal::Result_detail::get_auto_increment(void)const -?get_bool@Value@common@r0@abi2@mysqlx@@QEBA_NXZ __==__ public: bool __cdecl mysqlx::abi2::r0::common::Value::get_bool(void)const -?get_bytes@Row_detail@internal@r0@abi2@mysqlx@@IEBA?AVbytes@345@K@Z __==__ protected: class mysqlx::abi2::r0::bytes __cdecl mysqlx::abi2::r0::internal::Row_detail::get_bytes(unsigned long)const -?get_bytes@Value@common@r0@abi2@mysqlx@@QEBAPEBEPEA_K@Z __==__ public: unsigned char const * __cdecl mysqlx::abi2::r0::common::Value::get_bytes(unsigned __int64 *)const +?get_auto_increment@Result_detail@internal@r0@abi2@mysqlx@@IEBA_KXZ __==__ protected: unsigned __int64 __cdecl mysqlx::abi2::r0::internal::Result_detail::get_auto_increment(void)const +?get_bool@Value@common@r0@abi2@mysqlx@@QEBA_NXZ __==__ public: bool __cdecl mysqlx::abi2::r0::common::Value::get_bool(void)const +?get_bytes@Row_detail@internal@r0@abi2@mysqlx@@IEBA?AVbytes@345@K@Z __==__ protected: class mysqlx::abi2::r0::bytes __cdecl mysqlx::abi2::r0::internal::Row_detail::get_bytes(unsigned long)const +?get_bytes@Value@common@r0@abi2@mysqlx@@QEBAPEBEPEA_K@Z __==__ public: unsigned char const * __cdecl mysqlx::abi2::r0::common::Value::get_bytes(unsigned __int64 *)const ?get_cdk_session@Session_detail@internal@r0@abi2@mysqlx@@IEAAAEAVSession@cdk@@XZ __==__ protected: class cdk::Session & __cdecl mysqlx::abi2::r0::internal::Session_detail::get_cdk_session(void) -?get_charset@Column_detail@internal@r0@abi2@mysqlx@@IEBA?AW4CharacterSet@345@XZ __==__ protected: enum mysqlx::abi2::r0::CharacterSet __cdecl mysqlx::abi2::r0::internal::Column_detail::get_charset(void)const -?get_collation@Column_detail@internal@r0@abi2@mysqlx@@IEBAAEBUCollationInfo@345@XZ __==__ protected: struct mysqlx::abi2::r0::CollationInfo const & __cdecl mysqlx::abi2::r0::internal::Column_detail::get_collation(void)const -?get_column@?$Row_result_detail@VColumns@r0@abi2@mysqlx@@@internal@r0@abi2@mysqlx@@IEBAAEBVColumn@345@K@Z __==__ protected: class mysqlx::abi2::r0::Column const & __cdecl mysqlx::abi2::r0::internal::Row_result_detail::get_column(unsigned long)const -?get_columns@?$Row_result_detail@VColumns@r0@abi2@mysqlx@@@internal@r0@abi2@mysqlx@@IEBAAEBVColumns@345@XZ __==__ protected: class mysqlx::abi2::r0::Columns const & __cdecl mysqlx::abi2::r0::internal::Row_result_detail::get_columns(void)const +?get_charset@Column_detail@internal@r0@abi2@mysqlx@@IEBA?AW4CharacterSet@345@XZ __==__ protected: enum mysqlx::abi2::r0::CharacterSet __cdecl mysqlx::abi2::r0::internal::Column_detail::get_charset(void)const +?get_collation@Column_detail@internal@r0@abi2@mysqlx@@IEBAAEBUCollationInfo@345@XZ __==__ protected: struct mysqlx::abi2::r0::CollationInfo const & __cdecl mysqlx::abi2::r0::internal::Column_detail::get_collation(void)const +?get_column@?$Row_result_detail@VColumns@r0@abi2@mysqlx@@@internal@r0@abi2@mysqlx@@IEBAAEBVColumn@345@K@Z __==__ protected: class mysqlx::abi2::r0::Column const & __cdecl mysqlx::abi2::r0::internal::Row_result_detail::get_column(unsigned long)const +?get_columns@?$Row_result_detail@VColumns@r0@abi2@mysqlx@@@internal@r0@abi2@mysqlx@@IEBAAEBVColumns@345@XZ __==__ protected: class mysqlx::abi2::r0::Columns const & __cdecl mysqlx::abi2::r0::internal::Row_result_detail::get_columns(void)const ?get_data_source@Settings_impl@common@r0@abi2@mysqlx@@QEAAXAEAVMulti_source@ds@cdk@@@Z __==__ public: void __cdecl mysqlx::abi2::r0::common::Settings_impl::get_data_source(class cdk::ds::Multi_source &) -?get_decimals@Column_detail@internal@r0@abi2@mysqlx@@IEBAGXZ __==__ protected: unsigned short __cdecl mysqlx::abi2::r0::internal::Column_detail::get_decimals(void)const +?get_decimals@Column_detail@internal@r0@abi2@mysqlx@@IEBAGXZ __==__ protected: unsigned short __cdecl mysqlx::abi2::r0::internal::Column_detail::get_decimals(void)const ?get_default_schema_name@Session_detail@internal@r0@abi2@mysqlx@@IEAA?AVstring@345@XZ __==__ protected: class mysqlx::abi2::r0::string __cdecl mysqlx::abi2::r0::internal::Session_detail::get_default_schema_name(void) ?get_doc@Doc_result_detail@internal@r0@abi2@mysqlx@@IEAA?AVDbDoc@345@XZ __==__ protected: class mysqlx::abi2::r0::DbDoc __cdecl mysqlx::abi2::r0::internal::Doc_result_detail::get_doc(void) ?get_docs@Doc_result_detail@internal@r0@abi2@mysqlx@@IEAA?AV?$List_initializer@AEAVDoc_result_detail@internal@r0@abi2@mysqlx@@@2345@XZ __==__ protected: class mysqlx::abi2::r0::internal::List_initializer __cdecl mysqlx::abi2::r0::internal::Doc_result_detail::get_docs(void) -?get_double@Value@common@r0@abi2@mysqlx@@QEBANXZ __==__ public: double __cdecl mysqlx::abi2::r0::common::Value::get_double(void)const -?get_float@Value@common@r0@abi2@mysqlx@@QEBAMXZ __==__ public: float __cdecl mysqlx::abi2::r0::common::Value::get_float(void)const -?get_generated_ids@Result_detail@internal@r0@abi2@mysqlx@@IEBA?AV?$List_initializer@AEBV?$vector@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V?$allocator@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@@std@@@2345@XZ __==__ protected: class mysqlx::abi2::r0::internal::List_initializer,class std::allocator >,class std::allocator,class std::allocator > > > const &> __cdecl mysqlx::abi2::r0::internal::Result_detail::get_generated_ids(void)const -?get_impl@Column_detail@internal@r0@abi2@mysqlx@@IEBAAEBVColumn_info@common@345@XZ __==__ protected: class mysqlx::abi2::r0::common::Column_info const & __cdecl mysqlx::abi2::r0::internal::Column_detail::get_impl(void)const +?get_double@Value@common@r0@abi2@mysqlx@@QEBANXZ __==__ public: double __cdecl mysqlx::abi2::r0::common::Value::get_double(void)const +?get_float@Value@common@r0@abi2@mysqlx@@QEBAMXZ __==__ public: float __cdecl mysqlx::abi2::r0::common::Value::get_float(void)const +?get_generated_ids@Result_detail@internal@r0@abi2@mysqlx@@IEBA?AV?$List_initializer@AEBV?$vector@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V?$allocator@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@@std@@@2345@XZ __==__ protected: class mysqlx::abi2::r0::internal::List_initializer,class std::allocator >,class std::allocator,class std::allocator > > > const &> __cdecl mysqlx::abi2::r0::internal::Result_detail::get_generated_ids(void)const +?get_impl@Column_detail@internal@r0@abi2@mysqlx@@IEBAAEBVColumn_info@common@345@XZ __==__ protected: class mysqlx::abi2::r0::common::Column_info const & __cdecl mysqlx::abi2::r0::internal::Column_detail::get_impl(void)const ?get_impl@Result_detail@internal@r0@abi2@mysqlx@@IEAAAEAVResult_impl@common@345@XZ __==__ protected: class mysqlx::abi2::r0::common::Result_impl & __cdecl mysqlx::abi2::r0::internal::Result_detail::get_impl(void) -?get_impl@Result_detail@internal@r0@abi2@mysqlx@@IEBAAEBVResult_impl@common@345@XZ __==__ protected: class mysqlx::abi2::r0::common::Result_impl const & __cdecl mysqlx::abi2::r0::internal::Result_detail::get_impl(void)const +?get_impl@Result_detail@internal@r0@abi2@mysqlx@@IEBAAEBVResult_impl@common@345@XZ __==__ protected: class mysqlx::abi2::r0::common::Result_impl const & __cdecl mysqlx::abi2::r0::internal::Result_detail::get_impl(void)const ?get_impl@Row_detail@internal@r0@abi2@mysqlx@@IEAAAEAVImpl@12345@XZ __==__ protected: class mysqlx::abi2::r0::internal::Row_detail::Impl & __cdecl mysqlx::abi2::r0::internal::Row_detail::get_impl(void) -?get_impl@Row_detail@internal@r0@abi2@mysqlx@@IEBAAEBVImpl@12345@XZ __==__ protected: class mysqlx::abi2::r0::internal::Row_detail::Impl const & __cdecl mysqlx::abi2::r0::internal::Row_detail::get_impl(void)const +?get_impl@Row_detail@internal@r0@abi2@mysqlx@@IEBAAEBVImpl@12345@XZ __==__ protected: class mysqlx::abi2::r0::internal::Row_detail::Impl const & __cdecl mysqlx::abi2::r0::internal::Row_detail::get_impl(void)const ?get_impl@Session_detail@internal@r0@abi2@mysqlx@@IEAAAEAVSession_impl@common@345@XZ __==__ protected: class mysqlx::abi2::r0::common::Session_impl & __cdecl mysqlx::abi2::r0::internal::Session_detail::get_impl(void) -?get_json@DbDoc@r0@abi2@mysqlx@@AEBAPEBDXZ __==__ private: char const * __cdecl mysqlx::abi2::r0::DbDoc::get_json(void)const -?get_label@Column_detail@internal@r0@abi2@mysqlx@@IEBA?AVstring@345@XZ __==__ protected: class mysqlx::abi2::r0::string __cdecl mysqlx::abi2::r0::internal::Column_detail::get_label(void)const -?get_length@Column_detail@internal@r0@abi2@mysqlx@@IEBAKXZ __==__ protected: unsigned long __cdecl mysqlx::abi2::r0::internal::Column_detail::get_length(void)const -?get_name@Column_detail@internal@r0@abi2@mysqlx@@IEBA?AVstring@345@XZ __==__ protected: class mysqlx::abi2::r0::string __cdecl mysqlx::abi2::r0::internal::Column_detail::get_name(void)const -?get_schema_name@Column_detail@internal@r0@abi2@mysqlx@@IEBA?AVstring@345@XZ __==__ protected: class mysqlx::abi2::r0::string __cdecl mysqlx::abi2::r0::internal::Column_detail::get_schema_name(void)const +?get_json@DbDoc@r0@abi2@mysqlx@@AEBAPEBDXZ __==__ private: char const * __cdecl mysqlx::abi2::r0::DbDoc::get_json(void)const +?get_label@Column_detail@internal@r0@abi2@mysqlx@@IEBA?AVstring@345@XZ __==__ protected: class mysqlx::abi2::r0::string __cdecl mysqlx::abi2::r0::internal::Column_detail::get_label(void)const +?get_length@Column_detail@internal@r0@abi2@mysqlx@@IEBAKXZ __==__ protected: unsigned long __cdecl mysqlx::abi2::r0::internal::Column_detail::get_length(void)const +?get_name@Column_detail@internal@r0@abi2@mysqlx@@IEBA?AVstring@345@XZ __==__ protected: class mysqlx::abi2::r0::string __cdecl mysqlx::abi2::r0::internal::Column_detail::get_name(void)const +?get_schema_name@Column_detail@internal@r0@abi2@mysqlx@@IEBA?AVstring@345@XZ __==__ protected: class mysqlx::abi2::r0::string __cdecl mysqlx::abi2::r0::internal::Column_detail::get_schema_name(void)const ?get_session_pool@Client_detail@internal@r0@abi2@mysqlx@@IEAAAEAV?$shared_ptr@VSession_pool@common@r0@abi2@mysqlx@@@std@@XZ __==__ protected: class std::shared_ptr & __cdecl mysqlx::abi2::r0::internal::Client_detail::get_session_pool(void) -?get_sint@Value@common@r0@abi2@mysqlx@@QEBA_JXZ __==__ public: __int64 __cdecl mysqlx::abi2::r0::common::Value::get_sint(void)const -?get_string@Value@common@r0@abi2@mysqlx@@QEBAAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@XZ __==__ public: class std::basic_string,class std::allocator > const & __cdecl mysqlx::abi2::r0::common::Value::get_string(void)const -?get_table_label@Column_detail@internal@r0@abi2@mysqlx@@IEBA?AVstring@345@XZ __==__ protected: class mysqlx::abi2::r0::string __cdecl mysqlx::abi2::r0::internal::Column_detail::get_table_label(void)const -?get_table_name@Column_detail@internal@r0@abi2@mysqlx@@IEBA?AVstring@345@XZ __==__ protected: class mysqlx::abi2::r0::string __cdecl mysqlx::abi2::r0::internal::Column_detail::get_table_name(void)const -?get_type@Column_detail@internal@r0@abi2@mysqlx@@IEBAIXZ __==__ protected: unsigned int __cdecl mysqlx::abi2::r0::internal::Column_detail::get_type(void)const -?get_type@Value@common@r0@abi2@mysqlx@@QEBA?AW4Type@12345@XZ __==__ public: enum mysqlx::abi2::r0::common::Value::Type __cdecl mysqlx::abi2::r0::common::Value::get_type(void)const -?get_uint@Value@common@r0@abi2@mysqlx@@QEBA_KXZ __==__ public: unsigned __int64 __cdecl mysqlx::abi2::r0::common::Value::get_uint(void)const -?get_ustring@Value@common@r0@abi2@mysqlx@@QEBAAEBV?$basic_string@_SU?$char_traits@_S@std@@V?$allocator@_S@2@@std@@XZ __==__ public: class std::basic_string,class std::allocator > const & __cdecl mysqlx::abi2::r0::common::Value::get_ustring(void)const +?get_sint@Value@common@r0@abi2@mysqlx@@QEBA_JXZ __==__ public: __int64 __cdecl mysqlx::abi2::r0::common::Value::get_sint(void)const +?get_string@Value@common@r0@abi2@mysqlx@@QEBAAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@XZ __==__ public: class std::basic_string,class std::allocator > const & __cdecl mysqlx::abi2::r0::common::Value::get_string(void)const +?get_table_label@Column_detail@internal@r0@abi2@mysqlx@@IEBA?AVstring@345@XZ __==__ protected: class mysqlx::abi2::r0::string __cdecl mysqlx::abi2::r0::internal::Column_detail::get_table_label(void)const +?get_table_name@Column_detail@internal@r0@abi2@mysqlx@@IEBA?AVstring@345@XZ __==__ protected: class mysqlx::abi2::r0::string __cdecl mysqlx::abi2::r0::internal::Column_detail::get_table_name(void)const +?get_type@Column_detail@internal@r0@abi2@mysqlx@@IEBAIXZ __==__ protected: unsigned int __cdecl mysqlx::abi2::r0::internal::Column_detail::get_type(void)const +?get_type@Value@common@r0@abi2@mysqlx@@QEBA?AW4Type@12345@XZ __==__ public: enum mysqlx::abi2::r0::common::Value::Type __cdecl mysqlx::abi2::r0::common::Value::get_type(void)const +?get_uint@Value@common@r0@abi2@mysqlx@@QEBA_KXZ __==__ public: unsigned __int64 __cdecl mysqlx::abi2::r0::common::Value::get_uint(void)const +?get_ustring@Value@common@r0@abi2@mysqlx@@QEBAAEBV?$basic_string@_SU?$char_traits@_S@std@@V?$allocator@_S@2@@std@@XZ __==__ public: class std::basic_string,class std::allocator > const & __cdecl mysqlx::abi2::r0::common::Value::get_ustring(void)const ?get_val@Row_detail@internal@r0@abi2@mysqlx@@IEAAAEAVValue@345@K@Z __==__ protected: class mysqlx::abi2::r0::Value & __cdecl mysqlx::abi2::r0::internal::Row_detail::get_val(unsigned long) ?get_warning@Result_detail@internal@r0@abi2@mysqlx@@IEAA?AVWarning@345@_K@Z __==__ protected: class mysqlx::abi2::r0::Warning __cdecl mysqlx::abi2::r0::internal::Result_detail::get_warning(unsigned __int64) -?get_warning_count@Result_detail@internal@r0@abi2@mysqlx@@IEBAIXZ __==__ protected: unsigned int __cdecl mysqlx::abi2::r0::internal::Result_detail::get_warning_count(void)const +?get_warning_count@Result_detail@internal@r0@abi2@mysqlx@@IEBAIXZ __==__ protected: unsigned int __cdecl mysqlx::abi2::r0::internal::Result_detail::get_warning_count(void)const ?get_warnings@Result_detail@internal@r0@abi2@mysqlx@@IEAA?AV?$List_initializer@V?$Array_source@UWarning_src@Result_detail@internal@r0@abi2@mysqlx@@VWarning@456@_JPEAV7456@AEAV7456@@internal@r0@abi2@mysqlx@@@2345@XZ __==__ protected: class mysqlx::abi2::r0::internal::List_initializer > __cdecl mysqlx::abi2::r0::internal::Result_detail::get_warnings(void) ?gl_0900_ai_ci@?$Collation@$0BN@@r0@abi2@mysqlx@@2UCollationInfo@234@B __==__ public: static struct mysqlx::abi2::r0::CollationInfo const mysqlx::abi2::r0::Collation<29>::gl_0900_ai_ci ?gl_0900_as_cs@?$Collation@$0BN@@r0@abi2@mysqlx@@2UCollationInfo@234@B __==__ public: static struct mysqlx::abi2::r0::CollationInfo const mysqlx::abi2::r0::Collation<29>::gl_0900_as_cs -?hasField@DbDoc@r0@abi2@mysqlx@@UEBA_NAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z __==__ public: virtual bool __cdecl mysqlx::abi2::r0::DbDoc::hasField(class std::basic_string,class std::allocator > const &)const -?has_data@Result_detail@internal@r0@abi2@mysqlx@@IEBA_NXZ __==__ protected: bool __cdecl mysqlx::abi2::r0::internal::Result_detail::has_data(void)const -?has_option@Settings_impl@common@r0@abi2@mysqlx@@QEBA_NH@Z __==__ public: bool __cdecl mysqlx::abi2::r0::common::Settings_impl::has_option(int)const +?hasField@DbDoc@r0@abi2@mysqlx@@UEBA_NAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z __==__ public: virtual bool __cdecl mysqlx::abi2::r0::DbDoc::hasField(class std::basic_string,class std::allocator > const &)const +?has_data@Result_detail@internal@r0@abi2@mysqlx@@IEBA_NXZ __==__ protected: bool __cdecl mysqlx::abi2::r0::internal::Result_detail::has_data(void)const +?has_option@Settings_impl@common@r0@abi2@mysqlx@@QEBA_NH@Z __==__ public: bool __cdecl mysqlx::abi2::r0::common::Settings_impl::has_option(int)const ?hr_0900_ai_ci@?$Collation@$0BN@@r0@abi2@mysqlx@@2UCollationInfo@234@B __==__ public: static struct mysqlx::abi2::r0::CollationInfo const mysqlx::abi2::r0::Collation<29>::hr_0900_ai_ci ?hr_0900_as_cs@?$Collation@$0BN@@r0@abi2@mysqlx@@2UCollationInfo@234@B __==__ public: static struct mysqlx::abi2::r0::CollationInfo const mysqlx::abi2::r0::Collation<29>::hr_0900_as_cs ?hu_0900_ai_ci@?$Collation@$0BN@@r0@abi2@mysqlx@@2UCollationInfo@234@B __==__ public: static struct mysqlx::abi2::r0::CollationInfo const mysqlx::abi2::r0::Collation<29>::hu_0900_ai_ci @@ -391,12 +392,12 @@ Note: Generated at connector version 2.0.30 ?index_drop@Collection_detail@internal@r0@abi2@mysqlx@@IEAAXAEBVstring@345@@Z __==__ protected: void __cdecl mysqlx::abi2::r0::internal::Collection_detail::index_drop(class mysqlx::abi2::r0::string const &) ?init@?$Columns_detail@VColumn@r0@abi2@mysqlx@@@internal@r0@abi2@mysqlx@@IEAAXAEBVResult_impl@common@345@@Z __==__ protected: void __cdecl mysqlx::abi2::r0::internal::Columns_detail::init(class mysqlx::abi2::r0::common::Result_impl const &) ?init_connection_attr@Data@Settings_impl@common@r0@abi2@mysqlx@@QEAAXXZ __==__ public: void __cdecl mysqlx::abi2::r0::common::Settings_impl::Data::init_connection_attr(void) -?isNull@DbDoc@r0@abi2@mysqlx@@QEBA_NXZ __==__ public: bool __cdecl mysqlx::abi2::r0::DbDoc::isNull(void)const +?isNull@DbDoc@r0@abi2@mysqlx@@QEBA_NXZ __==__ public: bool __cdecl mysqlx::abi2::r0::DbDoc::isNull(void)const ?is_0900_ai_ci@?$Collation@$0BN@@r0@abi2@mysqlx@@2UCollationInfo@234@B __==__ public: static struct mysqlx::abi2::r0::CollationInfo const mysqlx::abi2::r0::Collation<29>::is_0900_ai_ci ?is_0900_as_cs@?$Collation@$0BN@@r0@abi2@mysqlx@@2UCollationInfo@234@B __==__ public: static struct mysqlx::abi2::r0::CollationInfo const mysqlx::abi2::r0::Collation<29>::is_0900_as_cs -?is_null@Value@common@r0@abi2@mysqlx@@QEBA_NXZ __==__ public: bool __cdecl mysqlx::abi2::r0::common::Value::is_null(void)const -?is_padded@Column_detail@internal@r0@abi2@mysqlx@@IEBA_NXZ __==__ protected: bool __cdecl mysqlx::abi2::r0::internal::Column_detail::is_padded(void)const -?is_signed@Column_detail@internal@r0@abi2@mysqlx@@IEBA_NXZ __==__ protected: bool __cdecl mysqlx::abi2::r0::internal::Column_detail::is_signed(void)const +?is_null@Value@common@r0@abi2@mysqlx@@QEBA_NXZ __==__ public: bool __cdecl mysqlx::abi2::r0::common::Value::is_null(void)const +?is_padded@Column_detail@internal@r0@abi2@mysqlx@@IEBA_NXZ __==__ protected: bool __cdecl mysqlx::abi2::r0::internal::Column_detail::is_padded(void)const +?is_signed@Column_detail@internal@r0@abi2@mysqlx@@IEBA_NXZ __==__ protected: bool __cdecl mysqlx::abi2::r0::internal::Column_detail::is_signed(void)const ?iterator_get@Collection_src@Schema_detail@internal@r0@abi2@mysqlx@@QEAA?AVCollection@456@XZ __==__ public: class mysqlx::abi2::r0::Collection __cdecl mysqlx::abi2::r0::internal::Schema_detail::Collection_src::iterator_get(void) ?iterator_get@Doc_result_detail@internal@r0@abi2@mysqlx@@AEAA?AVDbDoc@345@XZ __==__ private: class mysqlx::abi2::r0::DbDoc __cdecl mysqlx::abi2::r0::internal::Doc_result_detail::iterator_get(void) ?iterator_get@Query_src@internal@r0@abi2@mysqlx@@QEAA?AVstring@345@XZ __==__ public: class mysqlx::abi2::r0::string __cdecl mysqlx::abi2::r0::internal::Query_src::iterator_get(void) @@ -465,9 +466,9 @@ Note: Generated at connector version 2.0.30 ?polish_ci@?$Collation@$0BP@@r0@abi2@mysqlx@@2UCollationInfo@234@B __==__ public: static struct mysqlx::abi2::r0::CollationInfo const mysqlx::abi2::r0::Collation<31>::polish_ci ?polish_ci@?$Collation@$0CD@@r0@abi2@mysqlx@@2UCollationInfo@234@B __==__ public: static struct mysqlx::abi2::r0::CollationInfo const mysqlx::abi2::r0::Collation<35>::polish_ci ?prepare_for_cmd@Session_detail@internal@r0@abi2@mysqlx@@IEAAXXZ __==__ protected: void __cdecl mysqlx::abi2::r0::internal::Session_detail::prepare_for_cmd(void) -?print@Column_detail@internal@r0@abi2@mysqlx@@MEBAXAEAV?$basic_ostream@DU?$char_traits@D@std@@@std@@@Z __==__ protected: virtual void __cdecl mysqlx::abi2::r0::internal::Column_detail::print(class std::basic_ostream > &)const -?print@DbDoc@r0@abi2@mysqlx@@UEBAXAEAV?$basic_ostream@DU?$char_traits@D@std@@@std@@@Z __==__ public: virtual void __cdecl mysqlx::abi2::r0::DbDoc::print(class std::basic_ostream > &)const -?print@Value@common@r0@abi2@mysqlx@@MEBAXAEAV?$basic_ostream@DU?$char_traits@D@std@@@std@@@Z __==__ protected: virtual void __cdecl mysqlx::abi2::r0::common::Value::print(class std::basic_ostream > &)const +?print@Column_detail@internal@r0@abi2@mysqlx@@MEBAXAEAV?$basic_ostream@DU?$char_traits@D@std@@@std@@@Z __==__ protected: virtual void __cdecl mysqlx::abi2::r0::internal::Column_detail::print(class std::basic_ostream > &)const +?print@DbDoc@r0@abi2@mysqlx@@UEBAXAEAV?$basic_ostream@DU?$char_traits@D@std@@@std@@@Z __==__ public: virtual void __cdecl mysqlx::abi2::r0::DbDoc::print(class std::basic_ostream > &)const +?print@Value@common@r0@abi2@mysqlx@@MEBAXAEAV?$basic_ostream@DU?$char_traits@D@std@@@std@@@Z __==__ protected: virtual void __cdecl mysqlx::abi2::r0::common::Value::print(class std::basic_ostream > &)const ?process_one@Bind_detail@internal@r0@abi2@mysqlx@@KAXPEAUBind_if@common@345@AEBVValue@345@@Z __==__ protected: static void __cdecl mysqlx::abi2::r0::internal::Bind_detail::process_one(struct mysqlx::abi2::r0::common::Bind_if *,class mysqlx::abi2::r0::Value const &) ?process_one@Collection_add_detail@internal@r0@abi2@mysqlx@@KAXPEAUCollection_add_if@common@345@AEBVDbDoc@345@@Z __==__ protected: static void __cdecl mysqlx::abi2::r0::internal::Collection_add_detail::process_one(struct mysqlx::abi2::r0::common::Collection_add_if *,class mysqlx::abi2::r0::DbDoc const &) ?process_one@Collection_add_detail@internal@r0@abi2@mysqlx@@KAXPEAUCollection_add_if@common@345@AEBVstring@345@@Z __==__ protected: static void __cdecl mysqlx::abi2::r0::internal::Collection_add_detail::process_one(struct mysqlx::abi2::r0::common::Collection_add_if *,class mysqlx::abi2::r0::string const &) diff --git a/version.cmake b/version.cmake index e82de41c4..61ae1e9ef 100644 --- a/version.cmake +++ b/version.cmake @@ -65,7 +65,7 @@ endif() # set(ABI_VERSION_MAJOR 2 CACHE INTERNAL "version info") -set(ABI_VERSION_MINOR 0 CACHE INTERNAL "version info") +set(ABI_VERSION_MINOR 1 CACHE INTERNAL "version info") set( ABI_VERSION "${ABI_VERSION_MAJOR}.${ABI_VERSION_MINOR}" CACHE INTERNAL "version info" From 0444d025ac7e27847180eaa1397cd0eb97fc7fe6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lu=C3=ADs=20Silva?= Date: Fri, 3 Mar 2023 11:20:53 +0000 Subject: [PATCH 011/203] Fix missing symbols on some platforms Change-Id: Ie980463d319d49ff9033e0ba5a5bcbdee54713cc --- devapi/document.cc | 2 +- include/mysqlx/devapi/document.h | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/devapi/document.cc b/devapi/document.cc index a460d3feb..77aff0158 100644 --- a/devapi/document.cc +++ b/devapi/document.cc @@ -50,7 +50,7 @@ using std::endl; // Value::get specialization to allow convertion to common::Value type // -------------------- -// We need to export this template instantiation +// // We need to export this template instantiation template PUBLIC_API common::Value Value::get() const; template <> diff --git a/include/mysqlx/devapi/document.h b/include/mysqlx/devapi/document.h index aed18b979..880ded45d 100644 --- a/include/mysqlx/devapi/document.h +++ b/include/mysqlx/devapi/document.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2020, Oracle and/or its affiliates. + * Copyright (c) 2015, 2023, Oracle and/or its affiliates. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License, version 2.0, as @@ -394,6 +394,7 @@ class Value template + PUBLIC_API T get() const; //@} From 4ecf7460c3f840e6b6595d12ed0eb7ec1298ccad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lu=C3=ADs=20Silva?= Date: Mon, 6 Mar 2023 11:28:26 +0000 Subject: [PATCH 012/203] Fix clang warning on exported Value::get<>() Change-Id: I7ae65297007124a0a43c74d2b235ecdbdede6553 --- devapi/document.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/devapi/document.cc b/devapi/document.cc index 77aff0158..1c9687376 100644 --- a/devapi/document.cc +++ b/devapi/document.cc @@ -50,10 +50,9 @@ using std::endl; // Value::get specialization to allow convertion to common::Value type // -------------------- -// // We need to export this template instantiation -template PUBLIC_API common::Value Value::get() const; template <> +PUBLIC_API common::Value Value::get() const { if (getType() == DOCUMENT) { return common::Value::Access::mk_json(m_doc.get_json()); From 078bf8eadc90af708b459bd9f58b2f3f5f359af9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lu=C3=ADs=20Silva?= Date: Wed, 8 Mar 2023 11:05:47 +0000 Subject: [PATCH 013/203] Export only needed specialization of Value::get<>() Change-Id: Ibe49f7d958282b2ad70b7712965a52634c542436 --- devapi/document.cc | 1 - include/mysqlx/devapi/document.h | 4 +++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/devapi/document.cc b/devapi/document.cc index 1c9687376..7e1904dd8 100644 --- a/devapi/document.cc +++ b/devapi/document.cc @@ -52,7 +52,6 @@ using std::endl; template <> -PUBLIC_API common::Value Value::get() const { if (getType() == DOCUMENT) { return common::Value::Access::mk_json(m_doc.get_json()); diff --git a/include/mysqlx/devapi/document.h b/include/mysqlx/devapi/document.h index 880ded45d..86407a39a 100644 --- a/include/mysqlx/devapi/document.h +++ b/include/mysqlx/devapi/document.h @@ -394,7 +394,6 @@ class Value template - PUBLIC_API T get() const; //@} @@ -742,6 +741,9 @@ try {} CATCH_AND_WRAP +template <> +PUBLIC_API common::Value Value::get() const; + template<> inline int Value::get() const From 378579849076d083392ba792419c1d836f6da606 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lu=C3=ADs=20Silva?= Date: Fri, 10 Mar 2023 12:28:16 +0000 Subject: [PATCH 014/203] WL#15527 Remove deprecated std::shared_ptr<>::unique Since all usages were under lock, a simpler replace by std::shared_ptr<>::use_count() == 1 is enough. Change-Id: I364b3d6293795bd49b93735d4f11de75ea0db039 --- cdk/cmake/platform.cmake | 12 +----------- common/op_impl.h | 7 +++---- common/session.cc | 4 ++-- 3 files changed, 6 insertions(+), 17 deletions(-) diff --git a/cdk/cmake/platform.cmake b/cdk/cmake/platform.cmake index 8f598c1be..a108d7df9 100644 --- a/cdk/cmake/platform.cmake +++ b/cdk/cmake/platform.cmake @@ -1,4 +1,4 @@ -# Copyright (c) 2008, 2022, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2008, 2023, Oracle and/or its affiliates. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License, version 2.0, as @@ -205,16 +205,6 @@ else() endif() - -# Note: std::shared_ptr<>::unique is deprecated in C++17 [1]. -# TODO: Remove Supression once WL15527 is implemented -# [1] https://en.cppreference.com/w/cpp/memory/shared_ptr/unique - -if(TOOLSET_MSVC) - add_flags(CXX -D_SILENCE_CXX17_SHARED_PTR_UNIQUE_DEPRECATION_WARNING) -endif() - - ######################################################################## function(platform_detection_completed) diff --git a/common/op_impl.h b/common/op_impl.h index 4132e891c..cbd39a75f 100644 --- a/common/op_impl.h +++ b/common/op_impl.h @@ -160,8 +160,7 @@ class Op_base uint32_t create_stmt_id() { assert(m_sess); - if (!m_stmt_id.unique()) - { + if (m_stmt_id.use_count() != 1) { uint32_t id = m_sess->create_stmt_id(); if(id != 0) m_stmt_id.reset(new uint32_t(id)); @@ -173,7 +172,7 @@ class Op_base void release_stmt_id() { - if (m_stmt_id.unique()) + if (m_stmt_id.use_count() == 1) m_sess->release_stmt_id(*m_stmt_id); m_stmt_id.reset(); } @@ -186,7 +185,7 @@ class Op_base void reset_state() { - if (m_stmt_id.unique()) + if (m_stmt_id.use_count()==1) get_session()->error_stmt_id(*m_stmt_id); m_stmt_id.reset(); m_prepare_state = PS_EXECUTE; diff --git a/common/session.cc b/common/session.cc index 04c2dda17..284927f88 100644 --- a/common/session.cc +++ b/common/session.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2020, Oracle and/or its affiliates. + * Copyright (c) 2015, 2023, Oracle and/or its affiliates. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License, version 2.0, as @@ -1093,7 +1093,7 @@ void Session_pool::time_to_live_cleanup() auto it = m_pool.begin(); for(; it != m_pool.end(); ) { - if (it->first.unique() && it->second.m_deadline < current_time) + if (it->first.use_count()==1 && it->second.m_deadline < current_time) { // Note: removed session is not active and does not need calling // of the cleanup handler. From 2e1ecdc678db79c25aaea5abb3a62ce226882425 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lu=C3=ADs=20Silva?= Date: Tue, 14 Mar 2023 17:44:22 +0000 Subject: [PATCH 015/203] WL#15617 Fix compile Warnings on Windows using clang Change-Id: I8920726ba47d3fd5f83465ccf19e37e94a18df99 --- cdk/cmake/testing.cmake | 16 +++++++++------- devapi/CMakeLists.txt | 4 ++-- include/mysqlx/devapi/collection_crud.h | 2 +- xapi/CMakeLists.txt | 4 ++-- 4 files changed, 14 insertions(+), 12 deletions(-) diff --git a/cdk/cmake/testing.cmake b/cdk/cmake/testing.cmake index 03f1ac39b..9df2976c2 100644 --- a/cdk/cmake/testing.cmake +++ b/cdk/cmake/testing.cmake @@ -1,4 +1,4 @@ -# Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2015, 2023, Oracle and/or its affiliates. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License, version 2.0, as @@ -182,18 +182,20 @@ IF(WITH_TESTS) -Wno-unused-value ) - elseif((CMAKE_C_COMPILER_ID MATCHES "Clang") OR (CMAKE_CXX_COMPILER_ID MATCHES "Clang")) - #TODO: Remove -Wno-delete-non-abstract-non-virtual-dtor when bumping ABI and - # adding virtual destructor for DbDoc, Value and Column_detail - target_compile_options(${TEST} PRIVATE - -Wno-unused-value -Wno-delete-non-abstract-non-virtual-dtor - ) else() #target_compile_options(${TEST} PRIVATE -Wno-unused-result) endif() + if(CLANG) + + #TODO: Remove -Wno-delete-non-abstract-non-virtual-dtor when bumping ABI and + # adding virtual destructor for DbDoc, Value and Column_detail + target_compile_options(${TEST} PRIVATE + -Wno-unused-value -Wno-delete-non-abstract-non-virtual-dtor + ) +endif() if(CMAKE_CXX_COMPILER_ID MATCHES "SunPro") add_definitions( -D_POSIX_PTHREAD_SEMANTICS diff --git a/devapi/CMakeLists.txt b/devapi/CMakeLists.txt index 315b46b90..e476256bf 100644 --- a/devapi/CMakeLists.txt +++ b/devapi/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2015, 2023, Oracle and/or its affiliates. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License, version 2.0, as @@ -46,7 +46,7 @@ add_coverage(devapi) #TODO: Remove -Wno-delete-non-abstract-non-virtual-dtor when bumping ABI and # adding virtual destructor for DbDoc, Value and Column_detail -if((CMAKE_C_COMPILER_ID MATCHES "Clang") OR(CMAKE_CXX_COMPILER_ID MATCHES "Clang")) +if(CLANG) target_compile_options(devapi PRIVATE -Wno-delete-non-abstract-non-virtual-dtor ) diff --git a/include/mysqlx/devapi/collection_crud.h b/include/mysqlx/devapi/collection_crud.h index 5250fe563..c7f70b7bc 100644 --- a/include/mysqlx/devapi/collection_crud.h +++ b/include/mysqlx/devapi/collection_crud.h @@ -83,7 +83,7 @@ class Collection; class Table; template<> -common::Value Value::get() const; +PUBLIC_API common::Value Value::get() const; // ---------------------------------------------------------------------- diff --git a/xapi/CMakeLists.txt b/xapi/CMakeLists.txt index a40f9467b..019fe579c 100644 --- a/xapi/CMakeLists.txt +++ b/xapi/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2015, 2023, Oracle and/or its affiliates. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License, version 2.0, as @@ -59,7 +59,7 @@ add_coverage(xapi) #TODO: Remove -Wno-delete-non-abstract-non-virtual-dtor when bumping ABI and # adding virtual destructor for DbDoc, Value and Column_detail -if((CMAKE_C_COMPILER_ID MATCHES "Clang") OR(CMAKE_CXX_COMPILER_ID MATCHES "Clang")) +if(CLANG) target_compile_options(xapi PRIVATE -Wno-delete-non-abstract-non-virtual-dtor ) From ed3f33827bdd78d13d6d7d7921a42edfb7f01d18 Mon Sep 17 00:00:00 2001 From: Rafal Somla Date: Wed, 24 May 2023 13:32:19 +0200 Subject: [PATCH 016/203] Bump connector version to 8.1.0 --- version.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/version.cmake b/version.cmake index 61ae1e9ef..47c188d36 100644 --- a/version.cmake +++ b/version.cmake @@ -31,8 +31,8 @@ # set(CONCPP_VERSION_MAJOR 8 CACHE INTERNAL "version info") -set(CONCPP_VERSION_MINOR 0 CACHE INTERNAL "version info") -set(CONCPP_VERSION_MICRO 34 CACHE INTERNAL "version info") +set(CONCPP_VERSION_MINOR 1 CACHE INTERNAL "version info") +set(CONCPP_VERSION_MICRO 0 CACHE INTERNAL "version info") # Level is "-alpha", "-beta", empty if GA set(CONCPP_VERSION_LEVEL "" CACHE INTERNAL "version info") From f2b228d39ed48f95e433184ea0e9f2f1e33edba6 Mon Sep 17 00:00:00 2001 From: Rafal Somla Date: Wed, 24 May 2023 14:27:03 +0200 Subject: [PATCH 017/203] Fix padding for version number. --- version.cmake | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/version.cmake b/version.cmake index 47c188d36..a01169636 100644 --- a/version.cmake +++ b/version.cmake @@ -41,9 +41,23 @@ set(CONCPP_VERSION CACHE INTERNAL "version info" ) -#Update padding when Minor / Micro length changes +# Note version number format is XYYZZZZ +# TODO: Handle 3-digit versions + +if(CONCPP_VERSION_MINOR LESS 10) + set(PAD_MINOR "0") +else() + set(PAD_MINOR "") +endif() + +if(CONCPP_VERSION_MICRO LESS 10) + set(PAD_MICRO "000") +else() + set(PAD_MICRO "00") +endif() + set(CONCPP_VERSION_NUMBER - "${CONCPP_VERSION_MAJOR}0${CONCPP_VERSION_MINOR}00${CONCPP_VERSION_MICRO}" + "${CONCPP_VERSION_MAJOR}${PAD_MINOR}${CONCPP_VERSION_MINOR}${PAD_MICRO}${CONCPP_VERSION_MICRO}" CACHE INTERNAL "version info" ) From 3acee135f30d441d7de182eaf2dd9046db6e83f0 Mon Sep 17 00:00:00 2001 From: Rafal Somla Date: Tue, 30 May 2023 14:54:08 +0200 Subject: [PATCH 018/203] cdk: Refactor and cleanup dependency.cmake module. --- cdk/cmake/dependency.cmake | 521 ++++++++++++++++++++++--------------- 1 file changed, 313 insertions(+), 208 deletions(-) diff --git a/cdk/cmake/dependency.cmake b/cdk/cmake/dependency.cmake index 787eb5121..088cde930 100644 --- a/cdk/cmake/dependency.cmake +++ b/cdk/cmake/dependency.cmake @@ -28,6 +28,7 @@ #include(CMakeParseArguments) include(ProcessorCount) +include(config_options) ########################################################################## # @@ -62,12 +63,13 @@ set(EXT_FWD set(EXT_DIR ${CMAKE_CURRENT_LIST_DIR}/ext CACHE INTERNAL "external project utils location") + ########################################################################## # # add_ext(name header [tgt_name tgt]) # -# Add an external dependency(such as a 3rd party library) with name `name`. -# There are two cases(where NNN is the specified name) : +# Add an external dependency (such as a 3rd party library) with name `name`. +# There are two cases (where NNN is the specified name) : # # 1. Either location of the dependency is given using WTTH_NNN or related # options (see below), or @@ -75,287 +77,300 @@ set(EXT_DIR ${CMAKE_CURRENT_LIST_DIR}/ext CACHE INTERNAL "external project utils # 2. Dependency is built from bundled sources located at extra/NNN in the source # tree if no options are specified. # -# Parameter`header` names a file to be located at the dependency location to -# check +# In case 1 parameter `header` names a file to be located at the specified +# dependency location. In case 2 the `header` parameter is not used. Instead +# targets NNN-build/-rebuild are created that will be used to build the bundled +# sources before the dependency can be used. Invoking these (re)build targets +# is arranged later when `add_ext_targets()` is called (see below). # -# if it is correct. Variable `NNN_FOUND` is set to true/false to indicate if -# dependency was correctly located. +# Variable `NNN_FOUND` is set to true/false to indicate if dependency was +# correctly located/configurred. # # To use the dependency in the project some targets need to be created for it -# using `add_ext_targets() `. +# using `add_ext_targets()`. # -# If`tgt_name` and `tgt` parameters are given then it is assumed that the +# If `tgt_name` and `tgt` parameters are given then it is assumed that the # dependency is a single library and the target is created for it already here -# by a call to `add_ext_targets(name LIBRARY tgt_name tgt) `. -# -# If the dependency is built from bundled sources, targets `NNN-build` and -# `NNN-rebuild` are created to build or re-build the dependency if needed. +# by a call to `add_ext_targets(name LIBRARY tgt_name tgt)`. # function(add_ext NAME HEADER) + string(TOUPPER ${NAME} EXT_LIB) + + # TODO: resolve WITH_X in case it is a path + add_config_option(WITH_${EXT_LIB} STRING "Enable, disable or point to ${EXT_LIB} installation.") - add_config_option(${EXT_LIB}_DIR PATH "Path to ${EXT_LIB} instalation dir.") - add_config_option(${EXT_LIB}_ROOT_DIR PATH "Path to ${EXT_LIB} instalation dir.") - add_config_option(${EXT_LIB}_INCLUDE_DIR PATH "Path to ${EXT_LIB} include directory.") - add_config_option(${EXT_LIB}_LIB_DIR PATH "Path to ${EXT_LIB} lib directory.") - add_config_option(${EXT_LIB}_BIN_DIR PATH "Path to ${EXT_LIB} bin directory.") - add_config_option(${EXT_LIB}_LIBRARY STRING "${EXT_LIB} library name") - - set(${EXT_LIB}_FOUND "1" PARENT_SCOPE) - - # If defined, will use external third party dependencies - if(DEFINED WITH_${EXT_LIB} OR - DEFINED ${EXT_LIB}_DIR OR - DEFINED ${EXT_LIB}_ROOT_DIR OR - DEFINED ${EXT_LIB}_INCLUDE_DIR OR - DEFINED ${EXT_LIB}_LIB_DIR OR - DEFINED ${EXT_LIB}_LIBRARY) - - if(DEFINED WITH_${EXT_LIB} AND NOT WITH_${EXT_LIB}) - set(${EXT_LIB}_FOUND "0" PARENT_SCOPE) - return() + + # TODO: use option aliases for WITH_X (need to port it from CDK) + + add_config_option(${EXT_LIB}_DIR PATH ADVANCED + "Path to ${EXT_LIB} instalation dir." + ) + + add_config_option(${EXT_LIB}_ROOT_DIR PATH ADVANCED + "Path to ${EXT_LIB} instalation dir." + ) + + add_config_option(${EXT_LIB}_INCLUDE_DIR PATH ADVANCED + "Path to ${EXT_LIB} include directory." + ) + + add_config_option(${EXT_LIB}_LIB_DIR PATH ADVANCED + "Path to ${EXT_LIB} lib directory." + ) + + add_config_option(${EXT_LIB}_BIN_DIR PATH ADVANCED + "Path to ${EXT_LIB} bin directory." + ) + + add_config_option(${EXT_LIB}_LIBRARY PATH ADVANCED + "${EXT_LIB} library name" + ) + + + show_config_options() + + # Handle non-path value of WITH_X option + + if(DEFINED WITH_${EXT_LIB}) + + string(TOUPPER "${WITH_${EXT_LIB}}" with_val) + + if(with_val MATCHES "^SYSTEM$") + set(use_system 1) + elseif(with_val MATCHES "^(YES|ON|1|TRUE)$") + set(use_bundled 1) + elseif(with_val MATCHES "^(NO|OFF|0|FALSE)") + message(FATAL_ERROR "Dependency ${EXT_LIB} is required.") endif() - if(DEFINED WITH_${EXT_LIB} AND NOT WITH_${EXT_LIB} STREQUAL "system" AND EXISTS ${WITH_${EXT_LIB}}) - if(DEFINED ${EXT_LIB}_ROOT_DIR) - message(FATAL_ERROR "Can't specify both WITH_${EXT_LIB} and ${EXT_LIB}_ROOT_DIR") - endif() + endif() - set(${EXT_LIB}_ROOT_DIR ${WITH_${EXT_LIB}}) - elseif(DEFINED ${EXT_LIB}_DIR) - if(DEFINED ${EXT_LIB}_ROOT_DIR) - message(FATAL_ERROR "Can't specify both ${NAME}_DIR and ${NAME}_ROOT_DIR") - endif() + # Set X_ROOT_DIR if specified (monolithic install) + + if(DEFINED WITH_${EXT_LIB}) + + if(DEFINED ${EXT_LIB}_ROOT_DIR) + message(FATAL_ERROR "Can't specify both WITH_${EXT_LIB} and ${EXT_LIB}_ROOT_DIR") + endif() - set(${EXT_LIB}_ROOT_DIR ${${EXT_LIB}_DIR}) + if(NOT use_system AND NOT use_bundled) + set(${EXT_LIB}_ROOT_DIR "${WITH_${EXT_LIB}}") endif() - set(${EXT_LIB}_ROOT_DIR ${${EXT_LIB}_ROOT_DIR} PARENT_SCOPE) + elseif(DEFINED ${EXT_LIB}_DIR) - if(DEFINED ${EXT_LIB}_ROOT_DIR AND(DEFINED ${EXT_LIB}_INCLUDE_DIR OR DEFINED ${EXT_LIB}_LIB_DIR OR DEFINED ${EXT_LIB}_LIBRARY)) - message(FATAL_ERROR "Can't specify both ${EXT_LIB} root dir and include/libs parameters") + if(DEFINED ${EXT_LIB}_ROOT_DIR) + message(FATAL_ERROR "Can't specify both ${NAME}_DIR and ${NAME}_ROOT_DIR") endif() - if(DEFINED ${EXT_LIB}_LIBRARY AND NOT ${ARGC} GREATER 2) - message(FATAL_ERROR "${EXT_LIB}_LIB_DIR can't be used on ${EXT_LIB} since it has multiple libs") + set(${EXT_LIB}_ROOT_DIR "${${EXT_LIB}_DIR}") + + endif() + + + if(DEFINED ${EXT_LIB}_ROOT_DIR) + + set(${EXT_LIB}_ROOT_DIR "${${EXT_LIB}_ROOT_DIR}" PARENT_SCOPE) + #message(STATUS "!!! _ROOT_DIR: ${${EXT_LIB}_ROOT_DIR}") + + if( + DEFINED ${EXT_LIB}_INCLUDE_DIR OR + DEFINED ${EXT_LIB}_LIB_DIR OR + DEFINED ${EXT_LIB}_LIBRARY + ) + message(FATAL_ERROR "Can't specify both ${EXT_LIB} root dir and include/libs parameters") endif() + endif() + + set(${EXT_LIB}_FOUND "0" PARENT_SCOPE) + + + if( + use_bundled OR NOT( + use_system OR + DEFINED ${EXT_LIB}_ROOT_DIR OR + DEFINED ${EXT_LIB}_INCLUDE_DIR OR + DEFINED ${EXT_LIB}_LIB_DIR OR + DEFINED ${EXT_LIB}_LIBRARY + ) + ) + + # Use the bundled sources. + + add_ext_build_targets("${NAME}") + set(${EXT_LIB}_FOUND "1" PARENT_SCOPE) + + else() + + # Use external third party dependency + + # if(DEFINED WITH_${EXT_LIB} AND NOT WITH_${EXT_LIB}) + # return() + # endif() + # Let's find the header + if(DEFINED ${EXT_LIB}_ROOT_DIR) - set(suffix PATHS ${${EXT_LIB}_ROOT_DIR} + + set(find_opts PATHS ${${EXT_LIB}_ROOT_DIR} PATH_SUFFIXES include NO_DEFAULT_PATH ) elseif(DEFINED ${EXT_LIB}_INCLUDE_DIR) - set(suffix PATHS ${${EXT_LIB}_INCLUDE_DIR} + + set(find_opts PATHS ${${EXT_LIB}_INCLUDE_DIR} NO_DEFAULT_PATH ) + endif() - unset(${EXT_LIB}-include CACHE) + unset(${EXT_LIB}_INCLUDE_DIR CACHE) + + message(STATUS "Looking for header using options: ${find_opts}") - find_path(${EXT_LIB}-include + find_path(${EXT_LIB}_INCLUDE_DIR NAMES ${HEADER} - ${suffix} + ${find_opts} REQUIRED ) - message(STATUS "${EXT_LIB} INCLUDES : ${${EXT_LIB}-include}") + message(STATUS "${EXT_LIB} INCLUDES : ${${EXT_LIB}_INCLUDE_DIR}") - else() - set(src_dir ${PROJECT_SOURCE_DIR}/extra/${NAME}) - set(bin_dir ${CMAKE_CURRENT_BINARY_DIR}/${NAME}) + if(${EXT_LIB}_INCLUDE_DIR) + set(${EXT_LIB}_FOUND "1" PARENT_SCOPE) + endif() - file(MAKE_DIRECTORY ${bin_dir}) + endif() - # - # Copy cmake cache and internal files to avoid expensive platform - # detection/checks (as external projects are built on the same platform - # as the main project) - # - if(COMMAND init_ext_build) - init_ext_build(${bin_dir}) - endif() + if(DEFINED ${EXT_LIB}_LIBRARY AND NOT ${ARGC} GREATER 2) + # FIXME: Why this limitation? + message(FATAL_ERROR + "${EXT_LIB}_LIB_DIR can't be used on ${EXT_LIB} since it has multiple libs" + ) + endif() - set(cmake_opts) + if(${ARGC} GREATER 2) + add_ext_targets(${NAME} LIBRARY ${ARGN}) + endif() - message("== configuring external build of ${NAME}") - message("-- sources at: ${src_dir}") - message("-- generator: ${CMAKE_GENERATOR}") +endfunction(add_ext) - # Note: if we initialized build location above, there is no need to pass - # toolset/platform options in cmake invocation (the information is - # already in the cache). In fact, in this situation cmake errors out if - # these options are passed. - if(NOT COMMAND init_ext_build) - if(CMAKE_GENERATOR_TOOLSET) - message("-- toolset: ${CMAKE_GENERATOR_TOOLSET}") - list(APPEND cmake_opts "-T ${CMAKE_GENERATOR_TOOLSET}") - endif() +function(add_ext_build_targets NAME) - if(CMAKE_GENERATOR_PLATFORM) - message("-- platform: ${CMAKE_GENERATOR_PLATFORM}") - list(APPEND cmake_opts "-A ${CMAKETO_GENERATOR_PLATFORM}") - endif() + set(src_dir ${PROJECT_SOURCE_DIR}/extra/${NAME}) + set(bin_dir ${CMAKE_CURRENT_BINARY_DIR}/${NAME}) - endif() + file(MAKE_DIRECTORY ${bin_dir}) - foreach(var ${EXT_FWD}) - if(${var}) - message("-- option ${var}: ${${var}}") - list(APPEND cmake_opts -D${var}=${${var}}) - endif() - endforeach() + # + # Copy cmake cache and internal files to avoid expensive platform + # detection/checks (as external projects are built on the same platform + # as the main project) + # - message("-- ----") + if(COMMAND init_ext_build) + init_ext_build(${bin_dir}) + endif() - execute_process( - COMMAND ${CMAKE_COMMAND} - -G ${CMAKE_GENERATOR} ${cmake_opts} - -Wno-dev --no-warn-unused-cli - ${src_dir} - WORKING_DIRECTORY ${bin_dir} - RESULT_VARIABLE res - ) + set(cmake_opts) - if(res) - message(FATAL_ERROR - "Failed to configure external build of ${NAME}: ${res}" - ) - endif() + message("== configuring external build of ${NAME}") + message("-- sources at: ${src_dir}") + message("-- generator: ${CMAKE_GENERATOR}") - message("== done configuring external build of ${NAME}") + # Note: if we initialized build location above, there is no need to pass + # toolset/platform options in cmake invocation (the information is + # already in the cache). In fact, in this situation cmake errors out if + # these options are passed. - # Option to use parallel builds (much faster!) - # Note: ninja does that by default - set(build_opt) - ProcessorCount(prc_cnt) + if(NOT COMMAND init_ext_build) + if(CMAKE_GENERATOR_TOOLSET) + message("-- toolset: ${CMAKE_GENERATOR_TOOLSET}") + list(APPEND cmake_opts "-T ${CMAKE_GENERATOR_TOOLSET}") + endif() - if(prc_cnt AND NOT CMAKE_VERSION VERSION_LESS 3.12) - list(APPEND build_opt --parallel ${prc_cnt}) + if(CMAKE_GENERATOR_PLATFORM) + message("-- platform: ${CMAKE_GENERATOR_PLATFORM}") + list(APPEND cmake_opts "-A ${CMAKETO_GENERATOR_PLATFORM}") endif() - add_custom_target(${NAME}-build - COMMAND ${CMAKE_COMMAND} - -DBIN_DIR=${bin_dir} - -DCONFIG=$ - -DOPTS=${build_opt} - -P ${EXT_DIR}/ext-build.cmake - - #COMMAND ${CMAKE_COMMAND} --build . --config $ ${build_opt} - #COMMAND ${CMAKE_COMMAND} -E touch ${bin_dir}/build.$.stamp - #COMMENT "building ${NAME}" - WORKING_DIRECTORY ${bin_dir} - ) + endif() - set_target_properties(${NAME}-build PROPERTIES FOLDER "Misc") + foreach(var ${EXT_FWD}) + if(${var}) + message("-- option ${var}: ${${var}}") + list(APPEND cmake_opts -D${var}=${${var}}) + endif() + endforeach() - add_custom_target(${NAME}-rebuild - COMMAND ${CMAKE_COMMAND} --build . --config $ --clean-first ${build_opt} - COMMAND ${CMAKE_COMMAND} -E touch ${bin_dir}/build.$.stamp - COMMENT "re-building ${NAME}" - WORKING_DIRECTORY ${bin_dir} - ) + message("-- ----") - set_target_properties(${NAME}-rebuild PROPERTIES FOLDER "Misc") + execute_process( + COMMAND ${CMAKE_COMMAND} + -G ${CMAKE_GENERATOR} ${cmake_opts} + -Wno-dev --no-warn-unused-cli + ${src_dir} + WORKING_DIRECTORY ${bin_dir} + RESULT_VARIABLE res + ) - add_dependencies(rebuild-ext ${NAME}-rebuild) + if(res) + message(FATAL_ERROR + "Failed to configure external build of ${NAME}: ${res}" + ) endif() - if(${ARGC} GREATER 2) - add_ext_targets(${NAME} LIBRARY ${ARGN}) - endif() -endfunction(add_ext) + message("== done configuring external build of ${NAME}") -if(NOT TARGET rebuild-ext) - add_custom_target(rebuild-ext) - set_target_properties(rebuild-ext PROPERTIES FOLDER "Misc") -endif() + # Option to use parallel builds (much faster!) + # Note: ninja does that by default + set(build_opt) + ProcessorCount(prc_cnt) -########################################################################## -# -# add_ext_lib(EXT target name) -# -# Expects include defined on ${EXT}-include and creates target ext::{target} -# pointing to library with ${name} and located on ${EXT}_ROOT_DIR (suffixes: lib -# lib64 dll) or ${${EXT}_LIB_DIR}. -# -function(add_ext_lib EXT target name) - # Search for the library - if(DEFINED ${EXT}_ROOT_DIR) - set(suffix PATHS ${${EXT}_ROOT_DIR} - PATH_SUFFIXES lib lib64 dll - NO_DEFAULT_PATH - ) - elseif(DEFINED ${EXT}_LIB_DIR) - set(suffix - PATHS ${${EXT}_LIB_DIR} - NO_DEFAULT_PATH - ) + if(prc_cnt AND NOT CMAKE_VERSION VERSION_LESS 3.12) + list(APPEND build_opt --parallel ${prc_cnt}) endif() - unset(library CACHE) - - find_library(library - NAMES ${name} lib${name} - ${suffix} - REQUIRED + add_custom_target(${NAME}-build + COMMAND ${CMAKE_COMMAND} + -DBIN_DIR=${bin_dir} + -DCONFIG=$ + -DOPTS=${build_opt} + -P ${EXT_DIR}/ext-build.cmake + + #COMMAND ${CMAKE_COMMAND} --build . --config $ ${build_opt} + #COMMAND ${CMAKE_COMMAND} -E touch ${bin_dir}/build.$.stamp + #COMMENT "building ${NAME}" + WORKING_DIRECTORY ${bin_dir} ) - message(STATUS "${EXT} LIBRARY : ${library}") + set_target_properties(${NAME}-build PROPERTIES FOLDER "Misc") - # if(NOT EXISTS ${${EXT}_include} OR NOT EXISTS ${library}) - # message(FATAL_ERROR "Couldn't find ${EXT} library.") - # endif() - - add_library(ext::${target} SHARED IMPORTED GLOBAL) - set_target_properties(ext::${target} PROPERTIES - IMPORTED_LOCATION ${library} - IMPORTED_IMPLIB ${library} - INTERFACE_INCLUDE_DIRECTORIES ${${EXT}-include}) -endfunction(add_ext_lib) + add_custom_target(${NAME}-rebuild + COMMAND ${CMAKE_COMMAND} --build . --config $ --clean-first ${build_opt} + COMMAND ${CMAKE_COMMAND} -E touch ${bin_dir}/build.$.stamp + COMMENT "re-building ${NAME}" + WORKING_DIRECTORY ${bin_dir} + ) -########################################################################## -# -# add_ext_exec(EXT target name) -# Creates target ext::{target} pointing to executable with ${name} and located -# on ${EXT}_ROOT_DIR (suffixes: bin) or ${${EXT}_BIN_DIR}. -# -function(add_ext_exec EXT target name) - # Search for the library - if(DEFINED ${EXT}_ROOT_DIR) - set(suffix PATHS ${${EXT}_ROOT_DIR} - PATH_SUFFIXES bin - NO_DEFAULT_PATH - ) + set_target_properties(${NAME}-rebuild PROPERTIES FOLDER "Misc") - elseif(DEFINED ${EXT}_BIN_DIR) - set(suffix PATHS ${${EXT_LIB}_BIN_DIR} - PATH_SUFFIXES bin - NO_DEFAULT_PATH - ) - endif() + add_dependencies(rebuild-ext ${NAME}-rebuild) - find_program(executable - NAMES ${name} - ${suffix} - NO_CACHE - ) +endfunction() - if(NOT executable) - message(FATAL_ERROR "Couldn't find ${name} executable.") - endif() - message(STATUS "${EXT} BINARY: ${executable}") +if(NOT TARGET rebuild-ext) + add_custom_target(rebuild-ext) + set_target_properties(rebuild-ext PROPERTIES FOLDER "Misc") +endif() - add_executable(ext::${target} IMPORTED GLOBAL) - set_target_properties(ext::${target} PROPERTIES - IMPORTED_LOCATION ${executable}) -endfunction(add_ext_exec) ########################################################################## # @@ -384,6 +399,7 @@ endfunction(add_ext_exec) # build is performed before the imported libraries are used. function(add_ext_targets EXT) + string(TOUPPER ${EXT} EXT_LIB) set(ext_dir ${CMAKE_CURRENT_BINARY_DIR}/${EXT}) @@ -463,4 +479,93 @@ function(add_ext_targets EXT) endif() endif() endwhile(ARGN) + endfunction(add_ext_targets) + + +########################################################################## +# +# add_ext_lib(EXT target name) +# +# Expects include defined on ${EXT}-include and creates target ext::{target} +# pointing to library with ${name} and located on ${EXT}_ROOT_DIR (suffixes: lib +# lib64 dll) or ${${EXT}_LIB_DIR}. +# + +function(add_ext_lib EXT target name) + # Search for the library + if(DEFINED ${EXT}_ROOT_DIR) + set(suffix PATHS ${${EXT}_ROOT_DIR} + PATH_SUFFIXES lib lib64 dll + NO_DEFAULT_PATH + ) + elseif(DEFINED ${EXT}_LIB_DIR) + set(suffix + PATHS ${${EXT}_LIB_DIR} + NO_DEFAULT_PATH + ) + endif() + + unset(library CACHE) + + find_library(library + NAMES ${name} lib${name} + ${suffix} + REQUIRED + ) + + message(STATUS "${EXT} LIBRARY : ${library}") + + # if(NOT EXISTS ${${EXT}_include} OR NOT EXISTS ${library}) + # message(FATAL_ERROR "Couldn't find ${EXT} library.") + # endif() + + add_library(ext::${target} SHARED IMPORTED GLOBAL) + + set_target_properties(ext::${target} PROPERTIES + IMPORTED_LOCATION ${library} + IMPORTED_IMPLIB ${library} + INTERFACE_INCLUDE_DIRECTORIES ${${EXT}_INCLUDE_DIR} + ) + +endfunction(add_ext_lib) + + +########################################################################## +# +# add_ext_exec(EXT target name) +# Creates target ext::{target} pointing to executable with ${name} and located +# on ${EXT}_ROOT_DIR (suffixes: bin) or ${${EXT}_BIN_DIR}. +# + +function(add_ext_exec EXT target name) + # Search for the library + if(DEFINED ${EXT}_ROOT_DIR) + set(suffix PATHS ${${EXT}_ROOT_DIR} + PATH_SUFFIXES bin + NO_DEFAULT_PATH + ) + + elseif(DEFINED ${EXT}_BIN_DIR) + set(suffix PATHS ${${EXT_LIB}_BIN_DIR} + PATH_SUFFIXES bin + NO_DEFAULT_PATH + ) + endif() + + find_program(executable + NAMES ${name} + ${suffix} + NO_CACHE + ) + + if(NOT executable) + message(FATAL_ERROR "Couldn't find ${name} executable.") + endif() + + message(STATUS "${EXT} BINARY: ${executable}") + + add_executable(ext::${target} IMPORTED GLOBAL) + set_target_properties(ext::${target} PROPERTIES + IMPORTED_LOCATION ${executable}) +endfunction(add_ext_exec) From 73597d2d5379d898bdfcea957fea024eea75fd41 Mon Sep 17 00:00:00 2001 From: Rafal Somla Date: Tue, 30 May 2023 16:21:00 +0200 Subject: [PATCH 019/203] OTel (step 1): Add external otel dependency. --- cdk/cmake/DepFindOtel.cmake | 66 + jdbc/CMakeLists.txt | 1 + jdbc/extra/otel/CMakeLists.txt | 21 + jdbc/extra/otel/README.txt | 69 + .../otel/opentelemetry-cpp-1.8.3/LICENSE | 201 ++ .../otel/opentelemetry-cpp-1.8.3/README.md | 136 ++ .../api/CMakeLists.txt | 104 ++ .../include/opentelemetry/baggage/baggage.h | 301 +++ .../opentelemetry/baggage/baggage_context.h | 39 + .../baggage/propagation/baggage_propagator.h | 54 + .../opentelemetry/common/attribute_value.h | 82 + .../opentelemetry/common/key_value_iterable.h | 63 + .../common/key_value_iterable_view.h | 141 ++ .../opentelemetry/common/kv_properties.h | 273 +++ .../api/include/opentelemetry/common/macros.h | 202 ++ .../opentelemetry/common/spin_lock_mutex.h | 135 ++ .../opentelemetry/common/string_util.h | 41 + .../include/opentelemetry/common/timestamp.h | 207 +++ .../api/include/opentelemetry/config.h | 14 + .../include/opentelemetry/context/context.h | 161 ++ .../opentelemetry/context/context_value.h | 29 + .../propagation/composite_propagator.h | 92 + .../context/propagation/global_propagator.h | 56 + .../context/propagation/noop_propagator.h | 40 + .../context/propagation/text_map_propagator.h | 59 + .../opentelemetry/context/runtime_context.h | 331 ++++ .../opentelemetry/detail/preprocessor.h | 13 + .../include/opentelemetry/logs/event_logger.h | 94 + .../logs/event_logger_provider.h | 36 + .../include/opentelemetry/logs/log_record.h | 81 + .../api/include/opentelemetry/logs/logger.h | 257 +++ .../opentelemetry/logs/logger_provider.h | 73 + .../opentelemetry/logs/logger_type_traits.h | 192 ++ .../api/include/opentelemetry/logs/noop.h | 114 ++ .../api/include/opentelemetry/logs/provider.h | 90 + .../api/include/opentelemetry/logs/severity.h | 61 + .../opentelemetry/metrics/async_instruments.h | 32 + .../api/include/opentelemetry/metrics/meter.h | 141 ++ .../opentelemetry/metrics/meter_provider.h | 31 + .../api/include/opentelemetry/metrics/noop.h | 214 +++ .../opentelemetry/metrics/observer_result.h | 52 + .../include/opentelemetry/metrics/provider.h | 59 + .../opentelemetry/metrics/sync_instruments.h | 197 ++ .../include/opentelemetry/nostd/detail/all.h | 21 + .../opentelemetry/nostd/detail/decay.h | 16 + .../nostd/detail/dependent_type.h | 20 + .../opentelemetry/nostd/detail/functional.h | 63 + .../opentelemetry/nostd/detail/invoke.h | 159 ++ .../opentelemetry/nostd/detail/trait.h | 75 + .../nostd/detail/type_pack_element.h | 53 + .../opentelemetry/nostd/detail/valueless.h | 14 + .../nostd/detail/variant_alternative.h | 40 + .../opentelemetry/nostd/detail/variant_fwd.h | 14 + .../opentelemetry/nostd/detail/variant_size.h | 33 + .../include/opentelemetry/nostd/detail/void.h | 28 + .../opentelemetry/nostd/function_ref.h | 92 + .../nostd/internal/absl/.clang-format | 3 + .../nostd/internal/absl/README.md | 4 + .../nostd/internal/absl/base/attributes.h | 621 +++++++ .../nostd/internal/absl/base/config.h | 671 +++++++ .../internal/absl/base/internal/identity.h | 37 + .../absl/base/internal/inline_variable.h | 107 ++ .../internal/absl/base/internal/invoke.h | 188 ++ .../nostd/internal/absl/base/macros.h | 220 +++ .../nostd/internal/absl/base/optimization.h | 181 ++ .../nostd/internal/absl/base/options.h | 211 +++ .../nostd/internal/absl/base/policy_checks.h | 113 ++ .../nostd/internal/absl/base/port.h | 26 + .../nostd/internal/absl/meta/type_traits.h | 772 ++++++++ .../internal/absl/types/bad_variant_access.h | 94 + .../internal/absl/types/internal/variant.h | 1646 +++++++++++++++++ .../nostd/internal/absl/types/variant.h | 866 +++++++++ .../nostd/internal/absl/utility/utility.h | 350 ++++ .../include/opentelemetry/nostd/shared_ptr.h | 204 ++ .../api/include/opentelemetry/nostd/span.h | 272 +++ .../include/opentelemetry/nostd/string_view.h | 219 +++ .../include/opentelemetry/nostd/type_traits.h | 157 ++ .../include/opentelemetry/nostd/unique_ptr.h | 175 ++ .../api/include/opentelemetry/nostd/utility.h | 156 ++ .../api/include/opentelemetry/nostd/variant.h | 76 + .../plugin/detail/dynamic_library_handle.h | 20 + .../plugin/detail/dynamic_load_unix.h | 72 + .../plugin/detail/dynamic_load_windows.h | 97 + .../opentelemetry/plugin/detail/loader_info.h | 24 + .../plugin/detail/tracer_handle.h | 23 + .../opentelemetry/plugin/detail/utility.h | 34 + .../opentelemetry/plugin/dynamic_load.h | 27 + .../include/opentelemetry/plugin/factory.h | 65 + .../api/include/opentelemetry/plugin/hook.h | 48 + .../api/include/opentelemetry/plugin/tracer.h | 109 ++ .../include/opentelemetry/std/shared_ptr.h | 20 + .../api/include/opentelemetry/std/span.h | 69 + .../include/opentelemetry/std/string_view.h | 25 + .../include/opentelemetry/std/type_traits.h | 20 + .../include/opentelemetry/std/unique_ptr.h | 20 + .../api/include/opentelemetry/std/utility.h | 69 + .../api/include/opentelemetry/std/variant.h | 230 +++ .../opentelemetry/trace/canonical_code.h | 141 ++ .../api/include/opentelemetry/trace/context.h | 33 + .../opentelemetry/trace/default_span.h | 67 + .../api/include/opentelemetry/trace/noop.h | 125 ++ .../trace/propagation/b3_propagator.h | 190 ++ .../trace/propagation/detail/hex.h | 79 + .../trace/propagation/detail/string.h | 62 + .../trace/propagation/http_trace_context.h | 177 ++ .../opentelemetry/trace/propagation/jaeger.h | 124 ++ .../include/opentelemetry/trace/provider.h | 59 + .../api/include/opentelemetry/trace/scope.h | 37 + .../trace/semantic_conventions.h | 1463 +++++++++++++++ .../api/include/opentelemetry/trace/span.h | 130 ++ .../opentelemetry/trace/span_context.h | 96 + .../trace/span_context_kv_iterable.h | 54 + .../trace/span_context_kv_iterable_view.h | 117 ++ .../api/include/opentelemetry/trace/span_id.h | 67 + .../opentelemetry/trace/span_metadata.h | 43 + .../opentelemetry/trace/span_startoptions.h | 45 + .../include/opentelemetry/trace/trace_flags.h | 52 + .../include/opentelemetry/trace/trace_id.h | 72 + .../include/opentelemetry/trace/trace_state.h | 318 ++++ .../api/include/opentelemetry/trace/tracer.h | 194 ++ .../opentelemetry/trace/tracer_provider.h | 31 + .../api/include/opentelemetry/version.h | 26 + 122 files changed, 17426 insertions(+) create mode 100644 cdk/cmake/DepFindOtel.cmake create mode 100644 jdbc/extra/otel/CMakeLists.txt create mode 100644 jdbc/extra/otel/README.txt create mode 100644 jdbc/extra/otel/opentelemetry-cpp-1.8.3/LICENSE create mode 100644 jdbc/extra/otel/opentelemetry-cpp-1.8.3/README.md create mode 100644 jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/CMakeLists.txt create mode 100644 jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/baggage/baggage.h create mode 100644 jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/baggage/baggage_context.h create mode 100644 jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/baggage/propagation/baggage_propagator.h create mode 100644 jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/common/attribute_value.h create mode 100644 jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/common/key_value_iterable.h create mode 100644 jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/common/key_value_iterable_view.h create mode 100644 jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/common/kv_properties.h create mode 100644 jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/common/macros.h create mode 100644 jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/common/spin_lock_mutex.h create mode 100644 jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/common/string_util.h create mode 100644 jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/common/timestamp.h create mode 100644 jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/config.h create mode 100644 jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/context/context.h create mode 100644 jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/context/context_value.h create mode 100644 jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/context/propagation/composite_propagator.h create mode 100644 jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/context/propagation/global_propagator.h create mode 100644 jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/context/propagation/noop_propagator.h create mode 100644 jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/context/propagation/text_map_propagator.h create mode 100644 jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/context/runtime_context.h create mode 100644 jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/detail/preprocessor.h create mode 100644 jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/logs/event_logger.h create mode 100644 jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/logs/event_logger_provider.h create mode 100644 jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/logs/log_record.h create mode 100644 jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/logs/logger.h create mode 100644 jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/logs/logger_provider.h create mode 100644 jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/logs/logger_type_traits.h create mode 100644 jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/logs/noop.h create mode 100644 jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/logs/provider.h create mode 100644 jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/logs/severity.h create mode 100644 jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/metrics/async_instruments.h create mode 100644 jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/metrics/meter.h create mode 100644 jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/metrics/meter_provider.h create mode 100644 jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/metrics/noop.h create mode 100644 jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/metrics/observer_result.h create mode 100644 jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/metrics/provider.h create mode 100644 jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/metrics/sync_instruments.h create mode 100644 jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/nostd/detail/all.h create mode 100644 jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/nostd/detail/decay.h create mode 100644 jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/nostd/detail/dependent_type.h create mode 100644 jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/nostd/detail/functional.h create mode 100644 jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/nostd/detail/invoke.h create mode 100644 jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/nostd/detail/trait.h create mode 100644 jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/nostd/detail/type_pack_element.h create mode 100644 jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/nostd/detail/valueless.h create mode 100644 jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/nostd/detail/variant_alternative.h create mode 100644 jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/nostd/detail/variant_fwd.h create mode 100644 jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/nostd/detail/variant_size.h create mode 100644 jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/nostd/detail/void.h create mode 100644 jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/nostd/function_ref.h create mode 100644 jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/nostd/internal/absl/.clang-format create mode 100644 jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/nostd/internal/absl/README.md create mode 100644 jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/nostd/internal/absl/base/attributes.h create mode 100644 jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/nostd/internal/absl/base/config.h create mode 100644 jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/nostd/internal/absl/base/internal/identity.h create mode 100644 jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/nostd/internal/absl/base/internal/inline_variable.h create mode 100644 jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/nostd/internal/absl/base/internal/invoke.h create mode 100644 jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/nostd/internal/absl/base/macros.h create mode 100644 jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/nostd/internal/absl/base/optimization.h create mode 100644 jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/nostd/internal/absl/base/options.h create mode 100644 jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/nostd/internal/absl/base/policy_checks.h create mode 100644 jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/nostd/internal/absl/base/port.h create mode 100644 jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/nostd/internal/absl/meta/type_traits.h create mode 100644 jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/nostd/internal/absl/types/bad_variant_access.h create mode 100644 jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/nostd/internal/absl/types/internal/variant.h create mode 100644 jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/nostd/internal/absl/types/variant.h create mode 100644 jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/nostd/internal/absl/utility/utility.h create mode 100644 jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/nostd/shared_ptr.h create mode 100644 jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/nostd/span.h create mode 100644 jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/nostd/string_view.h create mode 100644 jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/nostd/type_traits.h create mode 100644 jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/nostd/unique_ptr.h create mode 100644 jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/nostd/utility.h create mode 100644 jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/nostd/variant.h create mode 100644 jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/plugin/detail/dynamic_library_handle.h create mode 100644 jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/plugin/detail/dynamic_load_unix.h create mode 100644 jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/plugin/detail/dynamic_load_windows.h create mode 100644 jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/plugin/detail/loader_info.h create mode 100644 jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/plugin/detail/tracer_handle.h create mode 100644 jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/plugin/detail/utility.h create mode 100644 jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/plugin/dynamic_load.h create mode 100644 jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/plugin/factory.h create mode 100644 jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/plugin/hook.h create mode 100644 jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/plugin/tracer.h create mode 100644 jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/std/shared_ptr.h create mode 100644 jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/std/span.h create mode 100644 jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/std/string_view.h create mode 100644 jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/std/type_traits.h create mode 100644 jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/std/unique_ptr.h create mode 100644 jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/std/utility.h create mode 100644 jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/std/variant.h create mode 100644 jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/trace/canonical_code.h create mode 100644 jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/trace/context.h create mode 100644 jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/trace/default_span.h create mode 100644 jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/trace/noop.h create mode 100644 jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/trace/propagation/b3_propagator.h create mode 100644 jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/trace/propagation/detail/hex.h create mode 100644 jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/trace/propagation/detail/string.h create mode 100644 jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/trace/propagation/http_trace_context.h create mode 100644 jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/trace/propagation/jaeger.h create mode 100644 jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/trace/provider.h create mode 100644 jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/trace/scope.h create mode 100644 jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/trace/semantic_conventions.h create mode 100644 jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/trace/span.h create mode 100644 jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/trace/span_context.h create mode 100644 jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/trace/span_context_kv_iterable.h create mode 100644 jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/trace/span_context_kv_iterable_view.h create mode 100644 jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/trace/span_id.h create mode 100644 jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/trace/span_metadata.h create mode 100644 jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/trace/span_startoptions.h create mode 100644 jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/trace/trace_flags.h create mode 100644 jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/trace/trace_id.h create mode 100644 jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/trace/trace_state.h create mode 100644 jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/trace/tracer.h create mode 100644 jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/trace/tracer_provider.h create mode 100644 jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/version.h diff --git a/cdk/cmake/DepFindOtel.cmake b/cdk/cmake/DepFindOtel.cmake new file mode 100644 index 000000000..83c4209e2 --- /dev/null +++ b/cdk/cmake/DepFindOtel.cmake @@ -0,0 +1,66 @@ +# Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License, version 2.0, as +# published by the Free Software Foundation. +# +# This program is also distributed with certain software (including +# but not limited to OpenSSL) that is licensed under separate terms, +# as designated in a particular file or component or in included license +# documentation. The authors of MySQL hereby grant you an +# additional permission to link the program and your derivative works +# with the separately licensed software that they have included with +# MySQL. +# +# Without limiting anything contained in the foregoing, this file, +# which is part of MySQL Connector/C++, is also subject to the +# Universal FOSS Exception, version 1.0, a copy of which can be found at +# http://oss.oracle.com/licenses/universal-foss-exception. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the GNU General Public License, version 2.0, for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software Foundation, Inc., +# 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +# ############################################################################# +# +# Targets: +# +# (re)build-{otel} +# +# Imported/alias targets: +# +# otel::api +# + +if(TARGET otel::api) + return() +endif() + +message(STATUS "Setting up OpenTelemetry libraries.") + +####### +# OpenTelemetry +# +add_ext(otel tracer_provider.h) + +# message(STATUS "===================== ALL VARIABLES ============================") +# get_cmake_property(_variableNames VARIABLES) +# foreach(_variableName ${_variableNames}) +# message(STATUS "${_variableName}=${${_variableName}}") +# endforeach() + +if(NOT OTEL_FOUND) + message(FATAL_ERROR "Can't build without OpenTelemetry support") +endif() + +add_ext_targets(otel + LIBRARY opentelemetry_api otel_api +# LIBRARY resources otel_resources +# LIBRARY trace otel_trace +) + diff --git a/jdbc/CMakeLists.txt b/jdbc/CMakeLists.txt index 5182f9201..b9a8532b7 100644 --- a/jdbc/CMakeLists.txt +++ b/jdbc/CMakeLists.txt @@ -148,6 +148,7 @@ endif() find_dependency(MySQL) +find_dependency(Otel) #----------------- diff --git a/jdbc/extra/otel/CMakeLists.txt b/jdbc/extra/otel/CMakeLists.txt new file mode 100644 index 000000000..18c8c68e5 --- /dev/null +++ b/jdbc/extra/otel/CMakeLists.txt @@ -0,0 +1,21 @@ +# +# Copyright (c) 2022, 2023, Oracle and/or its affiliates. +# +project(otel) + +add_subdirectory(opentelemetry-cpp-1.8.3/api) + +# Export targets + +export( + TARGETS +# Note: opentelemetry_api is header-only -- see the generated exports.cmake + opentelemetry_api +# TODO: Are these really needed for our purposes? It seems these libraires +# depend on opentelemetry_sdk and we should not need to link to SDK +# opentelemetry_common +# opentelemetry_resources +# opentelemetry_trace + NAMESPACE otel_ + FILE "${PROJECT_BINARY_DIR}/exports.cmake" +) diff --git a/jdbc/extra/otel/README.txt b/jdbc/extra/otel/README.txt new file mode 100644 index 000000000..99c8e9c22 --- /dev/null +++ b/jdbc/extra/otel/README.txt @@ -0,0 +1,69 @@ +# Copyright (c) 2022, 2023, Oracle and/or its affiliates. + +HOWTO import a new opentelemetry-cpp package + +Using release 1.6.0 as an example, adjust to the proper release number. + +1) Read the release notes + +https://github.com/open-telemetry/opentelemetry-cpp/releases/tag/v1.6.0 + +If opentelemetry-cpp upgraded its own dependencies, +the following packages may need to be upgraded as well: + +- internal/extra/json +- internal/extra/opentelemetry-proto + +2) Download the .tar.gz + +https://github.com/open-telemetry/opentelemetry-cpp/archive/refs/tags/v1.6.0.tar.gz + +3) Unpack the .tar.gz in a sub directory + +cd internal/extra/opentelemetry-cpp +tar xvf opentelemetry-cpp-1.6.0.tar.gz + +This should create a directory named internal/extra/opentelemetry-cpp/opentelemetry-cpp-1.6.0 + +Code for a package MUST be in a dedicated sub directory. + +4) Remove un necessary code + +cd internal/extra/opentelemetry-cpp/opentelemetry-cpp-1.6.0 + +5) Commit and push. + +It is important to have a separate commit for the import alone, +for the git history. + +At this point, the new code is imported, but not used yet. + +6) Adjust CMake + +In internal/cmake/opentelemetry-cpp.cmake, +point the tag to the new release + +SET(OPENTELEMETRY_CPP_TAG "opentelemetry-cpp-1.6.0") + +7) Do a full build and test + +In particular, make sure the code still builds in MYSQL_MAINTAINER_MODE, +and adjust warnings flags for third party code if needed. + +See internal/extra/opentelemetry-cpp/CMakeFiles.txt + +8) Commit and push. + +At this point, the new code is used, +and the old code is still in the repository. + +9) Cleanup the previous release + +cd internal/extra/opentelemetry-cpp/ +rm -rf opentelemetry-cpp- + +10) Commit and push. + +It is important to have a separate commit for the cleanup alone, +for the git history. + diff --git a/jdbc/extra/otel/opentelemetry-cpp-1.8.3/LICENSE b/jdbc/extra/otel/opentelemetry-cpp-1.8.3/LICENSE new file mode 100644 index 000000000..261eeb9e9 --- /dev/null +++ b/jdbc/extra/otel/opentelemetry-cpp-1.8.3/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/jdbc/extra/otel/opentelemetry-cpp-1.8.3/README.md b/jdbc/extra/otel/opentelemetry-cpp-1.8.3/README.md new file mode 100644 index 000000000..fac6bcbb4 --- /dev/null +++ b/jdbc/extra/otel/opentelemetry-cpp-1.8.3/README.md @@ -0,0 +1,136 @@ +# OpenTelemetry C++ + +[![Slack](https://img.shields.io/badge/slack-@cncf/otel/cpp-brightgreen.svg?logo=slack)](https://cloud-native.slack.com/archives/C01N3AT62SJ) +[![codecov.io](https://codecov.io/gh/open-telemetry/opentelemetry-cpp/branch/main/graphs/badge.svg?)](https://codecov.io/gh/open-telemetry/opentelemetry-cpp/) +[![Build +Status](https://github.com/open-telemetry/opentelemetry-cpp/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/open-telemetry/opentelemetry-cpp/actions) +[![Release](https://img.shields.io/github/v/release/open-telemetry/opentelemetry-cpp?include_prereleases&style=)](https://github.com/open-telemetry/opentelemetry-cpp/releases/) + +The C++ [OpenTelemetry](https://opentelemetry.io/) client. + +## Project Status + +| Signal | Status | Project | +| ------- | ----------------------- | ------------------------------------------------------------------------ | +| Traces | Public Release | N/A | +| Metrics | Public Release | N/A | +| Logs | Experimental [1] | [Release Milestone](https://github.com/open-telemetry/opentelemetry-cpp/milestone/18)| + +* [1]: The current Log Signal Implementation is Experimental, and will change as + the current OpenTelemetry Log specification matures. The current + implementation can be included in build by setting `ENABLE_LOGS_PREVIEW` + preprocessor macro. + +## Supported C++ Versions + +Code shipped from this repository generally supports the following versions of +C++ standards: + +* ISO/IEC 14882:2011 (C++11, C++0x) +* ISO/IEC 14882:2014 (C++14, C++1y) +* ISO/IEC 14882:2017 (C++17, C++1z) +* ISO/IEC 14882:2020 (C++20) + +Any exceptions to this are noted in the individual `README.md` files. + +Please note that supporting the [C Programming +Language](https://en.wikipedia.org/wiki/C_(programming_language)) is not a goal +of the current project. + +## Supported Development Platforms + + Our CI pipeline builds and tests on following `x86-64` platforms: + +| Platform | Build type | +|---------------------------------------------------------------------|---------------| +| ubuntu-22.04 (GCC - 10, 12) | CMake, Bazel | +| ubuntu-20.04 (GCC 4.8 with -std=c++11 flag) | CMake [1] | +| ubuntu-20.04 (GCC 9.4.0) | CMake, Bazel | +| ubuntu-20.04 (Default GCC Compiler - 9.4.0 with -std=c++20 flags) | CMake, Bazel | +| macOS 12.0 (Xcode 14.2) | Bazel | +| Windows Server 2019 (Visual Studio Enterprise 2019) | CMake, Bazel | +| Windows Server 2022 (Visual Studio Enterprise 2022) | CMake | + +[1]: Bazel build is disabled for GCC 4.8, as gRPC library 1.38 and above + (required by OTLP expoter) don't build with this compiler. See gRPC [official + support](https://grpc.io/docs/#official-support) document. CMake build doesn't + build OTLP exporter with GCC 4.8. + +In general, the code shipped from this repository should build on all platforms +having C++ compiler with [supported C++ standards](#supported-c-versions). + +## Dependencies + +Please refer to [Dependencies.md](docs/dependencies.md) for OSS Dependencies and +license requirements. + +## Installation + +Please refer to [INSTALL.md](./INSTALL.md). + +## Getting Started + +As an application owner or the library author, you can find the getting started +guide and reference documentation on +[opentelemetry-cpp.readthedocs.io](https://opentelemetry-cpp.readthedocs.io/en/latest/) + +The `examples/simple` directory contains a minimal program demonstrating how to +instrument a small library using a simple `processor` and console `exporter`, +along with build files for CMake and Bazel. + +## Contributing + +See [CONTRIBUTING.md](CONTRIBUTING.md) + +We meet weekly, and the time of the meeting alternates between Monday at 13:00 +PT and Wednesday at 9:00 PT. The meeting is subject to change depending on +contributors' availability. Check the [OpenTelemetry community +calendar](https://calendar.google.com/calendar/embed?src=google.com_b79e3e90j7bbsa2n2p5an5lf60%40group.calendar.google.com) +for specific dates and Zoom meeting links. + +Meeting notes are available as a public [Google +doc](https://docs.google.com/document/d/1i1E4-_y4uJ083lCutKGDhkpi3n4_e774SBLi9hPLocw/edit?usp=sharing). +For edit access, get in touch on +[Slack](https://cloud-native.slack.com/archives/C01N3AT62SJ). + +[Maintainers](https://github.com/open-telemetry/community/blob/main/community-membership.md#maintainer) +([@open-telemetry/cpp-maintainers](https://github.com/orgs/open-telemetry/teams/cpp-maintainers)): + +* [Ehsan Saei](https://github.com/esigo) +* [Lalit Kumar Bhasin](https://github.com/lalitb), Microsoft +* [Tom Tan](https://github.com/ThomsonTan), Microsoft + +[Approvers](https://github.com/open-telemetry/community/blob/main/community-membership.md#approver) +([@open-telemetry/cpp-approvers](https://github.com/orgs/open-telemetry/teams/cpp-approvers)): + +* [Josh Suereth](https://github.com/jsuereth), Google +* [Marc Alff](https://github.com/marcalff), Oracle +* [Reiley Yang](https://github.com/reyang), Microsoft +* [WenTao Ou](https://github.com/owent), Tencent + +[Emeritus +Maintainer/Approver/Triager](https://github.com/open-telemetry/community/blob/main/community-membership.md#emeritus-maintainerapprovertriager): + +* [Alolita Sharma](https://github.com/alolita) +* [Emil Mikulic](https://github.com/g-easy) +* [Jodee Varney](https://github.com/jodeev) +* [Johannes Tax](https://github.com/pyohannes) +* [Max Golovanov](https://github.com/maxgolov) +* [Ryan Burn](https://github.com/rnburn) + +### Thanks to all the people who have contributed + +[![contributors](https://contributors-img.web.app/image?repo=open-telemetry/opentelemetry-cpp)](https://github.com/open-telemetry/opentelemetry-cpp/graphs/contributors) + +## Release Schedule + +Refer to [project status](#project-status) for current status of the project. + +See the [release +notes](https://github.com/open-telemetry/opentelemetry-cpp/releases) for +existing releases. + +See the [project +milestones](https://github.com/open-telemetry/opentelemetry-cpp/milestones) for +details on upcoming releases. The dates and features described in issues and +milestones are estimates, and subject to change. diff --git a/jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/CMakeLists.txt b/jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/CMakeLists.txt new file mode 100644 index 000000000..6b3f13705 --- /dev/null +++ b/jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/CMakeLists.txt @@ -0,0 +1,104 @@ +# Copyright The OpenTelemetry Authors +# SPDX-License-Identifier: Apache-2.0 + +add_library(opentelemetry_api INTERFACE) +target_include_directories( + opentelemetry_api + INTERFACE "$" + "$") + +set_target_properties(opentelemetry_api PROPERTIES EXPORT_NAME api) + +if(OPENTELEMETRY_INSTALL) + install( + TARGETS opentelemetry_api + EXPORT "${PROJECT_NAME}-target" + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) + + set(LOGS_EXCLUDE_PATTERN "") + if(NOT WITH_LOGS_PREVIEW) + set(LOGS_EXCLUDE_PATTERN "logs") + endif() + + install( + DIRECTORY include/opentelemetry + DESTINATION include + FILES_MATCHING + PATTERN "*.h" + PATTERN "metrics" EXCLUDE) + + install( + DIRECTORY include/opentelemetry + DESTINATION include + FILES_MATCHING + PATTERN "*.h" + PATTERN "${LOGS_EXCLUDE_PATTERN}" EXCLUDE) +endif() + +if(BUILD_TESTING) + add_subdirectory(test) +endif() + +if(WITH_NO_DEPRECATED_CODE) + target_compile_definitions(opentelemetry_api + INTERFACE OPENTELEMETRY_NO_DEPRECATED_CODE) +endif() + +if(WITH_ABSEIL) + + find_package(absl CONFIG REQUIRED) + + target_compile_definitions(opentelemetry_api INTERFACE HAVE_ABSEIL) + target_link_libraries( + opentelemetry_api INTERFACE absl::bad_variant_access absl::any absl::base + absl::bits absl::city) + +endif() + +if(WITH_STL) + message("Building with standard library types...") + target_compile_definitions(opentelemetry_api INTERFACE HAVE_CPP_STDLIB) +else() + message("Building with nostd types...") +endif() + +if(WITH_GSL) + target_compile_definitions(opentelemetry_api INTERFACE HAVE_GSL) + + # Guidelines Support Library path. Used if we are not on not get C++20. + # + find_package(Microsoft.GSL QUIET) + if(TARGET Microsoft.GSL::GSL) + target_link_libraries(opentelemetry_api INTERFACE Microsoft.GSL::GSL) + else() + set(GSL_DIR third_party/ms-gsl) + target_include_directories( + opentelemetry_api INTERFACE "$") + endif() +endif() + +if(WITH_LOGS_PREVIEW) + target_compile_definitions(opentelemetry_api INTERFACE ENABLE_LOGS_PREVIEW) +endif() + +if(WITH_NO_GETENV) + target_compile_definitions(opentelemetry_api INTERFACE NO_GETENV) +endif() + +if(WIN32) + target_compile_definitions(opentelemetry_api INTERFACE NOMINMAX) + if(WITH_ETW) + target_compile_definitions(opentelemetry_api INTERFACE HAVE_MSGPACK) + endif() +endif() + +if(WITH_ASYNC_EXPORT_PREVIEW) + target_compile_definitions(opentelemetry_api INTERFACE ENABLE_ASYNC_EXPORT) +endif() + +if(WITH_METRICS_EXEMPLAR_PREVIEW) + target_compile_definitions(opentelemetry_api + INTERFACE ENABLE_METRICS_EXEMPLAR_PREVIEW) +endif() diff --git a/jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/baggage/baggage.h b/jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/baggage/baggage.h new file mode 100644 index 000000000..66a77ed94 --- /dev/null +++ b/jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/baggage/baggage.h @@ -0,0 +1,301 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +#pragma once + +#include + +#include "opentelemetry/common/kv_properties.h" +#include "opentelemetry/common/macros.h" +#include "opentelemetry/nostd/shared_ptr.h" +#include "opentelemetry/nostd/string_view.h" +#include "opentelemetry/version.h" + +OPENTELEMETRY_BEGIN_NAMESPACE + +namespace baggage +{ + +class OPENTELEMETRY_EXPORT Baggage +{ +public: + static constexpr size_t kMaxKeyValuePairs = 180; + static constexpr size_t kMaxKeyValueSize = 4096; + static constexpr size_t kMaxSize = 8192; + static constexpr char kKeyValueSeparator = '='; + static constexpr char kMembersSeparator = ','; + static constexpr char kMetadataSeparator = ';'; + + Baggage() noexcept : kv_properties_(new opentelemetry::common::KeyValueProperties()) {} + Baggage(size_t size) noexcept + : kv_properties_(new opentelemetry::common::KeyValueProperties(size)) + {} + + template + Baggage(const T &keys_and_values) noexcept + : kv_properties_(new opentelemetry::common::KeyValueProperties(keys_and_values)) + {} + + OPENTELEMETRY_API_SINGLETON static nostd::shared_ptr GetDefault() + { + static nostd::shared_ptr baggage{new Baggage()}; + return baggage; + } + + /* Get value for key in the baggage + @returns true if key is found, false otherwise + */ + bool GetValue(nostd::string_view key, std::string &value) const noexcept + { + return kv_properties_->GetValue(key, value); + } + + /* Returns shared_ptr of new baggage object which contains new key-value pair. If key or value is + invalid, copy of current baggage is returned + */ + nostd::shared_ptr Set(const nostd::string_view &key, + const nostd::string_view &value) noexcept + { + + nostd::shared_ptr baggage(new Baggage(kv_properties_->Size() + 1)); + const bool valid_kv = IsValidKey(key) && IsValidValue(value); + + if (valid_kv) + { + baggage->kv_properties_->AddEntry(key, value); + } + + // add rest of the fields. + kv_properties_->GetAllEntries( + [&baggage, &key, &valid_kv](nostd::string_view e_key, nostd::string_view e_value) { + // if key or value was not valid, add all the entries. Add only remaining entries + // otherwise. + if (!valid_kv || key != e_key) + { + baggage->kv_properties_->AddEntry(e_key, e_value); + } + + return true; + }); + + return baggage; + } + + // @return all key-values entries by repeatedly invoking the function reference passed as argument + // for each entry + bool GetAllEntries( + nostd::function_ref callback) const noexcept + { + return kv_properties_->GetAllEntries(callback); + } + + // delete key from the baggage if it exists. Returns shared_ptr of new baggage object. + // if key does not exist, copy of current baggage is returned. + // Validity of key is not checked as invalid keys should never be populated in baggage in the + // first place. + nostd::shared_ptr Delete(nostd::string_view key) noexcept + { + // keeping size of baggage same as key might not be found in it + nostd::shared_ptr baggage(new Baggage(kv_properties_->Size())); + kv_properties_->GetAllEntries( + [&baggage, &key](nostd::string_view e_key, nostd::string_view e_value) { + if (key != e_key) + baggage->kv_properties_->AddEntry(e_key, e_value); + return true; + }); + return baggage; + } + + // Returns shared_ptr of baggage after extracting key-value pairs from header + static nostd::shared_ptr FromHeader(nostd::string_view header) noexcept + { + if (header.size() > kMaxSize) + { + // header size exceeds maximum threshold, return empty baggage + return GetDefault(); + } + + common::KeyValueStringTokenizer kv_str_tokenizer(header); + size_t cnt = kv_str_tokenizer.NumTokens(); // upper bound on number of kv pairs + if (cnt > kMaxKeyValuePairs) + { + cnt = kMaxKeyValuePairs; + } + + nostd::shared_ptr baggage(new Baggage(cnt)); + bool kv_valid; + nostd::string_view key, value; + + while (kv_str_tokenizer.next(kv_valid, key, value) && baggage->kv_properties_->Size() < cnt) + { + if (!kv_valid || (key.size() + value.size() > kMaxKeyValueSize)) + { + // if kv pair is not valid, skip it + continue; + } + + // NOTE : metadata is kept as part of value only as it does not have any semantic meaning. + // but, we need to extract it (else Decode on value will return error) + nostd::string_view metadata; + auto metadata_separator = value.find(kMetadataSeparator); + if (metadata_separator != std::string::npos) + { + metadata = value.substr(metadata_separator); + value = value.substr(0, metadata_separator); + } + + bool err = 0; + auto key_str = UrlDecode(common::StringUtil::Trim(key), err); + auto value_str = UrlDecode(common::StringUtil::Trim(value), err); + + if (err == false && IsValidKey(key_str) && IsValidValue(value_str)) + { + if (!metadata.empty()) + { + value_str.append(metadata.data(), metadata.size()); + } + baggage->kv_properties_->AddEntry(key_str, value_str); + } + } + + return baggage; + } + + // Creates string from baggage object. + std::string ToHeader() const noexcept + { + std::string header_s; + bool first = true; + kv_properties_->GetAllEntries([&](nostd::string_view key, nostd::string_view value) { + if (!first) + { + header_s.push_back(kMembersSeparator); + } + else + { + first = false; + } + header_s.append(UrlEncode(key)); + header_s.push_back(kKeyValueSeparator); + + // extracting metadata from value. We do not encode metadata + auto metadata_separator = value.find(kMetadataSeparator); + if (metadata_separator != std::string::npos) + { + header_s.append(UrlEncode(value.substr(0, metadata_separator))); + auto metadata = value.substr(metadata_separator); + header_s.append(std::string(metadata.data(), metadata.size())); + } + else + { + header_s.append(UrlEncode(value)); + } + return true; + }); + return header_s; + } + +private: + static bool IsPrintableString(nostd::string_view str) + { + for (const auto ch : str) + { + if (ch < ' ' || ch > '~') + { + return false; + } + } + + return true; + } + + static bool IsValidKey(nostd::string_view key) { return key.size() && IsPrintableString(key); } + + static bool IsValidValue(nostd::string_view value) { return IsPrintableString(value); } + + // Uri encode key value pairs before injecting into header + // Implementation inspired from : https://golang.org/src/net/url/url.go?s=7851:7884#L264 + static std::string UrlEncode(nostd::string_view str) + { + auto to_hex = [](char c) -> char { + static const char *hex = "0123456789ABCDEF"; + return hex[c & 15]; + }; + + std::string ret; + + for (auto c : str) + { + if (std::isalnum(c) || c == '-' || c == '_' || c == '.' || c == '~') + { + ret.push_back(c); + } + else if (c == ' ') + { + ret.push_back('+'); + } + else + { + ret.push_back('%'); + ret.push_back(to_hex(c >> 4)); + ret.push_back(to_hex(c & 15)); + } + } + + return ret; + } + + // Uri decode key value pairs after extracting from header + static std::string UrlDecode(nostd::string_view str, bool &err) + { + auto IsHex = [](char c) { + return std::isdigit(c) || (c >= 'A' && c <= 'F') || (c >= 'a' && c <= 'f'); + }; + + auto from_hex = [](char c) -> char { + // c - '0' produces integer type which could trigger error/warning when casting to char, + // but the cast is safe here. + return static_cast(std::isdigit(c) ? c - '0' : std::toupper(c) - 'A' + 10); + }; + + std::string ret; + + for (size_t i = 0; i < str.size(); i++) + { + if (str[i] == '%') + { + if (i + 2 >= str.size() || !IsHex(str[i + 1]) || !IsHex(str[i + 2])) + { + err = 1; + return ""; + } + ret.push_back(from_hex(str[i + 1]) << 4 | from_hex(str[i + 2])); + i += 2; + } + else if (str[i] == '+') + { + ret.push_back(' '); + } + else if (std::isalnum(str[i]) || str[i] == '-' || str[i] == '_' || str[i] == '.' || + str[i] == '~') + { + ret.push_back(str[i]); + } + else + { + err = 1; + return ""; + } + } + + return ret; + } + +private: + // Store entries in a C-style array to avoid using std::array or std::vector. + nostd::unique_ptr kv_properties_; +}; + +} // namespace baggage + +OPENTELEMETRY_END_NAMESPACE diff --git a/jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/baggage/baggage_context.h b/jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/baggage/baggage_context.h new file mode 100644 index 000000000..9a92bac77 --- /dev/null +++ b/jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/baggage/baggage_context.h @@ -0,0 +1,39 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +#pragma once + +#include "opentelemetry/baggage/baggage.h" +#include "opentelemetry/context/context.h" +#include "opentelemetry/nostd/shared_ptr.h" +#include "opentelemetry/version.h" + +OPENTELEMETRY_BEGIN_NAMESPACE + +namespace baggage +{ + +static const std::string kBaggageHeader = "baggage"; + +inline nostd::shared_ptr GetBaggage( + const opentelemetry::context::Context &context) noexcept +{ + context::ContextValue context_value = context.GetValue(kBaggageHeader); + if (nostd::holds_alternative>(context_value)) + { + return nostd::get>(context_value); + } + static nostd::shared_ptr empty_baggage{ + new opentelemetry::baggage::Baggage()}; + return empty_baggage; +} + +inline context::Context SetBaggage( + opentelemetry::context::Context &context, + nostd::shared_ptr baggage) noexcept +{ + return context.SetValue(kBaggageHeader, baggage); +} + +} // namespace baggage +OPENTELEMETRY_END_NAMESPACE diff --git a/jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/baggage/propagation/baggage_propagator.h b/jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/baggage/propagation/baggage_propagator.h new file mode 100644 index 000000000..3de60860b --- /dev/null +++ b/jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/baggage/propagation/baggage_propagator.h @@ -0,0 +1,54 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +#pragma once + +#include "opentelemetry/baggage/baggage.h" +#include "opentelemetry/baggage/baggage_context.h" +#include "opentelemetry/context/propagation/text_map_propagator.h" +#include "opentelemetry/version.h" + +OPENTELEMETRY_BEGIN_NAMESPACE +namespace baggage +{ +namespace propagation +{ + +class BaggagePropagator : public opentelemetry::context::propagation::TextMapPropagator +{ +public: + void Inject(opentelemetry::context::propagation::TextMapCarrier &carrier, + const opentelemetry::context::Context &context) noexcept override + { + auto baggage = opentelemetry::baggage::GetBaggage(context); + auto header = baggage->ToHeader(); + if (header.size()) + { + carrier.Set(kBaggageHeader, header); + } + } + + context::Context Extract(const opentelemetry::context::propagation::TextMapCarrier &carrier, + opentelemetry::context::Context &context) noexcept override + { + nostd::string_view baggage_str = carrier.Get(opentelemetry::baggage::kBaggageHeader); + auto baggage = opentelemetry::baggage::Baggage::FromHeader(baggage_str); + + if (baggage->ToHeader().size()) + { + return opentelemetry::baggage::SetBaggage(context, baggage); + } + else + { + return context; + } + } + + bool Fields(nostd::function_ref callback) const noexcept override + { + return callback(kBaggageHeader); + } +}; +} // namespace propagation +} // namespace baggage +OPENTELEMETRY_END_NAMESPACE diff --git a/jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/common/attribute_value.h b/jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/common/attribute_value.h new file mode 100644 index 000000000..af4cc83d4 --- /dev/null +++ b/jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/common/attribute_value.h @@ -0,0 +1,82 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +#pragma once + +#include + +#include "opentelemetry/nostd/span.h" +#include "opentelemetry/nostd/string_view.h" +#include "opentelemetry/nostd/variant.h" +#include "opentelemetry/version.h" + +OPENTELEMETRY_BEGIN_NAMESPACE +namespace common +{ +/// OpenTelemetry signals can be enriched by adding attributes. The +/// \c AttributeValue type is defined as a variant of all attribute value +/// types the OpenTelemetry C++ API supports. +/// +/// The following attribute value types are supported by the OpenTelemetry +/// specification: +/// - Primitive types: string, boolean, double precision floating point +/// (IEEE 754-1985) or signed 64 bit integer. +/// - Homogenous arrays of primitive type values. +/// +/// \warning +/// \parblock The OpenTelemetry C++ API currently supports several attribute +/// value types that are not covered by the OpenTelemetry specification: +/// - \c uint64_t +/// - \c nostd::span +/// - \c nostd::span +/// +/// Those types are reserved for future use and currently should not be +/// used. There are no guarantees around how those values are handled by +/// exporters. +/// \endparblock +using AttributeValue = + nostd::variant, + nostd::span, + nostd::span, + nostd::span, + nostd::span, + nostd::span, + // Not currently supported by the specification, but reserved for future use. + // Added to provide support for all primitive C++ types. + uint64_t, + // Not currently supported by the specification, but reserved for future use. + // Added to provide support for all primitive C++ types. + nostd::span, + // Not currently supported by the specification, but reserved for future use. + // See https://github.com/open-telemetry/opentelemetry-specification/issues/780 + nostd::span>; + +enum AttributeType +{ + kTypeBool, + kTypeInt, + kTypeInt64, + kTypeUInt, + kTypeDouble, + kTypeCString, + kTypeString, + kTypeSpanBool, + kTypeSpanInt, + kTypeSpanInt64, + kTypeSpanUInt, + kTypeSpanDouble, + kTypeSpanString, + kTypeUInt64, + kTypeSpanUInt64, + kTypeSpanByte +}; + +} // namespace common +OPENTELEMETRY_END_NAMESPACE diff --git a/jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/common/key_value_iterable.h b/jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/common/key_value_iterable.h new file mode 100644 index 000000000..732d361e7 --- /dev/null +++ b/jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/common/key_value_iterable.h @@ -0,0 +1,63 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +#pragma once + +#include "opentelemetry/common/attribute_value.h" +#include "opentelemetry/nostd/function_ref.h" +#include "opentelemetry/version.h" + +OPENTELEMETRY_BEGIN_NAMESPACE +namespace common +{ +/** + * Supports internal iteration over a collection of key-value pairs. + */ +class KeyValueIterable +{ +public: + virtual ~KeyValueIterable() = default; + + /** + * Iterate over key-value pairs + * @param callback a callback to invoke for each key-value. If the callback returns false, + * the iteration is aborted. + * @return true if every key-value pair was iterated over + */ + virtual bool ForEachKeyValue(nostd::function_ref + callback) const noexcept = 0; + + /** + * @return the number of key-value pairs + */ + virtual size_t size() const noexcept = 0; +}; + +/** + * Supports internal iteration over a collection of key-value pairs. + */ +class NoopKeyValueIterable : public KeyValueIterable +{ +public: + ~NoopKeyValueIterable() override = default; + + /** + * Iterate over key-value pairs + * @param callback a callback to invoke for each key-value. If the callback returns false, + * the iteration is aborted. + * @return true if every key-value pair was iterated over + */ + bool ForEachKeyValue( + nostd::function_ref) const noexcept override + { + return true; + } + + /** + * @return the number of key-value pairs + */ + size_t size() const noexcept override { return 0; } +}; + +} // namespace common +OPENTELEMETRY_END_NAMESPACE diff --git a/jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/common/key_value_iterable_view.h b/jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/common/key_value_iterable_view.h new file mode 100644 index 000000000..daea8fce2 --- /dev/null +++ b/jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/common/key_value_iterable_view.h @@ -0,0 +1,141 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +#pragma once + +#include +#include +#include + +#include "opentelemetry/common/key_value_iterable.h" +#include "opentelemetry/nostd/span.h" +#include "opentelemetry/nostd/string_view.h" +#include "opentelemetry/nostd/type_traits.h" +#include "opentelemetry/nostd/utility.h" +#include "opentelemetry/version.h" + +OPENTELEMETRY_BEGIN_NAMESPACE +namespace common +{ +// NOTE - code within `detail` namespace implements internal details, and not part +// of the public interface. +namespace detail +{ +inline void take_key_value(nostd::string_view, common::AttributeValue) {} + +template +auto is_key_value_iterable_impl(T iterable) + -> decltype(take_key_value(std::begin(iterable)->first, std::begin(iterable)->second), + nostd::size(iterable), + std::true_type{}); + +std::false_type is_key_value_iterable_impl(...); + +template +struct is_key_value_iterable +{ + static const bool value = decltype(detail::is_key_value_iterable_impl(std::declval()))::value; +}; +} // namespace detail + +/** + * @brief Container for key-value pairs that can transform every value in it to one of types + * listed in common::AttributeValue. It may contain value types that are not directly map'able + * to primitive value types. In that case the `ForEachKeyValue` method acts as a transform to + * convert the value type to one listed under AtributeValue (bool, int32_t, int64_t, uint32_t, + * uint64_t, double, nostd::string_view, or arrays of primite types). For example, if UUID, + * GUID, or UTF-16 string type is passed as one of values stored inside this container, the + * container itself may provide a custom implementation of `ForEachKeyValue` to transform the + * 'non-standard' type to one of the standard types. + */ +template +class KeyValueIterableView final : public KeyValueIterable +{ + +public: + explicit KeyValueIterableView(const T &container) noexcept : container_{&container} {} + + // KeyValueIterable + bool ForEachKeyValue(nostd::function_ref + callback) const noexcept override + { + auto iter = std::begin(*container_); + auto last = std::end(*container_); + for (; iter != last; ++iter) + { + if (!callback(iter->first, iter->second)) + { + return false; + } + } + return true; + } + + size_t size() const noexcept override { return nostd::size(*container_); } + +private: + const T *container_; +}; + +template ::value> * = nullptr> +KeyValueIterableView MakeKeyValueIterableView(const T &container) noexcept +{ + return KeyValueIterableView(container); +} + +/** + * Utility function to help to make a attribute view from initializer_list + * + * @param attributes + * @return nostd::span> + */ +inline static nostd::span> +MakeAttributes(std::initializer_list> + attributes) noexcept +{ + return nostd::span>{ + attributes.begin(), attributes.end()}; +} + +/** + * Utility function to help to make a attribute view from a span + * + * @param attributes + * @return nostd::span> + */ +inline static nostd::span> +MakeAttributes( + nostd::span> attributes) noexcept +{ + return attributes; +} + +/** + * Utility function to help to make a attribute view from a KeyValueIterable + * + * @param attributes + * @return common::KeyValueIterable + */ +inline static const common::KeyValueIterable &MakeAttributes( + const common::KeyValueIterable &attributes) noexcept +{ + return attributes; +} + +/** + * Utility function to help to make a attribute view from a key-value iterable object + * + * @param attributes + * @return nostd::span> + */ +template < + class ArgumentType, + nostd::enable_if_t::value> * = nullptr> +inline static common::KeyValueIterableView MakeAttributes( + const ArgumentType &arg) noexcept +{ + return common::KeyValueIterableView(arg); +} + +} // namespace common +OPENTELEMETRY_END_NAMESPACE diff --git a/jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/common/kv_properties.h b/jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/common/kv_properties.h new file mode 100644 index 000000000..96442021b --- /dev/null +++ b/jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/common/kv_properties.h @@ -0,0 +1,273 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +#pragma once + +#include "opentelemetry/common/key_value_iterable_view.h" +#include "opentelemetry/common/string_util.h" +#include "opentelemetry/nostd/function_ref.h" +#include "opentelemetry/nostd/shared_ptr.h" +#include "opentelemetry/nostd/string_view.h" +#include "opentelemetry/nostd/unique_ptr.h" +#include "opentelemetry/version.h" + +#include +#include +#include + +OPENTELEMETRY_BEGIN_NAMESPACE +namespace common +{ + +// Constructor parameter for KeyValueStringTokenizer +struct KeyValueStringTokenizerOptions +{ + char member_separator = ','; + char key_value_separator = '='; + bool ignore_empty_members = true; +}; + +// Tokenizer for key-value headers +class KeyValueStringTokenizer +{ +public: + KeyValueStringTokenizer( + nostd::string_view str, + const KeyValueStringTokenizerOptions &opts = KeyValueStringTokenizerOptions()) noexcept + : str_(str), opts_(opts), index_(0) + {} + + static nostd::string_view GetDefaultKeyOrValue() + { + static std::string default_str = ""; + return default_str; + } + + // Returns next key value in the string header + // @param valid_kv : if the found kv pair is valid or not + // @param key : key in kv pair + // @param key : value in kv pair + // @returns true if next kv pair was found, false otherwise. + bool next(bool &valid_kv, nostd::string_view &key, nostd::string_view &value) noexcept + { + valid_kv = true; + while (index_ < str_.size()) + { + bool is_empty_pair = false; + size_t end = str_.find(opts_.member_separator, index_); + if (end == std::string::npos) + { + end = str_.size() - 1; + } + else if (end == index_) // empty pair. do not update end + { + is_empty_pair = true; + } + else + { + end--; + } + + auto list_member = StringUtil::Trim(str_, index_, end); + if (list_member.size() == 0 || is_empty_pair) + { + // empty list member + index_ = end + 2 - is_empty_pair; + if (opts_.ignore_empty_members) + { + continue; + } + + valid_kv = true; + key = GetDefaultKeyOrValue(); + value = GetDefaultKeyOrValue(); + return true; + } + + auto key_end_pos = list_member.find(opts_.key_value_separator); + if (key_end_pos == std::string::npos) + { + // invalid member + valid_kv = false; + } + else + { + key = list_member.substr(0, key_end_pos); + value = list_member.substr(key_end_pos + 1); + } + + index_ = end + 2; + + return true; + } + + // no more entries remaining + return false; + } + + // Returns total number of tokens in header string + size_t NumTokens() const noexcept + { + size_t cnt = 0, begin = 0; + while (begin < str_.size()) + { + ++cnt; + size_t end = str_.find(opts_.member_separator, begin); + if (end == std::string::npos) + { + break; + } + + begin = end + 1; + } + + return cnt; + } + + // Resets the iterator + void reset() noexcept { index_ = 0; } + +private: + nostd::string_view str_; + KeyValueStringTokenizerOptions opts_; + size_t index_; +}; + +// Class to store fixed size array of key-value pairs of string type +class KeyValueProperties +{ + // Class to store key-value pairs of string types +public: + class Entry + { + public: + Entry() : key_(nullptr), value_(nullptr) {} + + // Copy constructor + Entry(const Entry ©) + { + key_ = CopyStringToPointer(copy.key_.get()); + value_ = CopyStringToPointer(copy.value_.get()); + } + + // Copy assignment operator + Entry &operator=(Entry &other) + { + key_ = CopyStringToPointer(other.key_.get()); + value_ = CopyStringToPointer(other.value_.get()); + return *this; + } + + // Move contructor and assignment operator + Entry(Entry &&other) = default; + Entry &operator=(Entry &&other) = default; + + // Creates an Entry for a given key-value pair. + Entry(nostd::string_view key, nostd::string_view value) + { + key_ = CopyStringToPointer(key); + value_ = CopyStringToPointer(value); + } + + // Gets the key associated with this entry. + nostd::string_view GetKey() const noexcept { return key_.get(); } + + // Gets the value associated with this entry. + nostd::string_view GetValue() const noexcept { return value_.get(); } + + // Sets the value for this entry. This overrides the previous value. + void SetValue(nostd::string_view value) noexcept { value_ = CopyStringToPointer(value); } + + private: + // Store key and value as raw char pointers to avoid using std::string. + nostd::unique_ptr key_; + nostd::unique_ptr value_; + + // Copies string into a buffer and returns a unique_ptr to the buffer. + // This is a workaround for the fact that memcpy doesn't accept a const destination. + nostd::unique_ptr CopyStringToPointer(nostd::string_view str) + { + char *temp = new char[str.size() + 1]; + memcpy(temp, str.data(), str.size()); + temp[str.size()] = '\0'; + return nostd::unique_ptr(temp); + } + }; + + // Maintain the number of entries in entries_. + size_t num_entries_; + + // Max size of allocated array + size_t max_num_entries_; + + // Store entries in a C-style array to avoid using std::array or std::vector. + nostd::unique_ptr entries_; + +public: + // Create Key-value list of given size + // @param size : Size of list. + KeyValueProperties(size_t size) noexcept + : num_entries_(0), max_num_entries_(size), entries_(new Entry[size]) + {} + + // Create Empty Key-Value list + KeyValueProperties() noexcept : num_entries_(0), max_num_entries_(0), entries_(nullptr) {} + + template ::value>::type> + KeyValueProperties(const T &keys_and_values) noexcept + : num_entries_(0), + max_num_entries_(keys_and_values.size()), + entries_(new Entry[max_num_entries_]) + { + for (auto &e : keys_and_values) + { + Entry entry(e.first, e.second); + (entries_.get())[num_entries_++] = std::move(entry); + } + } + + // Adds new kv pair into kv properties + void AddEntry(nostd::string_view key, nostd::string_view value) noexcept + { + if (num_entries_ < max_num_entries_) + { + Entry entry(key, value); + (entries_.get())[num_entries_++] = std::move(entry); + } + } + + // Returns all kv pair entries + bool GetAllEntries( + nostd::function_ref callback) const noexcept + { + for (size_t i = 0; i < num_entries_; i++) + { + auto &entry = (entries_.get())[i]; + if (!callback(entry.GetKey(), entry.GetValue())) + { + return false; + } + } + return true; + } + + // Return value for key if exists, return false otherwise + bool GetValue(nostd::string_view key, std::string &value) const noexcept + { + for (size_t i = 0; i < num_entries_; i++) + { + auto &entry = (entries_.get())[i]; + if (entry.GetKey() == key) + { + const auto &entry_value = entry.GetValue(); + value = std::string(entry_value.data(), entry_value.size()); + return true; + } + } + return false; + } + + size_t Size() const noexcept { return num_entries_; } +}; +} // namespace common +OPENTELEMETRY_END_NAMESPACE diff --git a/jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/common/macros.h b/jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/common/macros.h new file mode 100644 index 000000000..323e5cdc0 --- /dev/null +++ b/jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/common/macros.h @@ -0,0 +1,202 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +#pragma once + +#if !defined(OPENTELEMETRY_LIKELY_IF) && defined(__cplusplus) +// GCC 9 has likely attribute but do not support declare it at the beginning of statement +# if defined(__has_cpp_attribute) && (defined(__clang__) || !defined(__GNUC__) || __GNUC__ > 9) +# if __has_cpp_attribute(likely) +# define OPENTELEMETRY_LIKELY_IF(...) \ + if (__VA_ARGS__) \ + [[likely]] +# endif +# endif +#endif +#if !defined(OPENTELEMETRY_LIKELY_IF) && (defined(__clang__) || defined(__GNUC__)) +# define OPENTELEMETRY_LIKELY_IF(...) if (__builtin_expect(!!(__VA_ARGS__), true)) +#endif +#ifndef OPENTELEMETRY_LIKELY_IF +# define OPENTELEMETRY_LIKELY_IF(...) if (__VA_ARGS__) +#endif + +/// \brief Declare variable as maybe unused +/// usage: +/// OPENTELEMETRY_MAYBE_UNUSED int a; +/// class OPENTELEMETRY_MAYBE_UNUSED a; +/// OPENTELEMETRY_MAYBE_UNUSED int a(); +/// +#if defined(__cplusplus) && __cplusplus >= 201703L +# define OPENTELEMETRY_MAYBE_UNUSED [[maybe_unused]] +#elif defined(__clang__) +# define OPENTELEMETRY_MAYBE_UNUSED __attribute__((unused)) +#elif defined(__GNUC__) && ((__GNUC__ >= 4) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 1))) +# define OPENTELEMETRY_MAYBE_UNUSED __attribute__((unused)) +#elif (defined(_MSC_VER) && _MSC_VER >= 1910) && (defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) +# define OPENTELEMETRY_MAYBE_UNUSED [[maybe_unused]] +#else +# define OPENTELEMETRY_MAYBE_UNUSED +#endif + +#ifndef OPENTELEMETRY_RTTI_ENABLED +# if defined(__clang__) +# if __has_feature(cxx_rtti) +# define OPENTELEMETRY_RTTI_ENABLED +# endif +# elif defined(__GNUG__) +# if defined(__GXX_RTTI) +# define OPENTELEMETRY_RTTI_ENABLED +# endif +# elif defined(_MSC_VER) +# if defined(_CPPRTTI) +# define OPENTELEMETRY_RTTI_ENABLED +# endif +# endif +#endif + +#if defined(__cplusplus) && __cplusplus >= 201402L +# define OPENTELEMETRY_DEPRECATED [[deprecated]] +#elif defined(__clang__) +# define OPENTELEMETRY_DEPRECATED __attribute__((deprecated)) +#elif defined(__GNUC__) +# define OPENTELEMETRY_DEPRECATED __attribute__((deprecated)) +#elif defined(_MSC_VER) +# if _MSC_VER >= 1910 && defined(_MSVC_LANG) && _MSVC_LANG >= 201703L +# define OPENTELEMETRY_DEPRECATED [[deprecated]] +# else +# define OPENTELEMETRY_DEPRECATED __declspec(deprecated) +# endif +#else +# define OPENTELEMETRY_DEPRECATED +#endif + +#if defined(__cplusplus) && __cplusplus >= 201402L +# define OPENTELEMETRY_DEPRECATED_MESSAGE(msg) [[deprecated(msg)]] +#elif defined(__clang__) +# define OPENTELEMETRY_DEPRECATED_MESSAGE(msg) __attribute__((deprecated(msg))) +#elif defined(__GNUC__) +# define OPENTELEMETRY_DEPRECATED_MESSAGE(msg) __attribute__((deprecated(msg))) +#elif defined(_MSC_VER) +# if _MSC_VER >= 1910 && defined(_MSVC_LANG) && _MSVC_LANG >= 201703L +# define OPENTELEMETRY_DEPRECATED_MESSAGE(msg) [[deprecated(msg)]] +# else +# define OPENTELEMETRY_DEPRECATED_MESSAGE(msg) __declspec(deprecated(msg)) +# endif +#else +# define OPENTELEMETRY_DEPRECATED_MESSAGE(msg) +#endif + +// Regex support +#if (__GNUC__ == 4 && (__GNUC_MINOR__ == 8 || __GNUC_MINOR__ == 9)) +# define OPENTELEMETRY_HAVE_WORKING_REGEX 0 +#else +# define OPENTELEMETRY_HAVE_WORKING_REGEX 1 +#endif + +/* clang-format off */ + +/** + @page HEADER_ONLY_SINGLETON Header only singleton. + + @section ELF_SINGLETON + + For clang and gcc, the desired coding pattern is as follows. + + @verbatim + class Foo + { + // (a) + __attribute__((visibility("default"))) + // (b) + T& get_singleton() + { + // (c) + static T singleton; + return singleton; + } + }; + @endverbatim + + (a) is needed when the code is build with + @code -fvisibility="hidden" @endcode + to ensure that all instances of (b) are visible to the linker. + + What is duplicated in the binary is @em code, in (b). + + The linker will make sure only one instance + of all the (b) methods is used. + + (c) is a singleton implemented inside a method. + + This is very desirable, because: + + - the C++ compiler guarantees that construction + of the variable (c) is thread safe. + + - constructors for (c) singletons are executed in code path order, + or not at all if the singleton is never used. + + @section OTHER_SINGLETON + + For other platforms, header only singletons are not supported at this +point. + + @section CODING_PATTERN + + The coding pattern to use in the source code is as follows + + @verbatim + class Foo + { + OPENTELEMETRY_API_SINGLETON + T& get_singleton() + { + static T singleton; + return singleton; + } + }; + @endverbatim +*/ + +/* clang-format on */ + +#if defined(__clang__) + +# define OPENTELEMETRY_API_SINGLETON __attribute__((visibility("default"))) + +#elif defined(__GNUC__) + +# define OPENTELEMETRY_API_SINGLETON __attribute__((visibility("default"))) + +#else + +/* Add support for other compilers here. */ + +# define OPENTELEMETRY_API_SINGLETON + +#endif + +/* clang-format on */ +// +// The if/elif order matters here. If both OPENTELEMETRY_BUILD_IMPORT_DLL and +// OPENTELEMETRY_BUILD_EXPORT_DLL are defined, the former takes precedence. +// +// TODO: consider define OPENTELEMETRY_EXPORT for cygwin/gcc, see below link. +// https://gcc.gnu.org/wiki/Visibility#How_to_use_the_new_C.2B-.2B-_visibility_support +// +#if defined(_MSC_VER) && defined(OPENTELEMETRY_BUILD_IMPORT_DLL) + +# define OPENTELEMETRY_EXPORT __declspec(dllimport) + +#elif defined(_MSC_VER) && defined(OPENTELEMETRY_BUILD_EXPORT_DLL) + +# define OPENTELEMETRY_EXPORT __declspec(dllexport) + +#else + +// +// build OpenTelemetry as static library or not on Windows. +// +# define OPENTELEMETRY_EXPORT + +#endif diff --git a/jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/common/spin_lock_mutex.h b/jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/common/spin_lock_mutex.h new file mode 100644 index 000000000..1877c8eb4 --- /dev/null +++ b/jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/common/spin_lock_mutex.h @@ -0,0 +1,135 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +#pragma once + +#include +#include +#include + +#include "opentelemetry/version.h" + +#if defined(_MSC_VER) +# ifndef NOMINMAX +# define NOMINMAX +# endif +# define _WINSOCKAPI_ // stops including winsock.h +# include +#elif defined(__i386__) || defined(__x86_64__) +# if defined(__clang__) +# include +# elif defined(__INTEL_COMPILER) +# include +# endif +#endif + +OPENTELEMETRY_BEGIN_NAMESPACE +namespace common +{ + +constexpr int SPINLOCK_FAST_ITERATIONS = 100; +constexpr int SPINLOCK_SLEEP_MS = 1; + +/** + * A Mutex which uses atomic flags and spin-locks instead of halting threads. + * + * This mutex uses an incremental back-off strategy with the following phases: + * 1. A tight spin-lock loop (pending: using hardware PAUSE/YIELD instructions) + * 2. A loop where the current thread yields control after checking the lock. + * 3. Issuing a thread-sleep call before starting back in phase 1. + * + * This is meant to give a good balance of perofrmance and CPU consumption in + * practice. + * + * This mutex uses an incremental back-off strategy with the following phases: + * 1. A tight spin-lock loop (pending: using hardware PAUSE/YIELD instructions) + * 2. A loop where the current thread yields control after checking the lock. + * 3. Issuing a thread-sleep call before starting back in phase 1. + * + * This is meant to give a good balance of perofrmance and CPU consumption in + * practice. + * + * This class implements the `BasicLockable` specification: + * https://en.cppreference.com/w/cpp/named_req/BasicLockable + */ +class SpinLockMutex +{ +public: + SpinLockMutex() noexcept {} + ~SpinLockMutex() noexcept = default; + SpinLockMutex(const SpinLockMutex &) = delete; + SpinLockMutex &operator=(const SpinLockMutex &) = delete; + SpinLockMutex &operator=(const SpinLockMutex &) volatile = delete; + + static inline void fast_yield() noexcept + { +// Issue a Pause/Yield instruction while spinning. +#if defined(_MSC_VER) + YieldProcessor(); +#elif defined(__i386__) || defined(__x86_64__) +# if defined(__clang__) || defined(__INTEL_COMPILER) + _mm_pause(); +# else + __builtin_ia32_pause(); +# endif +#elif defined(__arm__) + __asm__ volatile("yield" ::: "memory"); +#else + // TODO: Issue PAGE/YIELD on other architectures. +#endif + } + + /** + * Attempts to lock the mutex. Return immediately with `true` (success) or `false` (failure). + */ + bool try_lock() noexcept + { + return !flag_.load(std::memory_order_relaxed) && + !flag_.exchange(true, std::memory_order_acquire); + } + + /** + * Blocks until a lock can be obtained for the current thread. + * + * This mutex will spin the current CPU waiting for the lock to be available. This can have + * decent performance in scenarios where there is low lock contention and lock-holders achieve + * their work quickly. It degrades in scenarios where locked tasks take a long time. + */ + void lock() noexcept + { + for (;;) + { + // Try once + if (!flag_.exchange(true, std::memory_order_acquire)) + { + return; + } + // Spin-Fast (goal ~10ns) + for (std::size_t i = 0; i < SPINLOCK_FAST_ITERATIONS; ++i) + { + if (try_lock()) + { + return; + } + fast_yield(); + } + // Yield then try again (goal ~100ns) + std::this_thread::yield(); + if (try_lock()) + { + return; + } + // Sleep and then start the whole process again. (goal ~1000ns) + std::this_thread::sleep_for(std::chrono::milliseconds(SPINLOCK_SLEEP_MS)); + } + return; + } + /** Releases the lock held by the execution agent. Throws no exceptions. */ + void unlock() noexcept { flag_.store(false, std::memory_order_release); } + +private: + std::atomic flag_{false}; +}; + +} // namespace common +OPENTELEMETRY_END_NAMESPACE diff --git a/jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/common/string_util.h b/jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/common/string_util.h new file mode 100644 index 000000000..5496f8579 --- /dev/null +++ b/jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/common/string_util.h @@ -0,0 +1,41 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +#pragma once + +#include "opentelemetry/nostd/string_view.h" + +OPENTELEMETRY_BEGIN_NAMESPACE +namespace common +{ + +class StringUtil +{ +public: + static nostd::string_view Trim(nostd::string_view str, size_t left, size_t right) noexcept + { + while (str[static_cast(left)] == ' ' && left <= right) + { + left++; + } + while (str[static_cast(right)] == ' ' && left <= right) + { + right--; + } + return str.substr(left, 1 + right - left); + } + + static nostd::string_view Trim(nostd::string_view str) noexcept + { + if (str.empty()) + { + return str; + } + + return Trim(str, 0, str.size() - 1); + } +}; + +} // namespace common + +OPENTELEMETRY_END_NAMESPACE diff --git a/jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/common/timestamp.h b/jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/common/timestamp.h new file mode 100644 index 000000000..da8765b9b --- /dev/null +++ b/jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/common/timestamp.h @@ -0,0 +1,207 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +#pragma once + +#include +#include +#include + +#include "opentelemetry/version.h" + +OPENTELEMETRY_BEGIN_NAMESPACE +namespace common +{ +/** + * @brief A timepoint relative to the system clock epoch. + * + * This is used for marking the beginning and end of an operation. + */ +class SystemTimestamp +{ +public: + /** + * @brief Initializes a system timestamp pointing to the start of the epoch. + */ + SystemTimestamp() noexcept : nanos_since_epoch_{0} {} + + /** + * @brief Initializes a system timestamp from a duration. + * + * @param time_since_epoch Time elapsed since the beginning of the epoch. + */ + template + explicit SystemTimestamp(const std::chrono::duration &time_since_epoch) noexcept + : nanos_since_epoch_{static_cast( + std::chrono::duration_cast(time_since_epoch).count())} + {} + + /** + * @brief Initializes a system timestamp based on a point in time. + * + * @param time_point A point in time. + */ + /*implicit*/ SystemTimestamp(const std::chrono::system_clock::time_point &time_point) noexcept + : SystemTimestamp{time_point.time_since_epoch()} + {} + + /** + * @brief Returns a time point for the time stamp. + * + * @return A time point corresponding to the time stamp. + */ + operator std::chrono::system_clock::time_point() const noexcept + { + return std::chrono::system_clock::time_point{ + std::chrono::duration_cast( + std::chrono::nanoseconds{nanos_since_epoch_})}; + } + + /** + * @brief Returns the nanoseconds since the beginning of the epoch. + * + * @return Elapsed nanoseconds since the beginning of the epoch for this timestamp. + */ + std::chrono::nanoseconds time_since_epoch() const noexcept + { + return std::chrono::nanoseconds{nanos_since_epoch_}; + } + + /** + * @brief Compare two steady time stamps. + * + * @return true if the two time stamps are equal. + */ + bool operator==(const SystemTimestamp &other) const noexcept + { + return nanos_since_epoch_ == other.nanos_since_epoch_; + } + + /** + * @brief Compare two steady time stamps for inequality. + * + * @return true if the two time stamps are not equal. + */ + bool operator!=(const SystemTimestamp &other) const noexcept + { + return nanos_since_epoch_ != other.nanos_since_epoch_; + } + +private: + int64_t nanos_since_epoch_; +}; + +/** + * @brief A timepoint relative to the monotonic clock epoch + * + * This is used for calculating the duration of an operation. + */ +class SteadyTimestamp +{ +public: + /** + * @brief Initializes a monotonic timestamp pointing to the start of the epoch. + */ + SteadyTimestamp() noexcept : nanos_since_epoch_{0} {} + + /** + * @brief Initializes a monotonic timestamp from a duration. + * + * @param time_since_epoch Time elapsed since the beginning of the epoch. + */ + template + explicit SteadyTimestamp(const std::chrono::duration &time_since_epoch) noexcept + : nanos_since_epoch_{static_cast( + std::chrono::duration_cast(time_since_epoch).count())} + {} + + /** + * @brief Initializes a monotonic timestamp based on a point in time. + * + * @param time_point A point in time. + */ + /*implicit*/ SteadyTimestamp(const std::chrono::steady_clock::time_point &time_point) noexcept + : SteadyTimestamp{time_point.time_since_epoch()} + {} + + /** + * @brief Returns a time point for the time stamp. + * + * @return A time point corresponding to the time stamp. + */ + operator std::chrono::steady_clock::time_point() const noexcept + { + return std::chrono::steady_clock::time_point{ + std::chrono::duration_cast( + std::chrono::nanoseconds{nanos_since_epoch_})}; + } + + /** + * @brief Returns the nanoseconds since the beginning of the epoch. + * + * @return Elapsed nanoseconds since the beginning of the epoch for this timestamp. + */ + std::chrono::nanoseconds time_since_epoch() const noexcept + { + return std::chrono::nanoseconds{nanos_since_epoch_}; + } + + /** + * @brief Compare two steady time stamps. + * + * @return true if the two time stamps are equal. + */ + bool operator==(const SteadyTimestamp &other) const noexcept + { + return nanos_since_epoch_ == other.nanos_since_epoch_; + } + + /** + * @brief Compare two steady time stamps for inequality. + * + * @return true if the two time stamps are not equal. + */ + bool operator!=(const SteadyTimestamp &other) const noexcept + { + return nanos_since_epoch_ != other.nanos_since_epoch_; + } + +private: + int64_t nanos_since_epoch_; +}; + +class DurationUtil +{ +public: + template + static std::chrono::duration AdjustWaitForTimeout( + std::chrono::duration timeout, + std::chrono::duration indefinite_value) noexcept + { + // Do not call now() when this duration is max value, now() may have a expensive cost. + if (timeout == std::chrono::duration::max()) + { + return indefinite_value; + } + + // std::future::wait_for, std::this_thread::sleep_for, and std::condition_variable::wait_for + // may use steady_clock or system_clock.We need make sure now() + timeout do not overflow. + auto max_timeout = std::chrono::duration_cast>( + std::chrono::steady_clock::time_point::max() - std::chrono::steady_clock::now()); + if (timeout >= max_timeout) + { + return indefinite_value; + } + max_timeout = std::chrono::duration_cast>( + std::chrono::system_clock::time_point::max() - std::chrono::system_clock::now()); + if (timeout >= max_timeout) + { + return indefinite_value; + } + + return timeout; + } +}; + +} // namespace common +OPENTELEMETRY_END_NAMESPACE diff --git a/jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/config.h b/jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/config.h new file mode 100644 index 000000000..21a2947e2 --- /dev/null +++ b/jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/config.h @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +#pragma once + +#ifndef __has_include +# define OPENTELEMETRY_HAS_INCLUDE(x) 0 +#else +# define OPENTELEMETRY_HAS_INCLUDE(x) __has_include(x) +#endif + +#if !defined(__GLIBCXX__) || OPENTELEMETRY_HAS_INCLUDE() // >= libstdc++-5 +# define OPENTELEMETRY_TRIVIALITY_TYPE_TRAITS +#endif diff --git a/jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/context/context.h b/jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/context/context.h new file mode 100644 index 000000000..923b396c7 --- /dev/null +++ b/jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/context/context.h @@ -0,0 +1,161 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +#pragma once + +#include +#include "opentelemetry/context/context_value.h" +#include "opentelemetry/nostd/shared_ptr.h" +#include "opentelemetry/nostd/string_view.h" + +OPENTELEMETRY_BEGIN_NAMESPACE +namespace context +{ + +// The context class provides a context identifier. Is built as a linked list +// of DataList nodes and each context holds a shared_ptr to a place within +// the list that determines which keys and values it has access to. All that +// come before and none that come after. +class Context +{ + +public: + Context() = default; + // Creates a context object from a map of keys and identifiers, this will + // hold a shared_ptr to the head of the DataList linked list + template + Context(const T &keys_and_values) noexcept + { + head_ = nostd::shared_ptr{new DataList(keys_and_values)}; + } + + // Creates a context object from a key and value, this will + // hold a shared_ptr to the head of the DataList linked list + Context(nostd::string_view key, ContextValue value) noexcept + { + head_ = nostd::shared_ptr{new DataList(key, value)}; + } + + // Accepts a new iterable and then returns a new context that + // contains the new key and value data. It attaches the + // exisiting list to the end of the new list. + template + Context SetValues(T &values) noexcept + { + Context context = Context(values); + nostd::shared_ptr last = context.head_; + while (last->next_ != nullptr) + { + last = last->next_; + } + last->next_ = head_; + return context; + } + + // Accepts a new iterable and then returns a new context that + // contains the new key and value data. It attaches the + // exisiting list to the end of the new list. + Context SetValue(nostd::string_view key, ContextValue value) noexcept + { + Context context = Context(key, value); + context.head_->next_ = head_; + return context; + } + + // Returns the value associated with the passed in key. + context::ContextValue GetValue(const nostd::string_view key) const noexcept + { + for (DataList *data = head_.get(); data != nullptr; data = data->next_.get()) + { + if (key.size() == data->key_length_) + { + if (std::memcmp(key.data(), data->key_, data->key_length_) == 0) + { + return data->value_; + } + } + } + return ContextValue{}; + } + + // Checks for key and returns true if found + bool HasKey(const nostd::string_view key) const noexcept + { + return !nostd::holds_alternative(GetValue(key)); + } + + bool operator==(const Context &other) const noexcept { return (head_ == other.head_); } + +private: + // A linked list to contain the keys and values of this context node + class DataList + { + public: + char *key_; + + nostd::shared_ptr next_; + + size_t key_length_; + + ContextValue value_; + + DataList() { next_ = nullptr; } + + // Builds a data list off of a key and value iterable and returns the head + template + DataList(const T &keys_and_vals) : key_{nullptr}, next_(nostd::shared_ptr{nullptr}) + { + bool first = true; + auto *node = this; + for (auto &iter : keys_and_vals) + { + if (first) + { + *node = DataList(iter.first, iter.second); + first = false; + } + else + { + node->next_ = nostd::shared_ptr(new DataList(iter.first, iter.second)); + node = node->next_.get(); + } + } + } + + // Builds a data list with just a key and value, so it will just be the head + // and returns that head. + DataList(nostd::string_view key, const ContextValue &value) + { + key_ = new char[key.size()]; + key_length_ = key.size(); + memcpy(key_, key.data(), key.size() * sizeof(char)); + value_ = value; + next_ = nostd::shared_ptr{nullptr}; + } + + DataList &operator=(DataList &&other) noexcept + { + key_length_ = other.key_length_; + value_ = std::move(other.value_); + next_ = std::move(other.next_); + + key_ = other.key_; + other.key_ = nullptr; + + return *this; + } + + ~DataList() + { + if (key_ != nullptr) + { + delete[] key_; + } + } + }; + + // Head of the list which holds the keys and values of this context + nostd::shared_ptr head_; +}; +} // namespace context +OPENTELEMETRY_END_NAMESPACE diff --git a/jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/context/context_value.h b/jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/context/context_value.h new file mode 100644 index 000000000..013b3a460 --- /dev/null +++ b/jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/context/context_value.h @@ -0,0 +1,29 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +#pragma once + +#include + +#include "opentelemetry/baggage/baggage.h" +#include "opentelemetry/nostd/shared_ptr.h" +#include "opentelemetry/nostd/span.h" +#include "opentelemetry/nostd/unique_ptr.h" +#include "opentelemetry/nostd/variant.h" +#include "opentelemetry/trace/span.h" +#include "opentelemetry/trace/span_context.h" +#include "opentelemetry/version.h" + +OPENTELEMETRY_BEGIN_NAMESPACE +namespace context +{ +using ContextValue = nostd::variant, + nostd::shared_ptr, + nostd::shared_ptr>; +} // namespace context +OPENTELEMETRY_END_NAMESPACE diff --git a/jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/context/propagation/composite_propagator.h b/jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/context/propagation/composite_propagator.h new file mode 100644 index 000000000..dedcac85c --- /dev/null +++ b/jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/context/propagation/composite_propagator.h @@ -0,0 +1,92 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +#pragma once + +#include +#include +#include +#include "opentelemetry/context/propagation/text_map_propagator.h" + +OPENTELEMETRY_BEGIN_NAMESPACE +namespace context +{ +namespace propagation +{ + +class CompositePropagator : public TextMapPropagator +{ +public: + CompositePropagator(std::vector> propagators) + : propagators_(std::move(propagators)) + {} + + /** + * Run each of the configured propagators with the given context and carrier. + * Propagators are run in the order they are configured, so if multiple + * propagators write the same carrier key, the propagator later in the list + * will "win". + * + * @param carrier Carrier into which context will be injected + * @param context Context to inject + * + */ + + void Inject(TextMapCarrier &carrier, const context::Context &context) noexcept override + { + for (auto &p : propagators_) + { + p->Inject(carrier, context); + } + } + + /** + * Run each of the configured propagators with the given context and carrier. + * Propagators are run in the order they are configured, so if multiple + * propagators write the same context key, the propagator later in the list + * will "win". + * + * @param carrier Carrier from which to extract context + * @param context Context to add values to + */ + context::Context Extract(const TextMapCarrier &carrier, + context::Context &context) noexcept override + { + auto first = true; + context::Context tmp_context; + for (auto &p : propagators_) + { + if (first) + { + tmp_context = p->Extract(carrier, context); + first = false; + } + else + { + tmp_context = p->Extract(carrier, tmp_context); + } + } + return propagators_.size() ? tmp_context : context; + } + + /** + * Invoke callback with fields set to carrier by `inject` method for all the + * configured propagators + * Returns true if all invocation return true + */ + bool Fields(nostd::function_ref callback) const noexcept override + { + bool status = true; + for (auto &p : propagators_) + { + status = status && p->Fields(callback); + } + return status; + } + +private: + std::vector> propagators_; +}; +} // namespace propagation +} // namespace context +OPENTELEMETRY_END_NAMESPACE diff --git a/jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/context/propagation/global_propagator.h b/jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/context/propagation/global_propagator.h new file mode 100644 index 000000000..460764a74 --- /dev/null +++ b/jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/context/propagation/global_propagator.h @@ -0,0 +1,56 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +#pragma once + +#include + +#include "opentelemetry/context/propagation/noop_propagator.h" +#include "opentelemetry/context/propagation/text_map_propagator.h" + +#include "opentelemetry/common/macros.h" +#include "opentelemetry/common/spin_lock_mutex.h" +#include "opentelemetry/nostd/shared_ptr.h" + +#include "opentelemetry/version.h" + +OPENTELEMETRY_BEGIN_NAMESPACE +namespace context +{ +namespace propagation +{ + +/* Stores the singleton TextMapPropagator */ + +class OPENTELEMETRY_EXPORT GlobalTextMapPropagator +{ +public: + static nostd::shared_ptr GetGlobalPropagator() noexcept + { + std::lock_guard guard(GetLock()); + return nostd::shared_ptr(GetPropagator()); + } + + static void SetGlobalPropagator(nostd::shared_ptr prop) noexcept + { + std::lock_guard guard(GetLock()); + GetPropagator() = prop; + } + +private: + OPENTELEMETRY_API_SINGLETON static nostd::shared_ptr &GetPropagator() noexcept + { + static nostd::shared_ptr propagator(new NoOpPropagator()); + return propagator; + } + + OPENTELEMETRY_API_SINGLETON static common::SpinLockMutex &GetLock() noexcept + { + static common::SpinLockMutex lock; + return lock; + } +}; + +} // namespace propagation +} // namespace context +OPENTELEMETRY_END_NAMESPACE diff --git a/jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/context/propagation/noop_propagator.h b/jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/context/propagation/noop_propagator.h new file mode 100644 index 000000000..4e1b30c17 --- /dev/null +++ b/jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/context/propagation/noop_propagator.h @@ -0,0 +1,40 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +#pragma once + +#include "opentelemetry/context/propagation/text_map_propagator.h" +#include "opentelemetry/version.h" + +OPENTELEMETRY_BEGIN_NAMESPACE +namespace context +{ +namespace propagation +{ + +/** + * No-op implementation TextMapPropagator + */ +class NoOpPropagator : public TextMapPropagator +{ +public: + /** Noop extract function does nothing and returns the input context */ + context::Context Extract(const TextMapCarrier & /*carrier*/, + context::Context &context) noexcept override + { + return context; + } + + /** Noop inject function does nothing */ + void Inject(TextMapCarrier & /*carrier*/, + const context::Context & /* context */) noexcept override + {} + + bool Fields(nostd::function_ref /* callback */) const noexcept override + { + return true; + } +}; +} // namespace propagation +} // namespace context +OPENTELEMETRY_END_NAMESPACE diff --git a/jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/context/propagation/text_map_propagator.h b/jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/context/propagation/text_map_propagator.h new file mode 100644 index 000000000..bb0c6d802 --- /dev/null +++ b/jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/context/propagation/text_map_propagator.h @@ -0,0 +1,59 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +#pragma once + +#include +#include "opentelemetry/context/context.h" +#include "opentelemetry/nostd/string_view.h" +#include "opentelemetry/version.h" + +OPENTELEMETRY_BEGIN_NAMESPACE +namespace context +{ +namespace propagation +{ + +// TextMapCarrier is the storage medium used by TextMapPropagator. +class TextMapCarrier +{ +public: + // returns the value associated with the passed key. + virtual nostd::string_view Get(nostd::string_view key) const noexcept = 0; + + // stores the key-value pair. + virtual void Set(nostd::string_view key, nostd::string_view value) noexcept = 0; + + /* list of all the keys in the carrier. + By default, it returns true without invoking callback */ + virtual bool Keys(nostd::function_ref /* callback */) const noexcept + { + return true; + } + virtual ~TextMapCarrier() = default; +}; + +// The TextMapPropagator class provides an interface that enables extracting and injecting +// context into carriers that travel in-band across process boundaries. HTTP frameworks and clients +// can integrate with TextMapPropagator by providing the object containing the +// headers, and a getter and setter function for the extraction and +// injection of values, respectively. + +class TextMapPropagator +{ +public: + // Returns the context that is stored in the carrier with the TextMapCarrier as extractor. + virtual context::Context Extract(const TextMapCarrier &carrier, + context::Context &context) noexcept = 0; + + // Sets the context for carrier with self defined rules. + virtual void Inject(TextMapCarrier &carrier, const context::Context &context) noexcept = 0; + + // Gets the fields set in the carrier by the `inject` method + virtual bool Fields(nostd::function_ref callback) const noexcept = 0; + + virtual ~TextMapPropagator() = default; +}; +} // namespace propagation +} // namespace context +OPENTELEMETRY_END_NAMESPACE diff --git a/jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/context/runtime_context.h b/jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/context/runtime_context.h new file mode 100644 index 000000000..bec96a9af --- /dev/null +++ b/jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/context/runtime_context.h @@ -0,0 +1,331 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +#pragma once + +#include "opentelemetry/common/macros.h" +#include "opentelemetry/context/context.h" + +OPENTELEMETRY_BEGIN_NAMESPACE +namespace context +{ +// The Token object provides is returned when attaching objects to the +// RuntimeContext object and is associated with a context object, and +// can be provided to the RuntimeContext Detach method to remove the +// associated context from the RuntimeContext. +class Token +{ +public: + bool operator==(const Context &other) const noexcept { return context_ == other; } + + ~Token() noexcept; + +private: + friend class RuntimeContextStorage; + + // A constructor that sets the token's Context object to the + // one that was passed in. + Token(const Context &context) : context_(context) {} + + const Context context_; +}; + +/** + * RuntimeContextStorage is used by RuntimeContext to store Context frames. + * + * Custom context management strategies can be implemented by deriving from + * this class and passing an initialized RuntimeContextStorage object to + * RuntimeContext::SetRuntimeContextStorage. + */ +class OPENTELEMETRY_EXPORT RuntimeContextStorage +{ +public: + /** + * Return the current context. + * @return the current context + */ + virtual Context GetCurrent() noexcept = 0; + + /** + * Set the current context. + * @param the new current context + * @return a token for the new current context. This never returns a nullptr. + */ + virtual nostd::unique_ptr Attach(const Context &context) noexcept = 0; + + /** + * Detach the context related to the given token. + * @param token a token related to a context + * @return true if the context could be detached + */ + virtual bool Detach(Token &token) noexcept = 0; + + virtual ~RuntimeContextStorage() {} + +protected: + nostd::unique_ptr CreateToken(const Context &context) noexcept + { + return nostd::unique_ptr(new Token(context)); + } +}; + +/** + * Construct and return the default RuntimeContextStorage + * @return a ThreadLocalContextStorage + */ +static RuntimeContextStorage *GetDefaultStorage() noexcept; + +// Provides a wrapper for propagating the context object globally. +// +// By default, a thread-local runtime context storage is used. +class OPENTELEMETRY_EXPORT RuntimeContext +{ +public: + // Return the current context. + static Context GetCurrent() noexcept { return GetRuntimeContextStorage()->GetCurrent(); } + + // Sets the current 'Context' object. Returns a token + // that can be used to reset to the previous Context. + static nostd::unique_ptr Attach(const Context &context) noexcept + { + return GetRuntimeContextStorage()->Attach(context); + } + + // Resets the context to a previous value stored in the + // passed in token. Returns true if successful, false otherwise + static bool Detach(Token &token) noexcept { return GetRuntimeContextStorage()->Detach(token); } + + // Sets the Key and Value into the passed in context or if a context is not + // passed in, the RuntimeContext. + // Should be used to SetValues to the current RuntimeContext, is essentially + // equivalent to RuntimeContext::GetCurrent().SetValue(key,value). Keep in + // mind that the current RuntimeContext will not be changed, and the new + // context will be returned. + static Context SetValue(nostd::string_view key, + const ContextValue &value, + Context *context = nullptr) noexcept + { + Context temp_context; + if (context == nullptr) + { + temp_context = GetCurrent(); + } + else + { + temp_context = *context; + } + return temp_context.SetValue(key, value); + } + + // Returns the value associated with the passed in key and either the + // passed in context* or the runtime context if a context is not passed in. + // Should be used to get values from the current RuntimeContext, is + // essentially equivalent to RuntimeContext::GetCurrent().GetValue(key). + static ContextValue GetValue(nostd::string_view key, Context *context = nullptr) noexcept + { + Context temp_context; + if (context == nullptr) + { + temp_context = GetCurrent(); + } + else + { + temp_context = *context; + } + return temp_context.GetValue(key); + } + + /** + * Provide a custom runtime context storage. + * + * This provides a possibility to override the default thread-local runtime + * context storage. This has to be set before any spans are created by the + * application, otherwise the behavior is undefined. + * + * @param storage a custom runtime context storage + */ + static void SetRuntimeContextStorage(nostd::shared_ptr storage) noexcept + { + GetStorage() = storage; + } + + /** + * Provide a pointer to const runtime context storage. + * + * The returned pointer can only be used for extending the lifetime of the runtime context + * storage. + * + */ + static nostd::shared_ptr GetConstRuntimeContextStorage() noexcept + { + return GetRuntimeContextStorage(); + } + +private: + static nostd::shared_ptr GetRuntimeContextStorage() noexcept + { + return GetStorage(); + } + + OPENTELEMETRY_API_SINGLETON static nostd::shared_ptr &GetStorage() noexcept + { + static nostd::shared_ptr context(GetDefaultStorage()); + return context; + } +}; + +inline Token::~Token() noexcept +{ + context::RuntimeContext::Detach(*this); +} + +// The ThreadLocalContextStorage class is a derived class from +// RuntimeContextStorage and provides a wrapper for propagating context through +// cpp thread locally. This file must be included to use the RuntimeContext +// class if another implementation has not been registered. +class ThreadLocalContextStorage : public RuntimeContextStorage +{ +public: + ThreadLocalContextStorage() noexcept = default; + + // Return the current context. + Context GetCurrent() noexcept override { return GetStack().Top(); } + + // Resets the context to the value previous to the passed in token. This will + // also detach all child contexts of the passed in token. + // Returns true if successful, false otherwise. + bool Detach(Token &token) noexcept override + { + // In most cases, the context to be detached is on the top of the stack. + if (token == GetStack().Top()) + { + GetStack().Pop(); + return true; + } + + if (!GetStack().Contains(token)) + { + return false; + } + + while (!(token == GetStack().Top())) + { + GetStack().Pop(); + } + + GetStack().Pop(); + + return true; + } + + // Sets the current 'Context' object. Returns a token + // that can be used to reset to the previous Context. + nostd::unique_ptr Attach(const Context &context) noexcept override + { + GetStack().Push(context); + return CreateToken(context); + } + +private: + // A nested class to store the attached contexts in a stack. + class Stack + { + friend class ThreadLocalContextStorage; + + Stack() noexcept : size_(0), capacity_(0), base_(nullptr) {} + + // Pops the top Context off the stack. + void Pop() noexcept + { + if (size_ == 0) + { + return; + } + // Store empty Context before decrementing `size`, to ensure + // the shared_ptr object (if stored in prev context object ) are released. + // The stack is not resized, and the unused memory would be reutilised + // for subsequent context storage. + base_[size_ - 1] = Context(); + size_ -= 1; + } + + bool Contains(const Token &token) const noexcept + { + for (size_t pos = size_; pos > 0; --pos) + { + if (token == base_[pos - 1]) + { + return true; + } + } + + return false; + } + + // Returns the Context at the top of the stack. + Context Top() const noexcept + { + if (size_ == 0) + { + return Context(); + } + return base_[size_ - 1]; + } + + // Pushes the passed in context pointer to the top of the stack + // and resizes if necessary. + void Push(const Context &context) noexcept + { + size_++; + if (size_ > capacity_) + { + Resize(size_ * 2); + } + base_[size_ - 1] = context; + } + + // Reallocates the storage array to the pass in new capacity size. + void Resize(size_t new_capacity) noexcept + { + size_t old_size = size_ - 1; + if (new_capacity == 0) + { + new_capacity = 2; + } + Context *temp = new Context[new_capacity]; + if (base_ != nullptr) + { + // vs2015 does not like this construct considering it unsafe: + // - std::copy(base_, base_ + old_size, temp); + // Ref. + // https://stackoverflow.com/questions/12270224/xutility2227-warning-c4996-std-copy-impl + for (size_t i = 0; i < (std::min)(old_size, new_capacity); i++) + { + temp[i] = base_[i]; + } + delete[] base_; + } + base_ = temp; + capacity_ = new_capacity; + } + + ~Stack() noexcept { delete[] base_; } + + size_t size_; + size_t capacity_; + Context *base_; + }; + + OPENTELEMETRY_API_SINGLETON Stack &GetStack() + { + static thread_local Stack stack_ = Stack(); + return stack_; + } +}; + +static RuntimeContextStorage *GetDefaultStorage() noexcept +{ + return new ThreadLocalContextStorage(); +} +} // namespace context +OPENTELEMETRY_END_NAMESPACE diff --git a/jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/detail/preprocessor.h b/jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/detail/preprocessor.h new file mode 100644 index 000000000..dc8eb5782 --- /dev/null +++ b/jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/detail/preprocessor.h @@ -0,0 +1,13 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// NOTE - code within detail namespace implements internal details, and not part +// of the public interface. + +#pragma once + +#define OPENTELEMETRY_STRINGIFY(S) OPENTELEMETRY_STRINGIFY_(S) +#define OPENTELEMETRY_STRINGIFY_(S) #S + +#define OPENTELEMETRY_CONCAT(A, B) OPENTELEMETRY_CONCAT_(A, B) +#define OPENTELEMETRY_CONCAT_(A, B) A##B diff --git a/jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/logs/event_logger.h b/jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/logs/event_logger.h new file mode 100644 index 000000000..654c6f6c6 --- /dev/null +++ b/jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/logs/event_logger.h @@ -0,0 +1,94 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +#pragma once +#ifdef ENABLE_LOGS_PREVIEW + +# include +# include +# include + +# include "opentelemetry/common/macros.h" +# include "opentelemetry/logs/log_record.h" +# include "opentelemetry/logs/logger.h" +# include "opentelemetry/logs/logger_type_traits.h" +# include "opentelemetry/logs/severity.h" +# include "opentelemetry/nostd/shared_ptr.h" +# include "opentelemetry/nostd/string_view.h" +# include "opentelemetry/nostd/unique_ptr.h" +# include "opentelemetry/version.h" + +OPENTELEMETRY_BEGIN_NAMESPACE +namespace logs +{ +/** + * Handles event log record creation. + **/ +class EventLogger +{ +public: + virtual ~EventLogger() = default; + + /* Returns the name of the logger */ + virtual const nostd::string_view GetName() noexcept = 0; + + /* Returns the delegate logger of this event logger */ + virtual nostd::shared_ptr GetDelegateLogger() noexcept = 0; + + /** + * Emit a event Log Record object + * + * @param event_name Event name + * @param log_record Log record + */ + virtual void EmitEvent(nostd::string_view event_name, + nostd::unique_ptr &&log_record) noexcept = 0; + + /** + * Emit a event Log Record object with arguments + * + * @param event_name Event name + * @tparam args Arguments which can be used to set data of log record by type. + * Severity -> severity, severity_text + * string_view -> body + * AttributeValue -> body + * SpanContext -> span_id,tace_id and trace_flags + * SpanId -> span_id + * TraceId -> tace_id + * TraceFlags -> trace_flags + * SystemTimestamp -> timestamp + * system_clock::time_point -> timestamp + * KeyValueIterable -> attributes + * Key value iterable container -> attributes + * span> -> attributes(return type of MakeAttributes) + */ + template + void EmitEvent(nostd::string_view event_name, ArgumentType &&... args) + { + nostd::shared_ptr delegate_logger = GetDelegateLogger(); + if (!delegate_logger) + { + return; + } + nostd::unique_ptr log_record = delegate_logger->CreateLogRecord(); + if (!log_record) + { + return; + } + + IgnoreTraitResult( + detail::LogRecordSetterTrait::type>::template Set( + log_record.get(), std::forward(args))...); + + EmitEvent(event_name, std::move(log_record)); + } + +private: + template + void IgnoreTraitResult(ValueType &&...) + {} +}; +} // namespace logs +OPENTELEMETRY_END_NAMESPACE + +#endif diff --git a/jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/logs/event_logger_provider.h b/jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/logs/event_logger_provider.h new file mode 100644 index 000000000..8692222c1 --- /dev/null +++ b/jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/logs/event_logger_provider.h @@ -0,0 +1,36 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +#pragma once +#ifdef ENABLE_LOGS_PREVIEW + +# include "opentelemetry/common/key_value_iterable.h" +# include "opentelemetry/common/key_value_iterable_view.h" +# include "opentelemetry/logs/event_logger.h" +# include "opentelemetry/logs/logger.h" +# include "opentelemetry/nostd/shared_ptr.h" +# include "opentelemetry/nostd/string_view.h" + +OPENTELEMETRY_BEGIN_NAMESPACE +namespace logs +{ +/** + * Creates new EventLogger instances. + */ +class EventLoggerProvider +{ +public: + virtual ~EventLoggerProvider() = default; + + /** + * Creates a named EventLogger instance. + * + */ + + virtual nostd::shared_ptr CreateEventLogger( + nostd::shared_ptr delegate_logger, + nostd::string_view event_domain) noexcept = 0; +}; +} // namespace logs +OPENTELEMETRY_END_NAMESPACE +#endif diff --git a/jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/logs/log_record.h b/jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/logs/log_record.h new file mode 100644 index 000000000..7fb51c2d9 --- /dev/null +++ b/jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/logs/log_record.h @@ -0,0 +1,81 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +#pragma once +#ifdef ENABLE_LOGS_PREVIEW + +# include "opentelemetry/common/attribute_value.h" +# include "opentelemetry/common/key_value_iterable.h" +# include "opentelemetry/common/timestamp.h" +# include "opentelemetry/logs/severity.h" +# include "opentelemetry/trace/span_id.h" +# include "opentelemetry/trace/trace_flags.h" +# include "opentelemetry/trace/trace_id.h" +# include "opentelemetry/version.h" + +OPENTELEMETRY_BEGIN_NAMESPACE +namespace logs +{ +/** + * Maintains a representation of a log in a format that can be processed by a recorder. + * + * This class is thread-compatible. + */ +class LogRecord +{ +public: + virtual ~LogRecord() = default; + + /** + * Set the timestamp for this log. + * @param timestamp the timestamp to set + */ + virtual void SetTimestamp(opentelemetry::common::SystemTimestamp timestamp) noexcept = 0; + + /** + * Set the observed timestamp for this log. + * @param timestamp the timestamp to set + */ + virtual void SetObservedTimestamp(opentelemetry::common::SystemTimestamp timestamp) noexcept = 0; + + /** + * Set the severity for this log. + * @param severity the severity of the event + */ + virtual void SetSeverity(opentelemetry::logs::Severity severity) noexcept = 0; + + /** + * Set body field for this log. + * @param message the body to set + */ + virtual void SetBody(const opentelemetry::common::AttributeValue &message) noexcept = 0; + + /** + * Set an attribute of a log. + * @param key the name of the attribute + * @param value the attribute value + */ + virtual void SetAttribute(nostd::string_view key, + const opentelemetry::common::AttributeValue &value) noexcept = 0; + + /** + * Set the trace id for this log. + * @param trace_id the trace id to set + */ + virtual void SetTraceId(const opentelemetry::trace::TraceId &trace_id) noexcept = 0; + + /** + * Set the span id for this log. + * @param span_id the span id to set + */ + virtual void SetSpanId(const opentelemetry::trace::SpanId &span_id) noexcept = 0; + + /** + * Inject trace_flags for this log. + * @param trace_flags the trace flags to set + */ + virtual void SetTraceFlags(const opentelemetry::trace::TraceFlags &trace_flags) noexcept = 0; +}; +} // namespace logs +OPENTELEMETRY_END_NAMESPACE +#endif diff --git a/jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/logs/logger.h b/jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/logs/logger.h new file mode 100644 index 000000000..23aea1114 --- /dev/null +++ b/jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/logs/logger.h @@ -0,0 +1,257 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +#pragma once +#ifdef ENABLE_LOGS_PREVIEW + +# include "opentelemetry/common/key_value_iterable.h" +# include "opentelemetry/logs/log_record.h" +# include "opentelemetry/logs/logger_type_traits.h" +# include "opentelemetry/logs/severity.h" +# include "opentelemetry/nostd/string_view.h" +# include "opentelemetry/nostd/unique_ptr.h" +# include "opentelemetry/version.h" + +OPENTELEMETRY_BEGIN_NAMESPACE +namespace logs +{ +/** + * Handles log record creation. + **/ +class Logger +{ +public: + virtual ~Logger() = default; + + /* Returns the name of the logger */ + virtual const nostd::string_view GetName() noexcept = 0; + + /** + * Create a Log Record object + * + * @return nostd::unique_ptr + */ + virtual nostd::unique_ptr CreateLogRecord() noexcept = 0; + + /** + * Emit a Log Record object + * + * @param log_record + */ + virtual void EmitLogRecord(nostd::unique_ptr &&log_record) noexcept = 0; + + /** + * Emit a Log Record object with arguments + * + * @param log_record Log record + * @tparam args Arguments which can be used to set data of log record by type. + * Severity -> severity, severity_text + * string_view -> body + * AttributeValue -> body + * SpanContext -> span_id,tace_id and trace_flags + * SpanId -> span_id + * TraceId -> tace_id + * TraceFlags -> trace_flags + * SystemTimestamp -> timestamp + * system_clock::time_point -> timestamp + * KeyValueIterable -> attributes + * Key value iterable container -> attributes + * span> -> attributes(return type of MakeAttributes) + */ + template + void EmitLogRecord(nostd::unique_ptr &&log_record, ArgumentType &&... args) + { + if (!log_record) + { + return; + } + + IgnoreTraitResult( + detail::LogRecordSetterTrait::type>::template Set( + log_record.get(), std::forward(args))...); + + EmitLogRecord(std::move(log_record)); + } + + /** + * Emit a Log Record object with arguments + * + * @tparam args Arguments which can be used to set data of log record by type. + * Severity -> severity, severity_text + * string_view -> body + * AttributeValue -> body + * SpanContext -> span_id,tace_id and trace_flags + * SpanId -> span_id + * TraceId -> tace_id + * TraceFlags -> trace_flags + * SystemTimestamp -> timestamp + * system_clock::time_point -> timestamp + * KeyValueIterable -> attributes + * Key value iterable container -> attributes + * span> -> attributes(return type of MakeAttributes) + */ + template + void EmitLogRecord(ArgumentType &&... args) + { + nostd::unique_ptr log_record = CreateLogRecord(); + if (!log_record) + { + return; + } + + EmitLogRecord(std::move(log_record), std::forward(args)...); + } + + /** + * Writes a log with a severity of trace. + * @tparam args Arguments which can be used to set data of log record by type. + * string_view -> body + * AttributeValue -> body + * SpanContext -> span_id,tace_id and trace_flags + * SpanId -> span_id + * TraceId -> tace_id + * TraceFlags -> trace_flags + * SystemTimestamp -> timestamp + * system_clock::time_point -> timestamp + * KeyValueIterable -> attributes + * Key value iterable container -> attributes + * span> -> attributes(return type of MakeAttributes) + */ + template + void Trace(ArgumentType &&... args) noexcept + { + static_assert( + !detail::LogRecordHasType::type...>::value, + "Severity is already set."); + this->EmitLogRecord(Severity::kTrace, std::forward(args)...); + } + + /** + * Writes a log with a severity of debug. + * @tparam args Arguments which can be used to set data of log record by type. + * string_view -> body + * AttributeValue -> body + * SpanContext -> span_id,tace_id and trace_flags + * SpanId -> span_id + * TraceId -> tace_id + * TraceFlags -> trace_flags + * SystemTimestamp -> timestamp + * system_clock::time_point -> timestamp + * KeyValueIterable -> attributes + * Key value iterable container -> attributes + * span> -> attributes(return type of MakeAttributes) + */ + template + void Debug(ArgumentType &&... args) noexcept + { + static_assert( + !detail::LogRecordHasType::type...>::value, + "Severity is already set."); + this->EmitLogRecord(Severity::kDebug, std::forward(args)...); + } + + /** + * Writes a log with a severity of info. + * @tparam args Arguments which can be used to set data of log record by type. + * string_view -> body + * AttributeValue -> body + * SpanContext -> span_id,tace_id and trace_flags + * SpanId -> span_id + * TraceId -> tace_id + * TraceFlags -> trace_flags + * SystemTimestamp -> timestamp + * system_clock::time_point -> timestamp + * KeyValueIterable -> attributes + * Key value iterable container -> attributes + * span> -> attributes(return type of MakeAttributes) + */ + template + void Info(ArgumentType &&... args) noexcept + { + static_assert( + !detail::LogRecordHasType::type...>::value, + "Severity is already set."); + this->EmitLogRecord(Severity::kInfo, std::forward(args)...); + } + + /** + * Writes a log with a severity of warn. + * @tparam args Arguments which can be used to set data of log record by type. + * string_view -> body + * AttributeValue -> body + * SpanContext -> span_id,tace_id and trace_flags + * SpanId -> span_id + * TraceId -> tace_id + * TraceFlags -> trace_flags + * SystemTimestamp -> timestamp + * system_clock::time_point -> timestamp + * KeyValueIterable -> attributes + * Key value iterable container -> attributes + * span> -> attributes(return type of MakeAttributes) + */ + template + void Warn(ArgumentType &&... args) noexcept + { + static_assert( + !detail::LogRecordHasType::type...>::value, + "Severity is already set."); + this->EmitLogRecord(Severity::kWarn, std::forward(args)...); + } + + /** + * Writes a log with a severity of error. + * @tparam args Arguments which can be used to set data of log record by type. + * string_view -> body + * AttributeValue -> body + * SpanContext -> span_id,tace_id and trace_flags + * SpanId -> span_id + * TraceId -> tace_id + * TraceFlags -> trace_flags + * SystemTimestamp -> timestamp + * system_clock::time_point -> timestamp + * KeyValueIterable -> attributes + * Key value iterable container -> attributes + * span> -> attributes(return type of MakeAttributes) + */ + template + void Error(ArgumentType &&... args) noexcept + { + static_assert( + !detail::LogRecordHasType::type...>::value, + "Severity is already set."); + this->EmitLogRecord(Severity::kError, std::forward(args)...); + } + + /** + * Writes a log with a severity of fatal. + * @tparam args Arguments which can be used to set data of log record by type. + * string_view -> body + * AttributeValue -> body + * SpanContext -> span_id,tace_id and trace_flags + * SpanId -> span_id + * TraceId -> tace_id + * TraceFlags -> trace_flags + * SystemTimestamp -> timestamp + * system_clock::time_point -> timestamp + * KeyValueIterable -> attributes + * Key value iterable container -> attributes + * span> -> attributes(return type of MakeAttributes) + */ + template + void Fatal(ArgumentType &&... args) noexcept + { + static_assert( + !detail::LogRecordHasType::type...>::value, + "Severity is already set."); + this->EmitLogRecord(Severity::kFatal, std::forward(args)...); + } + +private: + template + void IgnoreTraitResult(ValueType &&...) + {} +}; +} // namespace logs +OPENTELEMETRY_END_NAMESPACE + +#endif // end of ENABLE_LOGS_PREVIEW diff --git a/jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/logs/logger_provider.h b/jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/logs/logger_provider.h new file mode 100644 index 000000000..7979ab202 --- /dev/null +++ b/jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/logs/logger_provider.h @@ -0,0 +1,73 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +#pragma once + +#ifdef ENABLE_LOGS_PREVIEW + +# include "opentelemetry/common/key_value_iterable.h" +# include "opentelemetry/common/key_value_iterable_view.h" +# include "opentelemetry/logs/logger.h" +# include "opentelemetry/nostd/shared_ptr.h" +# include "opentelemetry/nostd/string_view.h" + +OPENTELEMETRY_BEGIN_NAMESPACE +namespace logs +{ +/** + * Creates new Logger instances. + */ +class OPENTELEMETRY_EXPORT LoggerProvider +{ +public: + virtual ~LoggerProvider() = default; + + /** + * Gets or creates a named Logger instance. + * + * Optionally a version can be passed to create a named and versioned Logger + * instance. + * + * Optionally a configuration file name can be passed to create a configuration for + * the Logger instance. + * + */ + + virtual nostd::shared_ptr GetLogger( + nostd::string_view logger_name, + nostd::string_view library_name, + nostd::string_view library_version = "", + nostd::string_view schema_url = "", + bool include_trace_context = true, + const common::KeyValueIterable &attributes = common::NoopKeyValueIterable()) = 0; + + nostd::shared_ptr GetLogger( + nostd::string_view logger_name, + nostd::string_view library_name, + nostd::string_view library_version, + nostd::string_view schema_url, + bool include_trace_context, + std::initializer_list> attributes) + { + return GetLogger(logger_name, library_name, library_version, schema_url, include_trace_context, + nostd::span>{ + attributes.begin(), attributes.end()}); + } + + template ::value> * = nullptr> + nostd::shared_ptr GetLogger(nostd::string_view logger_name, + nostd::string_view library_name, + nostd::string_view library_version, + nostd::string_view schema_url, + bool include_trace_context, + const T &attributes) + { + return GetLogger(logger_name, library_name, library_version, schema_url, include_trace_context, + common::KeyValueIterableView(attributes)); + } +}; +} // namespace logs +OPENTELEMETRY_END_NAMESPACE + +#endif // ENABLE_LOGS_PREVIEW diff --git a/jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/logs/logger_type_traits.h b/jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/logs/logger_type_traits.h new file mode 100644 index 000000000..8736c03f7 --- /dev/null +++ b/jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/logs/logger_type_traits.h @@ -0,0 +1,192 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +#pragma once +#ifdef ENABLE_LOGS_PREVIEW + +# include +# include + +# include "opentelemetry/common/attribute_value.h" +# include "opentelemetry/common/key_value_iterable.h" +# include "opentelemetry/common/timestamp.h" +# include "opentelemetry/logs/log_record.h" +# include "opentelemetry/logs/severity.h" +# include "opentelemetry/nostd/shared_ptr.h" +# include "opentelemetry/nostd/span.h" +# include "opentelemetry/nostd/string_view.h" +# include "opentelemetry/nostd/type_traits.h" +# include "opentelemetry/nostd/unique_ptr.h" +# include "opentelemetry/trace/span_context.h" +# include "opentelemetry/trace/span_id.h" +# include "opentelemetry/trace/trace_flags.h" +# include "opentelemetry/trace/trace_id.h" +# include "opentelemetry/version.h" + +OPENTELEMETRY_BEGIN_NAMESPACE +namespace logs +{ +namespace detail +{ +template +struct LogRecordSetterTrait; + +template <> +struct LogRecordSetterTrait +{ + template + inline static LogRecord *Set(LogRecord *log_record, ArgumentType &&arg) noexcept + { + log_record->SetSeverity(std::forward(arg)); + + return log_record; + } +}; + +template <> +struct LogRecordSetterTrait +{ + template + inline static LogRecord *Set(LogRecord *log_record, ArgumentType &&arg) noexcept + { + log_record->SetSpanId(arg.span_id()); + log_record->SetTraceId(arg.trace_id()); + log_record->SetTraceFlags(arg.trace_flags()); + + return log_record; + } +}; + +template <> +struct LogRecordSetterTrait +{ + template + inline static LogRecord *Set(LogRecord *log_record, ArgumentType &&arg) noexcept + { + log_record->SetSpanId(std::forward(arg)); + + return log_record; + } +}; + +template <> +struct LogRecordSetterTrait +{ + template + inline static LogRecord *Set(LogRecord *log_record, ArgumentType &&arg) noexcept + { + log_record->SetTraceId(std::forward(arg)); + + return log_record; + } +}; + +template <> +struct LogRecordSetterTrait +{ + template + inline static LogRecord *Set(LogRecord *log_record, ArgumentType &&arg) noexcept + { + log_record->SetTraceFlags(std::forward(arg)); + + return log_record; + } +}; + +template <> +struct LogRecordSetterTrait +{ + template + inline static LogRecord *Set(LogRecord *log_record, ArgumentType &&arg) noexcept + { + log_record->SetTimestamp(std::forward(arg)); + + return log_record; + } +}; + +template <> +struct LogRecordSetterTrait +{ + template + inline static LogRecord *Set(LogRecord *log_record, ArgumentType &&arg) noexcept + { + log_record->SetTimestamp(common::SystemTimestamp(std::forward(arg))); + + return log_record; + } +}; + +template <> +struct LogRecordSetterTrait +{ + template + inline static LogRecord *Set(LogRecord *log_record, ArgumentType &&arg) noexcept + { + arg.ForEachKeyValue( + [&log_record](nostd::string_view key, common::AttributeValue value) noexcept { + log_record->SetAttribute(key, value); + return true; + }); + + return log_record; + } +}; + +template +struct LogRecordSetterTrait +{ + template ::value || + std::is_convertible::value, + void> * = nullptr> + inline static LogRecord *Set(LogRecord *log_record, ArgumentType &&arg) noexcept + { + log_record->SetBody(std::forward(arg)); + + return log_record; + } + + template ::value, bool> + * = nullptr> + inline static LogRecord *Set(LogRecord *log_record, ArgumentType &&arg) noexcept + { + return LogRecordSetterTrait::template Set( + log_record, std::forward(arg)); + } + + template ::value, int> * = + nullptr> + inline static LogRecord *Set(LogRecord *log_record, ArgumentType &&arg) noexcept + { + for (auto &argv : arg) + { + log_record->SetAttribute(argv.first, argv.second); + } + + return log_record; + } +}; + +template +struct LogRecordHasType; + +template +struct LogRecordHasType : public std::false_type +{}; + +template +struct LogRecordHasType + : public std::conditional::value, + std::true_type, + LogRecordHasType>::type +{}; + +} // namespace detail + +} // namespace logs +OPENTELEMETRY_END_NAMESPACE + +#endif diff --git a/jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/logs/noop.h b/jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/logs/noop.h new file mode 100644 index 000000000..506100327 --- /dev/null +++ b/jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/logs/noop.h @@ -0,0 +1,114 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +#pragma once +#ifdef ENABLE_LOGS_PREVIEW + +// Please refer to provider.h for documentation on how to obtain a Logger object. +// +// This file is part of the internal implementation of OpenTelemetry. Nothing in this file should be +// used directly. Please refer to logger.h for documentation on these interfaces. + +# include + +# include "opentelemetry/common/attribute_value.h" +# include "opentelemetry/common/key_value_iterable.h" +# include "opentelemetry/common/timestamp.h" +# include "opentelemetry/context/runtime_context.h" +# include "opentelemetry/logs/event_logger_provider.h" +# include "opentelemetry/logs/logger.h" +# include "opentelemetry/logs/logger_provider.h" +# include "opentelemetry/logs/severity.h" +# include "opentelemetry/nostd/shared_ptr.h" +# include "opentelemetry/nostd/span.h" +# include "opentelemetry/nostd/string_view.h" +# include "opentelemetry/nostd/unique_ptr.h" +# include "opentelemetry/trace/span_id.h" +# include "opentelemetry/trace/trace_flags.h" +# include "opentelemetry/trace/trace_id.h" +# include "opentelemetry/version.h" + +# include "opentelemetry/version.h" + +OPENTELEMETRY_BEGIN_NAMESPACE +namespace logs +{ +/** + * No-op implementation of Logger. This class should not be used directly. It should only be + * instantiated using a LoggerProvider's GetLogger() call. + */ +class NoopLogger final : public Logger +{ +public: + const nostd::string_view GetName() noexcept override { return "noop logger"; } + + nostd::unique_ptr CreateLogRecord() noexcept override { return nullptr; } + + using Logger::EmitLogRecord; + + void EmitLogRecord(nostd::unique_ptr &&) noexcept override {} +}; + +/** + * No-op implementation of a LoggerProvider. + */ +class NoopLoggerProvider final : public opentelemetry::logs::LoggerProvider +{ +public: + NoopLoggerProvider() + : logger_{ + nostd::shared_ptr(new opentelemetry::logs::NoopLogger)} + {} + + nostd::shared_ptr GetLogger(nostd::string_view /* logger_name */, + nostd::string_view /* library_name */, + nostd::string_view /* library_version */, + nostd::string_view /* schema_url */, + bool /* include_trace_context */, + const common::KeyValueIterable & /* attributes */) override + { + return logger_; + } + +private: + nostd::shared_ptr logger_; +}; + +class NoopEventLogger final : public EventLogger +{ +public: + NoopEventLogger() : logger_{nostd::shared_ptr(new NoopLogger())} {} + + const nostd::string_view GetName() noexcept override { return "noop event logger"; } + + nostd::shared_ptr GetDelegateLogger() noexcept override { return logger_; } + + void EmitEvent(nostd::string_view, nostd::unique_ptr &&) noexcept override {} + +private: + nostd::shared_ptr logger_; +}; + +/** + * No-op implementation of a EventLoggerProvider. + */ +class NoopEventLoggerProvider final : public EventLoggerProvider +{ +public: + NoopEventLoggerProvider() : event_logger_{nostd::shared_ptr(new NoopEventLogger())} + {} + + nostd::shared_ptr CreateEventLogger( + nostd::shared_ptr /*delegate_logger*/, + nostd::string_view /*event_domain*/) noexcept override + { + return event_logger_; + } + +private: + nostd::shared_ptr event_logger_; +}; + +} // namespace logs +OPENTELEMETRY_END_NAMESPACE +#endif diff --git a/jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/logs/provider.h b/jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/logs/provider.h new file mode 100644 index 000000000..ed6fe86ba --- /dev/null +++ b/jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/logs/provider.h @@ -0,0 +1,90 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +#pragma once +#ifdef ENABLE_LOGS_PREVIEW + +# include + +# include "opentelemetry/common/macros.h" +# include "opentelemetry/common/spin_lock_mutex.h" +# include "opentelemetry/logs/event_logger_provider.h" +# include "opentelemetry/logs/logger_provider.h" +# include "opentelemetry/logs/noop.h" +# include "opentelemetry/nostd/shared_ptr.h" + +OPENTELEMETRY_BEGIN_NAMESPACE +namespace logs +{ +/** + * Stores the singleton global LoggerProvider. + */ +class Provider +{ +public: + /** + * Returns the singleton LoggerProvider. + * + * By default, a no-op LoggerProvider is returned. This will never return a + * nullptr LoggerProvider. + */ + static nostd::shared_ptr GetLoggerProvider() noexcept + { + std::lock_guard guard(GetLock()); + return nostd::shared_ptr(GetProvider()); + } + + /** + * Changes the singleton LoggerProvider. + */ + static void SetLoggerProvider(nostd::shared_ptr tp) noexcept + { + std::lock_guard guard(GetLock()); + GetProvider() = tp; + } + + /** + * Returns the singleton EventLoggerProvider. + * + * By default, a no-op EventLoggerProvider is returned. This will never return a + * nullptr EventLoggerProvider. + */ + static nostd::shared_ptr GetEventLoggerProvider() noexcept + { + std::lock_guard guard(GetLock()); + return nostd::shared_ptr(GetEventProvider()); + } + + /** + * Changes the singleton EventLoggerProvider. + */ + static void SetEventLoggerProvider(nostd::shared_ptr tp) noexcept + { + std::lock_guard guard(GetLock()); + GetEventProvider() = tp; + } + +private: + OPENTELEMETRY_API_SINGLETON static nostd::shared_ptr &GetProvider() noexcept + { + static nostd::shared_ptr provider(new NoopLoggerProvider); + return provider; + } + + OPENTELEMETRY_API_SINGLETON static nostd::shared_ptr + &GetEventProvider() noexcept + { + static nostd::shared_ptr provider(new NoopEventLoggerProvider); + return provider; + } + + OPENTELEMETRY_API_SINGLETON static common::SpinLockMutex &GetLock() noexcept + { + static common::SpinLockMutex lock; + return lock; + } +}; + +} // namespace logs +OPENTELEMETRY_END_NAMESPACE +#endif diff --git a/jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/logs/severity.h b/jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/logs/severity.h new file mode 100644 index 000000000..9fcf457b2 --- /dev/null +++ b/jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/logs/severity.h @@ -0,0 +1,61 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +#pragma once +#ifdef ENABLE_LOGS_PREVIEW + +# include "opentelemetry/version.h" + +OPENTELEMETRY_BEGIN_NAMESPACE +namespace logs +{ + +/** + * Severity Levels assigned to log events, based on Log Data Model, + * with the addition of kInvalid (mapped to a severity number of 0). + */ +enum class Severity : uint8_t +{ + kInvalid, + kTrace, + kTrace2, + kTrace3, + kTrace4, + kDebug, + kDebug2, + kDebug3, + kDebug4, + kInfo, + kInfo2, + kInfo3, + kInfo4, + kWarn, + kWarn2, + kWarn3, + kWarn4, + kError, + kError2, + kError3, + kError4, + kFatal, + kFatal2, + kFatal3, + kFatal4 +}; + +/** + * Mapping of the severity enum above, to a severity text string (in all caps). + * This severity text can be printed out by exporters. Capital letters follow the + * spec naming convention. + * + * Included to follow the specification's recommendation to print both + * severity number and text in each log record. + */ +const opentelemetry::nostd::string_view SeverityNumToText[25] = { + "INVALID", "TRACE", "TRACE2", "TRACE3", "TRACE4", "DEBUG", "DEBUG2", "DEBUG3", "DEBUG4", + "INFO", "INFO2", "INFO3", "INFO4", "WARN", "WARN2", "WARN3", "WARN4", "ERROR", + "ERROR2", "ERROR3", "ERROR4", "FATAL", "FATAL2", "FATAL3", "FATAL4"}; + +} // namespace logs +OPENTELEMETRY_END_NAMESPACE +#endif diff --git a/jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/metrics/async_instruments.h b/jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/metrics/async_instruments.h new file mode 100644 index 000000000..6e6d5012c --- /dev/null +++ b/jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/metrics/async_instruments.h @@ -0,0 +1,32 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +#pragma once + +#include "opentelemetry/metrics/observer_result.h" + +OPENTELEMETRY_BEGIN_NAMESPACE +namespace metrics +{ + +using ObservableCallbackPtr = void (*)(ObserverResult, void *); + +class ObservableInstrument +{ +public: + ObservableInstrument() = default; + virtual ~ObservableInstrument() = default; + + /** + * Sets up a function that will be called whenever a metric collection is initiated. + */ + virtual void AddCallback(ObservableCallbackPtr, void *state) noexcept = 0; + + /** + * Remove a function that was configured to be called whenever a metric collection is initiated. + */ + virtual void RemoveCallback(ObservableCallbackPtr, void *state) noexcept = 0; +}; + +} // namespace metrics +OPENTELEMETRY_END_NAMESPACE diff --git a/jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/metrics/meter.h b/jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/metrics/meter.h new file mode 100644 index 000000000..877453884 --- /dev/null +++ b/jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/metrics/meter.h @@ -0,0 +1,141 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +#pragma once + +#include "opentelemetry/metrics/async_instruments.h" +#include "opentelemetry/metrics/sync_instruments.h" +#include "opentelemetry/nostd/shared_ptr.h" +#include "opentelemetry/nostd/span.h" +#include "opentelemetry/nostd/string_view.h" +#include "opentelemetry/nostd/unique_ptr.h" +#include "opentelemetry/version.h" + +OPENTELEMETRY_BEGIN_NAMESPACE +namespace metrics +{ +/** + * Handles instrument creation and provides a facility for batch recording. + * + * This class provides methods to create new metric instruments, record a + * batch of values to a specified set of instruments, and collect + * measurements from all instruments. + * + */ +class Meter +{ +public: + virtual ~Meter() = default; + + /** + * Creates a Counter with the passed characteristics and returns a unique_ptr to that Counter. + * + * @param name the name of the new Counter. + * @param description a brief description of what the Counter is used for. + * @param unit the unit of metric values following https://unitsofmeasure.org/ucum.html. + * @return a shared pointer to the created Counter. + */ + + virtual nostd::unique_ptr> CreateUInt64Counter( + nostd::string_view name, + nostd::string_view description = "", + nostd::string_view unit = "") noexcept = 0; + + virtual nostd::unique_ptr> CreateDoubleCounter( + nostd::string_view name, + nostd::string_view description = "", + nostd::string_view unit = "") noexcept = 0; + + /** + * Creates a Asynchronous (Observable) counter with the passed characteristics and returns a + * shared_ptr to that Observable Counter + * + * @param name the name of the new Observable Counter. + * @param description a brief description of what the Observable Counter is used for. + * @param unit the unit of metric values following https://unitsofmeasure.org/ucum.html. + */ + virtual nostd::shared_ptr CreateInt64ObservableCounter( + nostd::string_view name, + nostd::string_view description = "", + nostd::string_view unit = "") noexcept = 0; + + virtual nostd::shared_ptr CreateDoubleObservableCounter( + nostd::string_view name, + nostd::string_view description = "", + nostd::string_view unit = "") noexcept = 0; + + /** + * Creates a Histogram with the passed characteristics and returns a unique_ptr to that Histogram. + * + * @param name the name of the new Histogram. + * @param description a brief description of what the Histogram is used for. + * @param unit the unit of metric values following https://unitsofmeasure.org/ucum.html. + * @return a shared pointer to the created Histogram. + */ + virtual nostd::unique_ptr> CreateUInt64Histogram( + nostd::string_view name, + nostd::string_view description = "", + nostd::string_view unit = "") noexcept = 0; + + virtual nostd::unique_ptr> CreateDoubleHistogram( + nostd::string_view name, + nostd::string_view description = "", + nostd::string_view unit = "") noexcept = 0; + + /** + * Creates a Asynchronouse (Observable) Gauge with the passed characteristics and returns a + * shared_ptr to that Observable Gauge + * + * @param name the name of the new Observable Gauge. + * @param description a brief description of what the Observable Gauge is used for. + * @param unit the unit of metric values following https://unitsofmeasure.org/ucum.html. + */ + virtual nostd::shared_ptr CreateInt64ObservableGauge( + nostd::string_view name, + nostd::string_view description = "", + nostd::string_view unit = "") noexcept = 0; + + virtual nostd::shared_ptr CreateDoubleObservableGauge( + nostd::string_view name, + nostd::string_view description = "", + nostd::string_view unit = "") noexcept = 0; + + /** + * Creates an UpDownCounter with the passed characteristics and returns a unique_ptr to that + * UpDownCounter. + * + * @param name the name of the new UpDownCounter. + * @param description a brief description of what the UpDownCounter is used for. + * @param unit the unit of metric values following https://unitsofmeasure.org/ucum.html. + * @return a shared pointer to the created UpDownCounter. + */ + virtual nostd::unique_ptr> CreateInt64UpDownCounter( + nostd::string_view name, + nostd::string_view description = "", + nostd::string_view unit = "") noexcept = 0; + + virtual nostd::unique_ptr> CreateDoubleUpDownCounter( + nostd::string_view name, + nostd::string_view description = "", + nostd::string_view unit = "") noexcept = 0; + + /** + * Creates a Asynchronouse (Observable) UpDownCounter with the passed characteristics and returns + * a shared_ptr to that Observable UpDownCounter + * + * @param name the name of the new Observable UpDownCounter. + * @param description a brief description of what the Observable UpDownCounter is used for. + * @param unit the unit of metric values following https://unitsofmeasure.org/ucum.html. + */ + virtual nostd::shared_ptr CreateInt64ObservableUpDownCounter( + nostd::string_view name, + nostd::string_view description = "", + nostd::string_view unit = "") noexcept = 0; + + virtual nostd::shared_ptr CreateDoubleObservableUpDownCounter( + nostd::string_view name, + nostd::string_view description = "", + nostd::string_view unit = "") noexcept = 0; +}; +} // namespace metrics +OPENTELEMETRY_END_NAMESPACE diff --git a/jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/metrics/meter_provider.h b/jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/metrics/meter_provider.h new file mode 100644 index 000000000..4c3306ebf --- /dev/null +++ b/jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/metrics/meter_provider.h @@ -0,0 +1,31 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +#pragma once + +#include "opentelemetry/metrics/meter.h" +#include "opentelemetry/nostd/shared_ptr.h" +#include "opentelemetry/nostd/string_view.h" + +OPENTELEMETRY_BEGIN_NAMESPACE +namespace metrics +{ +/** + * Creates new Meter instances. + */ +class MeterProvider +{ +public: + virtual ~MeterProvider() = default; + /** + * Gets or creates a named Meter instance. + * + * Optionally a version can be passed to create a named and versioned Meter + * instance. + */ + virtual nostd::shared_ptr GetMeter(nostd::string_view library_name, + nostd::string_view library_version = "", + nostd::string_view schema_url = "") noexcept = 0; +}; +} // namespace metrics +OPENTELEMETRY_END_NAMESPACE diff --git a/jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/metrics/noop.h b/jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/metrics/noop.h new file mode 100644 index 000000000..0d2eacde9 --- /dev/null +++ b/jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/metrics/noop.h @@ -0,0 +1,214 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +#pragma once + +#include "opentelemetry/metrics/async_instruments.h" +#include "opentelemetry/metrics/meter.h" +#include "opentelemetry/metrics/meter_provider.h" +#include "opentelemetry/metrics/observer_result.h" +#include "opentelemetry/metrics/sync_instruments.h" +#include "opentelemetry/version.h" + +OPENTELEMETRY_BEGIN_NAMESPACE +namespace metrics +{ + +template +class NoopCounter : public Counter +{ +public: + NoopCounter(nostd::string_view /* name */, + nostd::string_view /* description */, + nostd::string_view /* unit */) noexcept + {} + void Add(T /* value */) noexcept override {} + void Add(T /* value */, const opentelemetry::context::Context & /* context */) noexcept override + {} + void Add(T /* value */, const common::KeyValueIterable & /* attributes */) noexcept override {} + void Add(T /* value */, + const common::KeyValueIterable & /* attributes */, + const opentelemetry::context::Context & /* context */) noexcept override + {} +}; + +template +class NoopHistogram : public Histogram +{ +public: + NoopHistogram(nostd::string_view /* name */, + nostd::string_view /* description */, + nostd::string_view /* unit */) noexcept + {} + void Record(T /* value */, + const opentelemetry::context::Context & /* context */) noexcept override + {} + void Record(T /* value */, + const common::KeyValueIterable & /* attributes */, + const opentelemetry::context::Context & /* context */) noexcept override + {} +}; + +template +class NoopUpDownCounter : public UpDownCounter +{ +public: + NoopUpDownCounter(nostd::string_view /* name */, + nostd::string_view /* description */, + nostd::string_view /* unit */) noexcept + {} + ~NoopUpDownCounter() override = default; + void Add(T /* value */) noexcept override {} + void Add(T /* value */, const opentelemetry::context::Context & /* context */) noexcept override + {} + void Add(T /* value */, const common::KeyValueIterable & /* attributes */) noexcept override {} + void Add(T /* value */, + const common::KeyValueIterable & /* attributes */, + const opentelemetry::context::Context & /* context */) noexcept override + {} +}; + +class NoopObservableInstrument : public ObservableInstrument +{ +public: + NoopObservableInstrument(nostd::string_view /* name */, + nostd::string_view /* description */, + nostd::string_view /* unit */) noexcept + {} + + void AddCallback(ObservableCallbackPtr, void * /* state */) noexcept override {} + void RemoveCallback(ObservableCallbackPtr, void * /* state */) noexcept override {} +}; + +/** + * No-op implementation of Meter. + */ +class NoopMeter final : public Meter +{ +public: + nostd::unique_ptr> CreateUInt64Counter( + nostd::string_view name, + nostd::string_view description = "", + nostd::string_view unit = "") noexcept override + { + return nostd::unique_ptr>{new NoopCounter(name, description, unit)}; + } + + nostd::unique_ptr> CreateDoubleCounter( + nostd::string_view name, + nostd::string_view description = "", + nostd::string_view unit = "") noexcept override + { + return nostd::unique_ptr>{new NoopCounter(name, description, unit)}; + } + + nostd::shared_ptr CreateInt64ObservableCounter( + nostd::string_view name, + nostd::string_view description = "", + nostd::string_view unit = "") noexcept override + { + return nostd::shared_ptr( + new NoopObservableInstrument(name, description, unit)); + } + + nostd::shared_ptr CreateDoubleObservableCounter( + nostd::string_view name, + nostd::string_view description = "", + nostd::string_view unit = "") noexcept override + { + return nostd::shared_ptr( + new NoopObservableInstrument(name, description, unit)); + } + + nostd::unique_ptr> CreateUInt64Histogram( + nostd::string_view name, + nostd::string_view description = "", + nostd::string_view unit = "") noexcept override + { + return nostd::unique_ptr>{ + new NoopHistogram(name, description, unit)}; + } + + nostd::unique_ptr> CreateDoubleHistogram( + nostd::string_view name, + nostd::string_view description = "", + nostd::string_view unit = "") noexcept override + { + return nostd::unique_ptr>{new NoopHistogram(name, description, unit)}; + } + + nostd::shared_ptr CreateInt64ObservableGauge( + nostd::string_view name, + nostd::string_view description = "", + nostd::string_view unit = "") noexcept override + { + return nostd::shared_ptr( + new NoopObservableInstrument(name, description, unit)); + } + + nostd::shared_ptr CreateDoubleObservableGauge( + nostd::string_view name, + nostd::string_view description = "", + nostd::string_view unit = "") noexcept override + { + return nostd::shared_ptr( + new NoopObservableInstrument(name, description, unit)); + } + + nostd::unique_ptr> CreateInt64UpDownCounter( + nostd::string_view name, + nostd::string_view description = "", + nostd::string_view unit = "") noexcept override + { + return nostd::unique_ptr>{ + new NoopUpDownCounter(name, description, unit)}; + } + + nostd::unique_ptr> CreateDoubleUpDownCounter( + nostd::string_view name, + nostd::string_view description = "", + nostd::string_view unit = "") noexcept override + { + return nostd::unique_ptr>{ + new NoopUpDownCounter(name, description, unit)}; + } + + nostd::shared_ptr CreateInt64ObservableUpDownCounter( + nostd::string_view name, + nostd::string_view description = "", + nostd::string_view unit = "") noexcept override + { + return nostd::shared_ptr( + new NoopObservableInstrument(name, description, unit)); + } + + nostd::shared_ptr CreateDoubleObservableUpDownCounter( + nostd::string_view name, + nostd::string_view description = "", + nostd::string_view unit = "") noexcept override + { + return nostd::shared_ptr( + new NoopObservableInstrument(name, description, unit)); + } +}; + +/** + * No-op implementation of a MeterProvider. + */ +class NoopMeterProvider final : public MeterProvider +{ +public: + NoopMeterProvider() : meter_{nostd::shared_ptr(new NoopMeter)} {} + + nostd::shared_ptr GetMeter(nostd::string_view /* library_name */, + nostd::string_view /* library_version */, + nostd::string_view /* schema_url */) noexcept override + { + return meter_; + } + +private: + nostd::shared_ptr meter_; +}; +} // namespace metrics +OPENTELEMETRY_END_NAMESPACE diff --git a/jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/metrics/observer_result.h b/jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/metrics/observer_result.h new file mode 100644 index 000000000..88cae2861 --- /dev/null +++ b/jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/metrics/observer_result.h @@ -0,0 +1,52 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +#pragma once + +#include "opentelemetry/common/attribute_value.h" +#include "opentelemetry/common/key_value_iterable_view.h" +#include "opentelemetry/nostd/shared_ptr.h" +#include "opentelemetry/nostd/span.h" +#include "opentelemetry/nostd/string_view.h" +#include "opentelemetry/nostd/type_traits.h" + +OPENTELEMETRY_BEGIN_NAMESPACE +namespace metrics +{ + +/** + * ObserverResultT class is necessary for the callback recording asynchronous + * instrument use. + */ +template +class ObserverResultT +{ + +public: + virtual ~ObserverResultT() = default; + + virtual void Observe(T value) noexcept = 0; + + virtual void Observe(T value, const common::KeyValueIterable &attributes) noexcept = 0; + + template ::value> * = nullptr> + void Observe(T value, const U &attributes) noexcept + { + this->Observe(value, common::KeyValueIterableView{attributes}); + } + + void Observe(T value, + std::initializer_list> + attributes) noexcept + { + this->Observe(value, nostd::span>{ + attributes.begin(), attributes.end()}); + } +}; + +using ObserverResult = nostd::variant>, + nostd::shared_ptr>>; + +} // namespace metrics +OPENTELEMETRY_END_NAMESPACE diff --git a/jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/metrics/provider.h b/jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/metrics/provider.h new file mode 100644 index 000000000..ea710a482 --- /dev/null +++ b/jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/metrics/provider.h @@ -0,0 +1,59 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +#pragma once + +#include + +#include "opentelemetry/common/macros.h" +#include "opentelemetry/common/spin_lock_mutex.h" +#include "opentelemetry/metrics/meter_provider.h" +#include "opentelemetry/metrics/noop.h" +#include "opentelemetry/nostd/shared_ptr.h" + +OPENTELEMETRY_BEGIN_NAMESPACE +namespace metrics +{ +/** + * Stores the singleton global MeterProvider. + */ +class Provider +{ +public: + /** + * Returns the singleton MeterProvider. + * + * By default, a no-op MeterProvider is returned. This will never return a + * nullptr MeterProvider. + */ + static nostd::shared_ptr GetMeterProvider() noexcept + { + std::lock_guard guard(GetLock()); + return nostd::shared_ptr(GetProvider()); + } + + /** + * Changes the singleton MeterProvider. + */ + static void SetMeterProvider(nostd::shared_ptr tp) noexcept + { + std::lock_guard guard(GetLock()); + GetProvider() = tp; + } + +private: + OPENTELEMETRY_API_SINGLETON static nostd::shared_ptr &GetProvider() noexcept + { + static nostd::shared_ptr provider(new NoopMeterProvider); + return provider; + } + + OPENTELEMETRY_API_SINGLETON static common::SpinLockMutex &GetLock() noexcept + { + static common::SpinLockMutex lock; + return lock; + } +}; + +} // namespace metrics +OPENTELEMETRY_END_NAMESPACE diff --git a/jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/metrics/sync_instruments.h b/jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/metrics/sync_instruments.h new file mode 100644 index 000000000..8db77daae --- /dev/null +++ b/jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/metrics/sync_instruments.h @@ -0,0 +1,197 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +#pragma once + +#include "opentelemetry/common/attribute_value.h" +#include "opentelemetry/common/key_value_iterable_view.h" +#include "opentelemetry/context/context.h" +#include "opentelemetry/nostd/span.h" +#include "opentelemetry/nostd/string_view.h" +#include "opentelemetry/nostd/type_traits.h" + +OPENTELEMETRY_BEGIN_NAMESPACE +namespace metrics +{ + +class SynchronousInstrument +{ +public: + SynchronousInstrument() = default; + virtual ~SynchronousInstrument() = default; +}; + +template +class Counter : public SynchronousInstrument +{ + +public: + /** + * Add adds the value to the counter's sum + * + * @param value The increment amount. MUST be non-negative. + */ + virtual void Add(T value) noexcept = 0; + + virtual void Add(T value, const opentelemetry::context::Context &context) noexcept = 0; + + /** + * Add adds the value to the counter's sum. The attributes should contain + * the keys and values to be associated with this value. Counters only + * accept positive valued updates. + * + * @param value The increment amount. MUST be non-negative. + * @param attributes the set of attributes, as key-value pairs + */ + + virtual void Add(T value, const common::KeyValueIterable &attributes) noexcept = 0; + + virtual void Add(T value, + const common::KeyValueIterable &attributes, + const opentelemetry::context::Context &context) noexcept = 0; + + template ::value> * = nullptr> + void Add(T value, const U &attributes) noexcept + { + auto context = opentelemetry::context::Context{}; + this->Add(value, common::KeyValueIterableView{attributes}, context); + } + + template ::value> * = nullptr> + void Add(T value, const U &attributes, const opentelemetry::context::Context &context) noexcept + { + this->Add(value, common::KeyValueIterableView{attributes}, context); + } + + void Add(T value, + std::initializer_list> + attributes) noexcept + { + auto context = opentelemetry::context::Context{}; + this->Add(value, + nostd::span>{ + attributes.begin(), attributes.end()}, + context); + } + + void Add(T value, + std::initializer_list> attributes, + const opentelemetry::context::Context &context) noexcept + { + this->Add(value, + nostd::span>{ + attributes.begin(), attributes.end()}, + context); + } +}; + +/** A histogram instrument that records values. */ + +template +class Histogram : public SynchronousInstrument +{ +public: + /** + * Records a value. + * + * @param value The increment amount. May be positive, negative or zero. + */ + virtual void Record(T value, const opentelemetry::context::Context &context) noexcept = 0; + + /** + * Records a value with a set of attributes. + * + * @param value The increment amount. May be positive, negative or zero. + * @param attributes A set of attributes to associate with the count. + */ + virtual void Record(T value, + const common::KeyValueIterable &attributes, + const opentelemetry::context::Context &context) noexcept = 0; + + template ::value> * = nullptr> + void Record(T value, const U &attributes, const opentelemetry::context::Context &context) noexcept + { + this->Record(value, common::KeyValueIterableView{attributes}, context); + } + + void Record( + T value, + std::initializer_list> attributes, + const opentelemetry::context::Context &context) noexcept + { + this->Record(value, + nostd::span>{ + attributes.begin(), attributes.end()}, + context); + } +}; + +/** An up-down-counter instrument that adds or reduce values. */ + +template +class UpDownCounter : public SynchronousInstrument +{ +public: + /** + * Adds a value. + * + * @param value The amount of the measurement. + */ + virtual void Add(T value) noexcept = 0; + + virtual void Add(T value, const opentelemetry::context::Context &context) noexcept = 0; + + /** + * Add a value with a set of attributes. + * + * @param value The increment amount. May be positive, negative or zero. + * @param attributes A set of attributes to associate with the count. + */ + virtual void Add(T value, const common::KeyValueIterable &attributes) noexcept = 0; + + virtual void Add(T value, + const common::KeyValueIterable &attributes, + const opentelemetry::context::Context &context) noexcept = 0; + + template ::value> * = nullptr> + void Add(T value, const U &attributes) noexcept + { + auto context = opentelemetry::context::Context{}; + this->Add(value, common::KeyValueIterableView{attributes}, context); + } + + template ::value> * = nullptr> + void Add(T value, const U &attributes, const opentelemetry::context::Context &context) noexcept + { + this->Add(value, common::KeyValueIterableView{attributes}, context); + } + + void Add(T value, + std::initializer_list> + attributes) noexcept + { + auto context = opentelemetry::context::Context{}; + this->Add(value, + nostd::span>{ + attributes.begin(), attributes.end()}, + context); + } + + void Add(T value, + std::initializer_list> attributes, + const opentelemetry::context::Context &context) noexcept + { + this->Add(value, + nostd::span>{ + attributes.begin(), attributes.end()}, + context); + } +}; + +} // namespace metrics +OPENTELEMETRY_END_NAMESPACE diff --git a/jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/nostd/detail/all.h b/jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/nostd/detail/all.h new file mode 100644 index 000000000..deaf3ac6f --- /dev/null +++ b/jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/nostd/detail/all.h @@ -0,0 +1,21 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +#pragma once + +#include + +#include "opentelemetry/nostd/utility.h" +#include "opentelemetry/version.h" + +OPENTELEMETRY_BEGIN_NAMESPACE +namespace nostd +{ +namespace detail +{ +template +using all = std::is_same, integer_sequence>; + +} // namespace detail +} // namespace nostd +OPENTELEMETRY_END_NAMESPACE diff --git a/jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/nostd/detail/decay.h b/jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/nostd/detail/decay.h new file mode 100644 index 000000000..a6cb11124 --- /dev/null +++ b/jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/nostd/detail/decay.h @@ -0,0 +1,16 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +#pragma once + +#include + +#include "opentelemetry/version.h" + +OPENTELEMETRY_BEGIN_NAMESPACE +namespace nostd +{ +template +using decay_t = typename std::decay::type; +} // namespace nostd +OPENTELEMETRY_END_NAMESPACE diff --git a/jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/nostd/detail/dependent_type.h b/jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/nostd/detail/dependent_type.h new file mode 100644 index 000000000..5bba09ff8 --- /dev/null +++ b/jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/nostd/detail/dependent_type.h @@ -0,0 +1,20 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +#pragma once + +#include + +#include "opentelemetry/version.h" + +OPENTELEMETRY_BEGIN_NAMESPACE +namespace nostd +{ +namespace detail +{ +template +struct dependent_type : T +{}; +} // namespace detail +} // namespace nostd +OPENTELEMETRY_END_NAMESPACE diff --git a/jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/nostd/detail/functional.h b/jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/nostd/detail/functional.h new file mode 100644 index 000000000..437f92f0a --- /dev/null +++ b/jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/nostd/detail/functional.h @@ -0,0 +1,63 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +#pragma once + +#include + +#include "opentelemetry/version.h" + +#define OPENTELEMETRY_RETURN(...) \ + noexcept(noexcept(__VA_ARGS__))->decltype(__VA_ARGS__) { return __VA_ARGS__; } + +OPENTELEMETRY_BEGIN_NAMESPACE +namespace nostd +{ +namespace detail +{ +struct equal_to +{ + template + inline constexpr auto operator()(Lhs &&lhs, Rhs &&rhs) const + OPENTELEMETRY_RETURN(std::forward(lhs) == std::forward(rhs)) +}; + +struct not_equal_to +{ + template + inline constexpr auto operator()(Lhs &&lhs, Rhs &&rhs) const + OPENTELEMETRY_RETURN(std::forward(lhs) != std::forward(rhs)) +}; + +struct less +{ + template + inline constexpr auto operator()(Lhs &&lhs, Rhs &&rhs) const + OPENTELEMETRY_RETURN(std::forward(lhs) < std::forward(rhs)) +}; + +struct greater +{ + template + inline constexpr auto operator()(Lhs &&lhs, Rhs &&rhs) const + OPENTELEMETRY_RETURN(std::forward(lhs) > std::forward(rhs)) +}; + +struct less_equal +{ + template + inline constexpr auto operator()(Lhs &&lhs, Rhs &&rhs) const + OPENTELEMETRY_RETURN(std::forward(lhs) <= std::forward(rhs)) +}; + +struct greater_equal +{ + template + inline constexpr auto operator()(Lhs &&lhs, Rhs &&rhs) const + OPENTELEMETRY_RETURN(std::forward(lhs) >= std::forward(rhs)) +}; +} // namespace detail +} // namespace nostd +OPENTELEMETRY_END_NAMESPACE + +#undef OPENTELEMETRY_RETURN diff --git a/jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/nostd/detail/invoke.h b/jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/nostd/detail/invoke.h new file mode 100644 index 000000000..a0c010a8f --- /dev/null +++ b/jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/nostd/detail/invoke.h @@ -0,0 +1,159 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +#pragma once + +#include +#include + +#include "opentelemetry/nostd/detail/decay.h" +#include "opentelemetry/nostd/detail/void.h" +#include "opentelemetry/version.h" + +#define OPENTELEMETRY_RETURN(...) \ + noexcept(noexcept(__VA_ARGS__))->decltype(__VA_ARGS__) { return __VA_ARGS__; } + +OPENTELEMETRY_BEGIN_NAMESPACE +namespace nostd +{ +namespace detail +{ + +template +struct is_reference_wrapper : std::false_type +{}; + +template +struct is_reference_wrapper> : std::true_type +{}; + +template +struct Invoke; + +template <> +struct Invoke +{ + template + inline static constexpr auto invoke(R T::*pmf, Arg &&arg, Args &&... args) + OPENTELEMETRY_RETURN((std::forward(arg).*pmf)(std::forward(args)...)) +}; + +template <> +struct Invoke +{ + template + inline static constexpr auto invoke(R T::*pmf, Arg &&arg, Args &&... args) + OPENTELEMETRY_RETURN((std::forward(arg).get().*pmf)(std::forward(args)...)) +}; + +template <> +struct Invoke +{ + template + inline static constexpr auto invoke(R T::*pmf, Arg &&arg, Args &&... args) + OPENTELEMETRY_RETURN(((*std::forward(arg)).*pmf)(std::forward(args)...)) +}; + +template <> +struct Invoke +{ + template + inline static constexpr auto invoke(R T::*pmo, Arg &&arg) + OPENTELEMETRY_RETURN(std::forward(arg).*pmo) +}; + +template <> +struct Invoke +{ + template + inline static constexpr auto invoke(R T::*pmo, Arg &&arg) + OPENTELEMETRY_RETURN(std::forward(arg).get().*pmo) +}; + +template <> +struct Invoke +{ + template + inline static constexpr auto invoke(R T::*pmo, Arg &&arg) + OPENTELEMETRY_RETURN((*std::forward(arg)).*pmo) +}; + +template +inline constexpr auto invoke_impl(R T::*f, Arg &&arg, Args &&... args) + OPENTELEMETRY_RETURN(Invoke::value, + (std::is_base_of>::value + ? 0 + : is_reference_wrapper>::value ? 1 : 2)>:: + invoke(f, std::forward(arg), std::forward(args)...)) + +#ifdef _MSC_VER +# pragma warning(push) +# pragma warning(disable : 4100) +#endif + template + inline constexpr auto invoke_impl(F &&f, Args &&... args) + OPENTELEMETRY_RETURN(std::forward(f)(std::forward(args)...)) +#ifdef _MSC_VER +# pragma warning(pop) +#endif +} // namespace detail + +/* clang-format off */ +template +inline constexpr auto invoke(F &&f, Args &&... args) + OPENTELEMETRY_RETURN(detail::invoke_impl(std::forward(f), std::forward(args)...)) + +namespace detail +/* clang-format on */ +{ + + template + struct invoke_result + {}; + + template + struct invoke_result(), std::declval()...))>, + F, Args...> + { + using type = decltype(nostd::invoke(std::declval(), std::declval()...)); + }; + +} // namespace detail + +template +using invoke_result = detail::invoke_result; + +template +using invoke_result_t = typename invoke_result::type; + +namespace detail +{ + +template +struct is_invocable : std::false_type +{}; + +template +struct is_invocable>, F, Args...> : std::true_type +{}; + +template +struct is_invocable_r : std::false_type +{}; + +template +struct is_invocable_r>, R, F, Args...> + : std::is_convertible, R> +{}; + +} // namespace detail + +template +using is_invocable = detail::is_invocable; + +template +using is_invocable_r = detail::is_invocable_r; +} // namespace nostd +OPENTELEMETRY_END_NAMESPACE + +#undef OPENTELEMETRY_RETURN diff --git a/jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/nostd/detail/trait.h b/jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/nostd/detail/trait.h new file mode 100644 index 000000000..90a568c4f --- /dev/null +++ b/jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/nostd/detail/trait.h @@ -0,0 +1,75 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +#pragma once + +#include + +#include "opentelemetry/nostd/type_traits.h" +#include "opentelemetry/version.h" + +OPENTELEMETRY_BEGIN_NAMESPACE +namespace nostd +{ +namespace detail +{ +enum class Trait +{ + TriviallyAvailable, + Available, + Unavailable +}; + +template + class IsTriviallyAvailable, + template + class IsAvailable> +inline constexpr Trait trait() +{ + return IsTriviallyAvailable::value + ? Trait::TriviallyAvailable + : IsAvailable::value ? Trait::Available : Trait::Unavailable; +} + +inline constexpr Trait common_trait_impl(Trait result) +{ + return result; +} + +template +inline constexpr Trait common_trait_impl(Trait result, Trait t, Traits... ts) +{ + return static_cast(t) > static_cast(result) ? common_trait_impl(t, ts...) + : common_trait_impl(result, ts...); +} + +template +inline constexpr Trait common_trait(Traits... ts) +{ + return common_trait_impl(Trait::TriviallyAvailable, ts...); +} + +template +struct traits +{ + static constexpr Trait copy_constructible_trait = + common_trait(trait()...); + + static constexpr Trait move_constructible_trait = + common_trait(trait()...); + + static constexpr Trait copy_assignable_trait = + common_trait(copy_constructible_trait, + trait()...); + + static constexpr Trait move_assignable_trait = + common_trait(move_constructible_trait, + trait()...); + + static constexpr Trait destructible_trait = + common_trait(trait()...); +}; +} // namespace detail +} // namespace nostd +OPENTELEMETRY_END_NAMESPACE diff --git a/jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/nostd/detail/type_pack_element.h b/jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/nostd/detail/type_pack_element.h new file mode 100644 index 000000000..280d24e94 --- /dev/null +++ b/jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/nostd/detail/type_pack_element.h @@ -0,0 +1,53 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +#pragma once + +#include +#include + +#include "opentelemetry/nostd/utility.h" +#include "opentelemetry/version.h" + +OPENTELEMETRY_BEGIN_NAMESPACE +namespace nostd +{ +namespace detail +{ +template +using size_constant = std::integral_constant; + +template +struct indexed_type : size_constant +{ + using type = T; +}; + +template +struct type_pack_element_impl +{ +private: + template + struct set; + + template + struct set> : indexed_type... + {}; + + template + inline static std::enable_if impl(indexed_type); + + inline static std::enable_if impl(...); + +public: + using type = decltype(impl(set>{})); +}; + +template +using type_pack_element = typename type_pack_element_impl::type; + +template +using type_pack_element_t = typename type_pack_element::type; +} // namespace detail +} // namespace nostd +OPENTELEMETRY_END_NAMESPACE diff --git a/jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/nostd/detail/valueless.h b/jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/nostd/detail/valueless.h new file mode 100644 index 000000000..3b2ca7f7c --- /dev/null +++ b/jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/nostd/detail/valueless.h @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +#pragma once + +#include "opentelemetry/version.h" + +OPENTELEMETRY_BEGIN_NAMESPACE +namespace nostd +{ +struct valueless_t +{}; +} // namespace nostd +OPENTELEMETRY_END_NAMESPACE diff --git a/jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/nostd/detail/variant_alternative.h b/jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/nostd/detail/variant_alternative.h new file mode 100644 index 000000000..cc0da9c8c --- /dev/null +++ b/jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/nostd/detail/variant_alternative.h @@ -0,0 +1,40 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +#pragma once + +#include + +#include "opentelemetry/nostd/detail/type_pack_element.h" +#include "opentelemetry/nostd/detail/variant_fwd.h" +#include "opentelemetry/version.h" + +OPENTELEMETRY_BEGIN_NAMESPACE +namespace nostd +{ +template +struct variant_alternative; + +template +using variant_alternative_t = typename variant_alternative::type; + +template +struct variant_alternative : std::add_const> +{}; + +template +struct variant_alternative : std::add_volatile> +{}; + +template +struct variant_alternative : std::add_cv> +{}; + +template +struct variant_alternative> +{ + static_assert(I < sizeof...(Ts), "index out of bounds in `std::variant_alternative<>`"); + using type = detail::type_pack_element_t; +}; +} // namespace nostd +OPENTELEMETRY_END_NAMESPACE diff --git a/jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/nostd/detail/variant_fwd.h b/jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/nostd/detail/variant_fwd.h new file mode 100644 index 000000000..6bae9659e --- /dev/null +++ b/jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/nostd/detail/variant_fwd.h @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +#pragma once + +#include "opentelemetry/version.h" + +OPENTELEMETRY_BEGIN_NAMESPACE +namespace nostd +{ +template +class variant; +} // namespace nostd +OPENTELEMETRY_END_NAMESPACE diff --git a/jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/nostd/detail/variant_size.h b/jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/nostd/detail/variant_size.h new file mode 100644 index 000000000..d8986a222 --- /dev/null +++ b/jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/nostd/detail/variant_size.h @@ -0,0 +1,33 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +#pragma once + +#include + +#include "opentelemetry/nostd/detail/variant_fwd.h" +#include "opentelemetry/version.h" + +OPENTELEMETRY_BEGIN_NAMESPACE +namespace nostd +{ +template +struct variant_size; + +template +struct variant_size : variant_size +{}; + +template +struct variant_size : variant_size +{}; + +template +struct variant_size : variant_size +{}; + +template +struct variant_size> : std::integral_constant +{}; +} // namespace nostd +OPENTELEMETRY_END_NAMESPACE diff --git a/jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/nostd/detail/void.h b/jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/nostd/detail/void.h new file mode 100644 index 000000000..1b4c3b4f7 --- /dev/null +++ b/jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/nostd/detail/void.h @@ -0,0 +1,28 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +#pragma once + +#include "opentelemetry/version.h" + +OPENTELEMETRY_BEGIN_NAMESPACE +namespace nostd +{ +namespace detail +{ +template +struct voider +{ + using type = void; +}; +} // namespace detail + +/** + * Back port of std::void_t + * + * Note: voider workaround is required for gcc-4.8 to make SFINAE work + */ +template +using void_t = typename detail::voider::type; +} // namespace nostd +OPENTELEMETRY_END_NAMESPACE diff --git a/jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/nostd/function_ref.h b/jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/nostd/function_ref.h new file mode 100644 index 000000000..edc200776 --- /dev/null +++ b/jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/nostd/function_ref.h @@ -0,0 +1,92 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +#pragma once + +#include +#include + +#include "opentelemetry/version.h" + +OPENTELEMETRY_BEGIN_NAMESPACE +namespace nostd +{ +template +class function_ref; + +/** + * Non-owning function reference that can be used as a more performant + * replacement for std::function when ownership sematics aren't needed. + * + * See http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2017/p0792r0.html + * + * Based off of https://stackoverflow.com/a/39087660/4447365 + */ +template +class function_ref +{ + void *callable_ = nullptr; + R (*invoker_)(void *, Args...) = nullptr; + + template + using FunctionPointer = decltype(std::addressof(std::declval())); + + template + void BindTo(F &f) noexcept + { + callable_ = static_cast(std::addressof(f)); + invoker_ = [](void *callable_, Args... args) -> R { + return (*static_cast>(callable_))(std::forward(args)...); + }; + } + + template + void BindTo(R_in (*f)(Args_in...)) noexcept + { + using F = decltype(f); + if (f == nullptr) + { + return BindTo(nullptr); + } + callable_ = reinterpret_cast(f); + invoker_ = [](void *callable_, Args... args) -> R { + return (F(callable_))(std::forward(args)...); + }; + } + + void BindTo(std::nullptr_t) noexcept + { + callable_ = nullptr; + invoker_ = nullptr; + } + +public: + template < + class F, + typename std::enable_if::type>::value, + int>::type = 0, + typename std::enable_if< +#if (__cplusplus >= 201703L) || (defined(_MSVC_LANG) && (_MSVC_LANG > 201402)) + // std::result_of deprecated in C++17, removed in C++20 + std::is_convertible::type, R>::value, +#else + // std::result_of since C++11 + std::is_convertible::type, R>::value, +#endif + int>::type = 0> + function_ref(F &&f) + { + BindTo(f); // not forward + } + + function_ref(std::nullptr_t) {} + + function_ref(const function_ref &) noexcept = default; + function_ref(function_ref &&) noexcept = default; + + R operator()(Args... args) const { return invoker_(callable_, std::forward(args)...); } + + explicit operator bool() const { return invoker_; } +}; +} // namespace nostd +OPENTELEMETRY_END_NAMESPACE diff --git a/jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/nostd/internal/absl/.clang-format b/jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/nostd/internal/absl/.clang-format new file mode 100644 index 000000000..001170f7e --- /dev/null +++ b/jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/nostd/internal/absl/.clang-format @@ -0,0 +1,3 @@ +# Disable formatting for Google Abseil library snapshot +DisableFormat: true +SortIncludes: false diff --git a/jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/nostd/internal/absl/README.md b/jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/nostd/internal/absl/README.md new file mode 100644 index 000000000..6a4085570 --- /dev/null +++ b/jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/nostd/internal/absl/README.md @@ -0,0 +1,4 @@ +# Notes on Abseil Variant implementation + +This is a snapshot of Abseil Variant `absl::variant` from Abseil +`v2020-03-03#8`. diff --git a/jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/nostd/internal/absl/base/attributes.h b/jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/nostd/internal/absl/base/attributes.h new file mode 100644 index 000000000..72901a84c --- /dev/null +++ b/jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/nostd/internal/absl/base/attributes.h @@ -0,0 +1,621 @@ +// Copyright 2017 The Abseil Authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// This header file defines macros for declaring attributes for functions, +// types, and variables. +// +// These macros are used within Abseil and allow the compiler to optimize, where +// applicable, certain function calls. +// +// This file is used for both C and C++! +// +// Most macros here are exposing GCC or Clang features, and are stubbed out for +// other compilers. +// +// GCC attributes documentation: +// https://gcc.gnu.org/onlinedocs/gcc-4.7.0/gcc/Function-Attributes.html +// https://gcc.gnu.org/onlinedocs/gcc-4.7.0/gcc/Variable-Attributes.html +// https://gcc.gnu.org/onlinedocs/gcc-4.7.0/gcc/Type-Attributes.html +// +// Most attributes in this file are already supported by GCC 4.7. However, some +// of them are not supported in older version of Clang. Thus, we check +// `__has_attribute()` first. If the check fails, we check if we are on GCC and +// assume the attribute exists on GCC (which is verified on GCC 4.7). +// +// ----------------------------------------------------------------------------- +// Sanitizer Attributes +// ----------------------------------------------------------------------------- +// +// Sanitizer-related attributes are not "defined" in this file (and indeed +// are not defined as such in any file). To utilize the following +// sanitizer-related attributes within your builds, define the following macros +// within your build using a `-D` flag, along with the given value for +// `-fsanitize`: +// +// * `ADDRESS_SANITIZER` + `-fsanitize=address` (Clang, GCC 4.8) +// * `MEMORY_SANITIZER` + `-fsanitize=memory` (Clang-only) +// * `THREAD_SANITIZER + `-fsanitize=thread` (Clang, GCC 4.8+) +// * `UNDEFINED_BEHAVIOR_SANITIZER` + `-fsanitize=undefined` (Clang, GCC 4.9+) +// * `CONTROL_FLOW_INTEGRITY` + -fsanitize=cfi (Clang-only) +// +// Example: +// +// // Enable branches in the Abseil code that are tagged for ASan: +// $ bazel build --copt=-DADDRESS_SANITIZER --copt=-fsanitize=address +// --linkopt=-fsanitize=address *target* +// +// Since these macro names are only supported by GCC and Clang, we only check +// for `__GNUC__` (GCC or Clang) and the above macros. +#ifndef OTABSL_BASE_ATTRIBUTES_H_ +#define OTABSL_BASE_ATTRIBUTES_H_ + +// OTABSL_HAVE_ATTRIBUTE +// +// A function-like feature checking macro that is a wrapper around +// `__has_attribute`, which is defined by GCC 5+ and Clang and evaluates to a +// nonzero constant integer if the attribute is supported or 0 if not. +// +// It evaluates to zero if `__has_attribute` is not defined by the compiler. +// +// GCC: https://gcc.gnu.org/gcc-5/changes.html +// Clang: https://clang.llvm.org/docs/LanguageExtensions.html +#ifdef __has_attribute +#define OTABSL_HAVE_ATTRIBUTE(x) __has_attribute(x) +#else +#define OTABSL_HAVE_ATTRIBUTE(x) 0 +#endif + +// OTABSL_HAVE_CPP_ATTRIBUTE +// +// A function-like feature checking macro that accepts C++11 style attributes. +// It's a wrapper around `__has_cpp_attribute`, defined by ISO C++ SD-6 +// (https://en.cppreference.com/w/cpp/experimental/feature_test). If we don't +// find `__has_cpp_attribute`, will evaluate to 0. +#if defined(__cplusplus) && defined(__has_cpp_attribute) +// NOTE: requiring __cplusplus above should not be necessary, but +// works around https://bugs.llvm.org/show_bug.cgi?id=23435. +#define OTABSL_HAVE_CPP_ATTRIBUTE(x) __has_cpp_attribute(x) +#else +#define OTABSL_HAVE_CPP_ATTRIBUTE(x) 0 +#endif + +// ----------------------------------------------------------------------------- +// Function Attributes +// ----------------------------------------------------------------------------- +// +// GCC: https://gcc.gnu.org/onlinedocs/gcc/Function-Attributes.html +// Clang: https://clang.llvm.org/docs/AttributeReference.html + +// OTABSL_PRINTF_ATTRIBUTE +// OTABSL_SCANF_ATTRIBUTE +// +// Tells the compiler to perform `printf` format string checking if the +// compiler supports it; see the 'format' attribute in +// . +// +// Note: As the GCC manual states, "[s]ince non-static C++ methods +// have an implicit 'this' argument, the arguments of such methods +// should be counted from two, not one." +#if OTABSL_HAVE_ATTRIBUTE(format) || (defined(__GNUC__) && !defined(__clang__)) +#define OTABSL_PRINTF_ATTRIBUTE(string_index, first_to_check) \ + __attribute__((__format__(__printf__, string_index, first_to_check))) +#define OTABSL_SCANF_ATTRIBUTE(string_index, first_to_check) \ + __attribute__((__format__(__scanf__, string_index, first_to_check))) +#else +#define OTABSL_PRINTF_ATTRIBUTE(string_index, first_to_check) +#define OTABSL_SCANF_ATTRIBUTE(string_index, first_to_check) +#endif + +// OTABSL_ATTRIBUTE_ALWAYS_INLINE +// OTABSL_ATTRIBUTE_NOINLINE +// +// Forces functions to either inline or not inline. Introduced in gcc 3.1. +#if OTABSL_HAVE_ATTRIBUTE(always_inline) || \ + (defined(__GNUC__) && !defined(__clang__)) +#define OTABSL_ATTRIBUTE_ALWAYS_INLINE __attribute__((always_inline)) +#define OTABSL_HAVE_ATTRIBUTE_ALWAYS_INLINE 1 +#else +#define OTABSL_ATTRIBUTE_ALWAYS_INLINE +#endif + +#if OTABSL_HAVE_ATTRIBUTE(noinline) || (defined(__GNUC__) && !defined(__clang__)) +#define OTABSL_ATTRIBUTE_NOINLINE __attribute__((noinline)) +#define OTABSL_HAVE_ATTRIBUTE_NOINLINE 1 +#else +#define OTABSL_ATTRIBUTE_NOINLINE +#endif + +// OTABSL_ATTRIBUTE_NO_TAIL_CALL +// +// Prevents the compiler from optimizing away stack frames for functions which +// end in a call to another function. +#if OTABSL_HAVE_ATTRIBUTE(disable_tail_calls) +#define OTABSL_HAVE_ATTRIBUTE_NO_TAIL_CALL 1 +#define OTABSL_ATTRIBUTE_NO_TAIL_CALL __attribute__((disable_tail_calls)) +#elif defined(__GNUC__) && !defined(__clang__) +#define OTABSL_HAVE_ATTRIBUTE_NO_TAIL_CALL 1 +#define OTABSL_ATTRIBUTE_NO_TAIL_CALL \ + __attribute__((optimize("no-optimize-sibling-calls"))) +#else +#define OTABSL_ATTRIBUTE_NO_TAIL_CALL +#define OTABSL_HAVE_ATTRIBUTE_NO_TAIL_CALL 0 +#endif + +// OTABSL_ATTRIBUTE_WEAK +// +// Tags a function as weak for the purposes of compilation and linking. +// Weak attributes currently do not work properly in LLVM's Windows backend, +// so disable them there. See https://bugs.llvm.org/show_bug.cgi?id=37598 +// for further information. +// The MinGW compiler doesn't complain about the weak attribute until the link +// step, presumably because Windows doesn't use ELF binaries. +#if (OTABSL_HAVE_ATTRIBUTE(weak) || \ + (defined(__GNUC__) && !defined(__clang__))) && \ + !(defined(__llvm__) && defined(_WIN32)) && !defined(__MINGW32__) +#undef OTABSL_ATTRIBUTE_WEAK +#define OTABSL_ATTRIBUTE_WEAK __attribute__((weak)) +#define OTABSL_HAVE_ATTRIBUTE_WEAK 1 +#else +#define OTABSL_ATTRIBUTE_WEAK +#define OTABSL_HAVE_ATTRIBUTE_WEAK 0 +#endif + +// OTABSL_ATTRIBUTE_NONNULL +// +// Tells the compiler either (a) that a particular function parameter +// should be a non-null pointer, or (b) that all pointer arguments should +// be non-null. +// +// Note: As the GCC manual states, "[s]ince non-static C++ methods +// have an implicit 'this' argument, the arguments of such methods +// should be counted from two, not one." +// +// Args are indexed starting at 1. +// +// For non-static class member functions, the implicit `this` argument +// is arg 1, and the first explicit argument is arg 2. For static class member +// functions, there is no implicit `this`, and the first explicit argument is +// arg 1. +// +// Example: +// +// /* arg_a cannot be null, but arg_b can */ +// void Function(void* arg_a, void* arg_b) OTABSL_ATTRIBUTE_NONNULL(1); +// +// class C { +// /* arg_a cannot be null, but arg_b can */ +// void Method(void* arg_a, void* arg_b) OTABSL_ATTRIBUTE_NONNULL(2); +// +// /* arg_a cannot be null, but arg_b can */ +// static void StaticMethod(void* arg_a, void* arg_b) +// OTABSL_ATTRIBUTE_NONNULL(1); +// }; +// +// If no arguments are provided, then all pointer arguments should be non-null. +// +// /* No pointer arguments may be null. */ +// void Function(void* arg_a, void* arg_b, int arg_c) OTABSL_ATTRIBUTE_NONNULL(); +// +// NOTE: The GCC nonnull attribute actually accepts a list of arguments, but +// OTABSL_ATTRIBUTE_NONNULL does not. +#if OTABSL_HAVE_ATTRIBUTE(nonnull) || (defined(__GNUC__) && !defined(__clang__)) +#define OTABSL_ATTRIBUTE_NONNULL(arg_index) __attribute__((nonnull(arg_index))) +#else +#define OTABSL_ATTRIBUTE_NONNULL(...) +#endif + +// OTABSL_ATTRIBUTE_NORETURN +// +// Tells the compiler that a given function never returns. +#if OTABSL_HAVE_ATTRIBUTE(noreturn) || (defined(__GNUC__) && !defined(__clang__)) +#define OTABSL_ATTRIBUTE_NORETURN __attribute__((noreturn)) +#elif defined(_MSC_VER) +#define OTABSL_ATTRIBUTE_NORETURN __declspec(noreturn) +#else +#define OTABSL_ATTRIBUTE_NORETURN +#endif + +// OTABSL_ATTRIBUTE_NO_SANITIZE_ADDRESS +// +// Tells the AddressSanitizer (or other memory testing tools) to ignore a given +// function. Useful for cases when a function reads random locations on stack, +// calls _exit from a cloned subprocess, deliberately accesses buffer +// out of bounds or does other scary things with memory. +// NOTE: GCC supports AddressSanitizer(asan) since 4.8. +// https://gcc.gnu.org/gcc-4.8/changes.html +#if defined(__GNUC__) +#define OTABSL_ATTRIBUTE_NO_SANITIZE_ADDRESS __attribute__((no_sanitize_address)) +#else +#define OTABSL_ATTRIBUTE_NO_SANITIZE_ADDRESS +#endif + +// OTABSL_ATTRIBUTE_NO_SANITIZE_MEMORY +// +// Tells the MemorySanitizer to relax the handling of a given function. All +// "Use of uninitialized value" warnings from such functions will be suppressed, +// and all values loaded from memory will be considered fully initialized. +// This attribute is similar to the ADDRESS_SANITIZER attribute above, but deals +// with initialized-ness rather than addressability issues. +// NOTE: MemorySanitizer(msan) is supported by Clang but not GCC. +#if defined(__clang__) +#define OTABSL_ATTRIBUTE_NO_SANITIZE_MEMORY __attribute__((no_sanitize_memory)) +#else +#define OTABSL_ATTRIBUTE_NO_SANITIZE_MEMORY +#endif + +// OTABSL_ATTRIBUTE_NO_SANITIZE_THREAD +// +// Tells the ThreadSanitizer to not instrument a given function. +// NOTE: GCC supports ThreadSanitizer(tsan) since 4.8. +// https://gcc.gnu.org/gcc-4.8/changes.html +#if defined(__GNUC__) +#define OTABSL_ATTRIBUTE_NO_SANITIZE_THREAD __attribute__((no_sanitize_thread)) +#else +#define OTABSL_ATTRIBUTE_NO_SANITIZE_THREAD +#endif + +// OTABSL_ATTRIBUTE_NO_SANITIZE_UNDEFINED +// +// Tells the UndefinedSanitizer to ignore a given function. Useful for cases +// where certain behavior (eg. division by zero) is being used intentionally. +// NOTE: GCC supports UndefinedBehaviorSanitizer(ubsan) since 4.9. +// https://gcc.gnu.org/gcc-4.9/changes.html +#if defined(__GNUC__) && \ + (defined(UNDEFINED_BEHAVIOR_SANITIZER) || defined(ADDRESS_SANITIZER)) +#define OTABSL_ATTRIBUTE_NO_SANITIZE_UNDEFINED \ + __attribute__((no_sanitize("undefined"))) +#else +#define OTABSL_ATTRIBUTE_NO_SANITIZE_UNDEFINED +#endif + +// OTABSL_ATTRIBUTE_NO_SANITIZE_CFI +// +// Tells the ControlFlowIntegrity sanitizer to not instrument a given function. +// See https://clang.llvm.org/docs/ControlFlowIntegrity.html for details. +#if defined(__GNUC__) && defined(CONTROL_FLOW_INTEGRITY) +#define OTABSL_ATTRIBUTE_NO_SANITIZE_CFI __attribute__((no_sanitize("cfi"))) +#else +#define OTABSL_ATTRIBUTE_NO_SANITIZE_CFI +#endif + +// OTABSL_ATTRIBUTE_NO_SANITIZE_SAFESTACK +// +// Tells the SafeStack to not instrument a given function. +// See https://clang.llvm.org/docs/SafeStack.html for details. +#if defined(__GNUC__) && defined(SAFESTACK_SANITIZER) +#define OTABSL_ATTRIBUTE_NO_SANITIZE_SAFESTACK \ + __attribute__((no_sanitize("safe-stack"))) +#else +#define OTABSL_ATTRIBUTE_NO_SANITIZE_SAFESTACK +#endif + +// OTABSL_ATTRIBUTE_RETURNS_NONNULL +// +// Tells the compiler that a particular function never returns a null pointer. +#if OTABSL_HAVE_ATTRIBUTE(returns_nonnull) || \ + (defined(__GNUC__) && \ + (__GNUC__ > 5 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 9)) && \ + !defined(__clang__)) +#define OTABSL_ATTRIBUTE_RETURNS_NONNULL __attribute__((returns_nonnull)) +#else +#define OTABSL_ATTRIBUTE_RETURNS_NONNULL +#endif + +// OTABSL_HAVE_ATTRIBUTE_SECTION +// +// Indicates whether labeled sections are supported. Weak symbol support is +// a prerequisite. Labeled sections are not supported on Darwin/iOS. +#ifdef OTABSL_HAVE_ATTRIBUTE_SECTION +#error OTABSL_HAVE_ATTRIBUTE_SECTION cannot be directly set +#elif (OTABSL_HAVE_ATTRIBUTE(section) || \ + (defined(__GNUC__) && !defined(__clang__))) && \ + !defined(__APPLE__) && OTABSL_HAVE_ATTRIBUTE_WEAK +#define OTABSL_HAVE_ATTRIBUTE_SECTION 1 + +// OTABSL_ATTRIBUTE_SECTION +// +// Tells the compiler/linker to put a given function into a section and define +// `__start_ ## name` and `__stop_ ## name` symbols to bracket the section. +// This functionality is supported by GNU linker. Any function annotated with +// `OTABSL_ATTRIBUTE_SECTION` must not be inlined, or it will be placed into +// whatever section its caller is placed into. +// +#ifndef OTABSL_ATTRIBUTE_SECTION +#define OTABSL_ATTRIBUTE_SECTION(name) \ + __attribute__((section(#name))) __attribute__((noinline)) +#endif + + +// OTABSL_ATTRIBUTE_SECTION_VARIABLE +// +// Tells the compiler/linker to put a given variable into a section and define +// `__start_ ## name` and `__stop_ ## name` symbols to bracket the section. +// This functionality is supported by GNU linker. +#ifndef OTABSL_ATTRIBUTE_SECTION_VARIABLE +#define OTABSL_ATTRIBUTE_SECTION_VARIABLE(name) __attribute__((section(#name))) +#endif + +// OTABSL_DECLARE_ATTRIBUTE_SECTION_VARS +// +// A weak section declaration to be used as a global declaration +// for OTABSL_ATTRIBUTE_SECTION_START|STOP(name) to compile and link +// even without functions with OTABSL_ATTRIBUTE_SECTION(name). +// OTABSL_DEFINE_ATTRIBUTE_SECTION should be in the exactly one file; it's +// a no-op on ELF but not on Mach-O. +// +#ifndef OTABSL_DECLARE_ATTRIBUTE_SECTION_VARS +#define OTABSL_DECLARE_ATTRIBUTE_SECTION_VARS(name) \ + extern char __start_##name[] OTABSL_ATTRIBUTE_WEAK; \ + extern char __stop_##name[] OTABSL_ATTRIBUTE_WEAK +#endif +#ifndef OTABSL_DEFINE_ATTRIBUTE_SECTION_VARS +#define OTABSL_INIT_ATTRIBUTE_SECTION_VARS(name) +#define OTABSL_DEFINE_ATTRIBUTE_SECTION_VARS(name) +#endif + +// OTABSL_ATTRIBUTE_SECTION_START +// +// Returns `void*` pointers to start/end of a section of code with +// functions having OTABSL_ATTRIBUTE_SECTION(name). +// Returns 0 if no such functions exist. +// One must OTABSL_DECLARE_ATTRIBUTE_SECTION_VARS(name) for this to compile and +// link. +// +#define OTABSL_ATTRIBUTE_SECTION_START(name) \ + (reinterpret_cast(__start_##name)) +#define OTABSL_ATTRIBUTE_SECTION_STOP(name) \ + (reinterpret_cast(__stop_##name)) + +#else // !OTABSL_HAVE_ATTRIBUTE_SECTION + +#define OTABSL_HAVE_ATTRIBUTE_SECTION 0 + +// provide dummy definitions +#define OTABSL_ATTRIBUTE_SECTION(name) +#define OTABSL_ATTRIBUTE_SECTION_VARIABLE(name) +#define OTABSL_INIT_ATTRIBUTE_SECTION_VARS(name) +#define OTABSL_DEFINE_ATTRIBUTE_SECTION_VARS(name) +#define OTABSL_DECLARE_ATTRIBUTE_SECTION_VARS(name) +#define OTABSL_ATTRIBUTE_SECTION_START(name) (reinterpret_cast(0)) +#define OTABSL_ATTRIBUTE_SECTION_STOP(name) (reinterpret_cast(0)) + +#endif // OTABSL_ATTRIBUTE_SECTION + +// OTABSL_ATTRIBUTE_STACK_ALIGN_FOR_OLD_LIBC +// +// Support for aligning the stack on 32-bit x86. +#if OTABSL_HAVE_ATTRIBUTE(force_align_arg_pointer) || \ + (defined(__GNUC__) && !defined(__clang__)) +#if defined(__i386__) +#define OTABSL_ATTRIBUTE_STACK_ALIGN_FOR_OLD_LIBC \ + __attribute__((force_align_arg_pointer)) +#define OTABSL_REQUIRE_STACK_ALIGN_TRAMPOLINE (0) +#elif defined(__x86_64__) +#define OTABSL_REQUIRE_STACK_ALIGN_TRAMPOLINE (1) +#define OTABSL_ATTRIBUTE_STACK_ALIGN_FOR_OLD_LIBC +#else // !__i386__ && !__x86_64 +#define OTABSL_REQUIRE_STACK_ALIGN_TRAMPOLINE (0) +#define OTABSL_ATTRIBUTE_STACK_ALIGN_FOR_OLD_LIBC +#endif // __i386__ +#else +#define OTABSL_ATTRIBUTE_STACK_ALIGN_FOR_OLD_LIBC +#define OTABSL_REQUIRE_STACK_ALIGN_TRAMPOLINE (0) +#endif + +// OTABSL_MUST_USE_RESULT +// +// Tells the compiler to warn about unused results. +// +// When annotating a function, it must appear as the first part of the +// declaration or definition. The compiler will warn if the return value from +// such a function is unused: +// +// OTABSL_MUST_USE_RESULT Sprocket* AllocateSprocket(); +// AllocateSprocket(); // Triggers a warning. +// +// When annotating a class, it is equivalent to annotating every function which +// returns an instance. +// +// class OTABSL_MUST_USE_RESULT Sprocket {}; +// Sprocket(); // Triggers a warning. +// +// Sprocket MakeSprocket(); +// MakeSprocket(); // Triggers a warning. +// +// Note that references and pointers are not instances: +// +// Sprocket* SprocketPointer(); +// SprocketPointer(); // Does *not* trigger a warning. +// +// OTABSL_MUST_USE_RESULT allows using cast-to-void to suppress the unused result +// warning. For that, warn_unused_result is used only for clang but not for gcc. +// https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66425 +// +// Note: past advice was to place the macro after the argument list. +#if OTABSL_HAVE_ATTRIBUTE(nodiscard) +#define OTABSL_MUST_USE_RESULT [[nodiscard]] +#elif defined(__clang__) && OTABSL_HAVE_ATTRIBUTE(warn_unused_result) +#define OTABSL_MUST_USE_RESULT __attribute__((warn_unused_result)) +#else +#define OTABSL_MUST_USE_RESULT +#endif + +// OTABSL_ATTRIBUTE_HOT, OTABSL_ATTRIBUTE_COLD +// +// Tells GCC that a function is hot or cold. GCC can use this information to +// improve static analysis, i.e. a conditional branch to a cold function +// is likely to be not-taken. +// This annotation is used for function declarations. +// +// Example: +// +// int foo() OTABSL_ATTRIBUTE_HOT; +#if OTABSL_HAVE_ATTRIBUTE(hot) || (defined(__GNUC__) && !defined(__clang__)) +#define OTABSL_ATTRIBUTE_HOT __attribute__((hot)) +#else +#define OTABSL_ATTRIBUTE_HOT +#endif + +#if OTABSL_HAVE_ATTRIBUTE(cold) || (defined(__GNUC__) && !defined(__clang__)) +#define OTABSL_ATTRIBUTE_COLD __attribute__((cold)) +#else +#define OTABSL_ATTRIBUTE_COLD +#endif + +// OTABSL_XRAY_ALWAYS_INSTRUMENT, OTABSL_XRAY_NEVER_INSTRUMENT, OTABSL_XRAY_LOG_ARGS +// +// We define the OTABSL_XRAY_ALWAYS_INSTRUMENT and OTABSL_XRAY_NEVER_INSTRUMENT +// macro used as an attribute to mark functions that must always or never be +// instrumented by XRay. Currently, this is only supported in Clang/LLVM. +// +// For reference on the LLVM XRay instrumentation, see +// http://llvm.org/docs/XRay.html. +// +// A function with the XRAY_ALWAYS_INSTRUMENT macro attribute in its declaration +// will always get the XRay instrumentation sleds. These sleds may introduce +// some binary size and runtime overhead and must be used sparingly. +// +// These attributes only take effect when the following conditions are met: +// +// * The file/target is built in at least C++11 mode, with a Clang compiler +// that supports XRay attributes. +// * The file/target is built with the -fxray-instrument flag set for the +// Clang/LLVM compiler. +// * The function is defined in the translation unit (the compiler honors the +// attribute in either the definition or the declaration, and must match). +// +// There are cases when, even when building with XRay instrumentation, users +// might want to control specifically which functions are instrumented for a +// particular build using special-case lists provided to the compiler. These +// special case lists are provided to Clang via the +// -fxray-always-instrument=... and -fxray-never-instrument=... flags. The +// attributes in source take precedence over these special-case lists. +// +// To disable the XRay attributes at build-time, users may define +// OTABSL_NO_XRAY_ATTRIBUTES. Do NOT define OTABSL_NO_XRAY_ATTRIBUTES on specific +// packages/targets, as this may lead to conflicting definitions of functions at +// link-time. +// +#if OTABSL_HAVE_CPP_ATTRIBUTE(clang::xray_always_instrument) && \ + !defined(OTABSL_NO_XRAY_ATTRIBUTES) +#define OTABSL_XRAY_ALWAYS_INSTRUMENT [[clang::xray_always_instrument]] +#define OTABSL_XRAY_NEVER_INSTRUMENT [[clang::xray_never_instrument]] +#if OTABSL_HAVE_CPP_ATTRIBUTE(clang::xray_log_args) +#define OTABSL_XRAY_LOG_ARGS(N) \ + [[clang::xray_always_instrument, clang::xray_log_args(N)]] +#else +#define OTABSL_XRAY_LOG_ARGS(N) [[clang::xray_always_instrument]] +#endif +#else +#define OTABSL_XRAY_ALWAYS_INSTRUMENT +#define OTABSL_XRAY_NEVER_INSTRUMENT +#define OTABSL_XRAY_LOG_ARGS(N) +#endif + +// OTABSL_ATTRIBUTE_REINITIALIZES +// +// Indicates that a member function reinitializes the entire object to a known +// state, independent of the previous state of the object. +// +// The clang-tidy check bugprone-use-after-move allows member functions marked +// with this attribute to be called on objects that have been moved from; +// without the attribute, this would result in a use-after-move warning. +#if OTABSL_HAVE_CPP_ATTRIBUTE(clang::reinitializes) +#define OTABSL_ATTRIBUTE_REINITIALIZES [[clang::reinitializes]] +#else +#define OTABSL_ATTRIBUTE_REINITIALIZES +#endif + +// ----------------------------------------------------------------------------- +// Variable Attributes +// ----------------------------------------------------------------------------- + +// OTABSL_ATTRIBUTE_UNUSED +// +// Prevents the compiler from complaining about variables that appear unused. +#if OTABSL_HAVE_ATTRIBUTE(unused) || (defined(__GNUC__) && !defined(__clang__)) +#undef OTABSL_ATTRIBUTE_UNUSED +#define OTABSL_ATTRIBUTE_UNUSED __attribute__((__unused__)) +#else +#define OTABSL_ATTRIBUTE_UNUSED +#endif + +// OTABSL_ATTRIBUTE_INITIAL_EXEC +// +// Tells the compiler to use "initial-exec" mode for a thread-local variable. +// See http://people.redhat.com/drepper/tls.pdf for the gory details. +#if OTABSL_HAVE_ATTRIBUTE(tls_model) || (defined(__GNUC__) && !defined(__clang__)) +#define OTABSL_ATTRIBUTE_INITIAL_EXEC __attribute__((tls_model("initial-exec"))) +#else +#define OTABSL_ATTRIBUTE_INITIAL_EXEC +#endif + +// OTABSL_ATTRIBUTE_PACKED +// +// Instructs the compiler not to use natural alignment for a tagged data +// structure, but instead to reduce its alignment to 1. This attribute can +// either be applied to members of a structure or to a structure in its +// entirety. Applying this attribute (judiciously) to a structure in its +// entirety to optimize the memory footprint of very commonly-used structs is +// fine. Do not apply this attribute to a structure in its entirety if the +// purpose is to control the offsets of the members in the structure. Instead, +// apply this attribute only to structure members that need it. +// +// When applying OTABSL_ATTRIBUTE_PACKED only to specific structure members the +// natural alignment of structure members not annotated is preserved. Aligned +// member accesses are faster than non-aligned member accesses even if the +// targeted microprocessor supports non-aligned accesses. +#if OTABSL_HAVE_ATTRIBUTE(packed) || (defined(__GNUC__) && !defined(__clang__)) +#define OTABSL_ATTRIBUTE_PACKED __attribute__((__packed__)) +#else +#define OTABSL_ATTRIBUTE_PACKED +#endif + +// OTABSL_ATTRIBUTE_FUNC_ALIGN +// +// Tells the compiler to align the function start at least to certain +// alignment boundary +#if OTABSL_HAVE_ATTRIBUTE(aligned) || (defined(__GNUC__) && !defined(__clang__)) +#define OTABSL_ATTRIBUTE_FUNC_ALIGN(bytes) __attribute__((aligned(bytes))) +#else +#define OTABSL_ATTRIBUTE_FUNC_ALIGN(bytes) +#endif + +// OTABSL_CONST_INIT +// +// A variable declaration annotated with the `OTABSL_CONST_INIT` attribute will +// not compile (on supported platforms) unless the variable has a constant +// initializer. This is useful for variables with static and thread storage +// duration, because it guarantees that they will not suffer from the so-called +// "static init order fiasco". Prefer to put this attribute on the most visible +// declaration of the variable, if there's more than one, because code that +// accesses the variable can then use the attribute for optimization. +// +// Example: +// +// class MyClass { +// public: +// OTABSL_CONST_INIT static MyType my_var; +// }; +// +// MyType MyClass::my_var = MakeMyType(...); +// +// Note that this attribute is redundant if the variable is declared constexpr. +#if OTABSL_HAVE_CPP_ATTRIBUTE(clang::require_constant_initialization) +#define OTABSL_CONST_INIT [[clang::require_constant_initialization]] +#else +#define OTABSL_CONST_INIT +#endif // OTABSL_HAVE_CPP_ATTRIBUTE(clang::require_constant_initialization) + +#endif // OTABSL_BASE_ATTRIBUTES_H_ diff --git a/jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/nostd/internal/absl/base/config.h b/jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/nostd/internal/absl/base/config.h new file mode 100644 index 000000000..5eaeb4636 --- /dev/null +++ b/jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/nostd/internal/absl/base/config.h @@ -0,0 +1,671 @@ +// +// Copyright 2017 The Abseil Authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ----------------------------------------------------------------------------- +// File: config.h +// ----------------------------------------------------------------------------- +// +// This header file defines a set of macros for checking the presence of +// important compiler and platform features. Such macros can be used to +// produce portable code by parameterizing compilation based on the presence or +// lack of a given feature. +// +// We define a "feature" as some interface we wish to program to: for example, +// a library function or system call. A value of `1` indicates support for +// that feature; any other value indicates the feature support is undefined. +// +// Example: +// +// Suppose a programmer wants to write a program that uses the 'mmap()' system +// call. The Abseil macro for that feature (`OTABSL_HAVE_MMAP`) allows you to +// selectively include the `mmap.h` header and bracket code using that feature +// in the macro: +// +// #include "absl/base/config.h" +// +// #ifdef OTABSL_HAVE_MMAP +// #include "sys/mman.h" +// #endif //OTABSL_HAVE_MMAP +// +// ... +// #ifdef OTABSL_HAVE_MMAP +// void *ptr = mmap(...); +// ... +// #endif // OTABSL_HAVE_MMAP + +#ifndef OTABSL_BASE_CONFIG_H_ +#define OTABSL_BASE_CONFIG_H_ + +// Included for the __GLIBC__ macro (or similar macros on other systems). +#include + +#ifdef __cplusplus +// Included for __GLIBCXX__, _LIBCPP_VERSION +#include +#endif // __cplusplus + +#if defined(__APPLE__) +// Included for TARGET_OS_IPHONE, __IPHONE_OS_VERSION_MIN_REQUIRED, +// __IPHONE_8_0. +#include +#include +#endif + +#include "options.h" +#include "policy_checks.h" + +// Helper macro to convert a CPP variable to a string literal. +#define OTABSL_INTERNAL_DO_TOKEN_STR(x) #x +#define OTABSL_INTERNAL_TOKEN_STR(x) OTABSL_INTERNAL_DO_TOKEN_STR(x) + +// ----------------------------------------------------------------------------- +// Abseil namespace annotations +// ----------------------------------------------------------------------------- + +// OTABSL_NAMESPACE_BEGIN/OTABSL_NAMESPACE_END +// +// An annotation placed at the beginning/end of each `namespace absl` scope. +// This is used to inject an inline namespace. +// +// The proper way to write Abseil code in the `absl` namespace is: +// +// namespace absl { +// OTABSL_NAMESPACE_BEGIN +// +// void Foo(); // absl::Foo(). +// +// OTABSL_NAMESPACE_END +// } // namespace absl +// +// Users of Abseil should not use these macros, because users of Abseil should +// not write `namespace absl {` in their own code for any reason. (Abseil does +// not support forward declarations of its own types, nor does it support +// user-provided specialization of Abseil templates. Code that violates these +// rules may be broken without warning.) +#if !defined(OTABSL_OPTION_USE_INLINE_NAMESPACE) || \ + !defined(OTABSL_OPTION_INLINE_NAMESPACE_NAME) +#error options.h is misconfigured. +#endif + +// Check that OTABSL_OPTION_INLINE_NAMESPACE_NAME is neither "head" nor "" +#if defined(__cplusplus) && OTABSL_OPTION_USE_INLINE_NAMESPACE == 1 + +#define OTABSL_INTERNAL_INLINE_NAMESPACE_STR \ + OTABSL_INTERNAL_TOKEN_STR(OTABSL_OPTION_INLINE_NAMESPACE_NAME) + +static_assert(OTABSL_INTERNAL_INLINE_NAMESPACE_STR[0] != '\0', + "options.h misconfigured: OTABSL_OPTION_INLINE_NAMESPACE_NAME must " + "not be empty."); +static_assert(OTABSL_INTERNAL_INLINE_NAMESPACE_STR[0] != 'h' || + OTABSL_INTERNAL_INLINE_NAMESPACE_STR[1] != 'e' || + OTABSL_INTERNAL_INLINE_NAMESPACE_STR[2] != 'a' || + OTABSL_INTERNAL_INLINE_NAMESPACE_STR[3] != 'd' || + OTABSL_INTERNAL_INLINE_NAMESPACE_STR[4] != '\0', + "options.h misconfigured: OTABSL_OPTION_INLINE_NAMESPACE_NAME must " + "be changed to a new, unique identifier name."); + +#endif + +#if OTABSL_OPTION_USE_INLINE_NAMESPACE == 0 +#define OTABSL_NAMESPACE_BEGIN +#define OTABSL_NAMESPACE_END +#elif OTABSL_OPTION_USE_INLINE_NAMESPACE == 1 +#define OTABSL_NAMESPACE_BEGIN \ + inline namespace OTABSL_OPTION_INLINE_NAMESPACE_NAME { +#define OTABSL_NAMESPACE_END } +#else +#error options.h is misconfigured. +#endif + +// ----------------------------------------------------------------------------- +// Compiler Feature Checks +// ----------------------------------------------------------------------------- + +// OTABSL_HAVE_BUILTIN() +// +// Checks whether the compiler supports a Clang Feature Checking Macro, and if +// so, checks whether it supports the provided builtin function "x" where x +// is one of the functions noted in +// https://clang.llvm.org/docs/LanguageExtensions.html +// +// Note: Use this macro to avoid an extra level of #ifdef __has_builtin check. +// http://releases.llvm.org/3.3/tools/clang/docs/LanguageExtensions.html +#ifdef __has_builtin +#define OTABSL_HAVE_BUILTIN(x) __has_builtin(x) +#else +#define OTABSL_HAVE_BUILTIN(x) 0 +#endif + +#if defined(__is_identifier) +#define OTABSL_INTERNAL_HAS_KEYWORD(x) !(__is_identifier(x)) +#else +#define OTABSL_INTERNAL_HAS_KEYWORD(x) 0 +#endif + +// OTABSL_HAVE_TLS is defined to 1 when __thread should be supported. +// We assume __thread is supported on Linux when compiled with Clang or compiled +// against libstdc++ with _GLIBCXX_HAVE_TLS defined. +#ifdef OTABSL_HAVE_TLS +#error OTABSL_HAVE_TLS cannot be directly set +#elif defined(__linux__) && (defined(__clang__) || defined(_GLIBCXX_HAVE_TLS)) +#define OTABSL_HAVE_TLS 1 +#endif + +// OTABSL_HAVE_STD_IS_TRIVIALLY_DESTRUCTIBLE +// +// Checks whether `std::is_trivially_destructible` is supported. +// +// Notes: All supported compilers using libc++ support this feature, as does +// gcc >= 4.8.1 using libstdc++, and Visual Studio. +#ifdef OTABSL_HAVE_STD_IS_TRIVIALLY_DESTRUCTIBLE +#error OTABSL_HAVE_STD_IS_TRIVIALLY_DESTRUCTIBLE cannot be directly set +#elif defined(_LIBCPP_VERSION) || \ + (!defined(__clang__) && defined(__GNUC__) && defined(__GLIBCXX__) && \ + (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 8))) || \ + defined(_MSC_VER) +#define OTABSL_HAVE_STD_IS_TRIVIALLY_DESTRUCTIBLE 1 +#endif + +// OTABSL_HAVE_STD_IS_TRIVIALLY_CONSTRUCTIBLE +// +// Checks whether `std::is_trivially_default_constructible` and +// `std::is_trivially_copy_constructible` are supported. + +// OTABSL_HAVE_STD_IS_TRIVIALLY_ASSIGNABLE +// +// Checks whether `std::is_trivially_copy_assignable` is supported. + +// Notes: Clang with libc++ supports these features, as does gcc >= 5.1 with +// either libc++ or libstdc++, and Visual Studio (but not NVCC). +#if defined(OTABSL_HAVE_STD_IS_TRIVIALLY_CONSTRUCTIBLE) +#error OTABSL_HAVE_STD_IS_TRIVIALLY_CONSTRUCTIBLE cannot be directly set +#elif defined(OTABSL_HAVE_STD_IS_TRIVIALLY_ASSIGNABLE) +#error OTABSL_HAVE_STD_IS_TRIVIALLY_ASSIGNABLE cannot directly set +#elif (defined(__clang__) && defined(_LIBCPP_VERSION)) || \ + (!defined(__clang__) && defined(__GNUC__) && \ + (__GNUC__ > 7 || (__GNUC__ == 7 && __GNUC_MINOR__ >= 4)) && \ + (defined(_LIBCPP_VERSION) || defined(__GLIBCXX__))) || \ + (defined(_MSC_VER) && !defined(__NVCC__)) +#define OTABSL_HAVE_STD_IS_TRIVIALLY_CONSTRUCTIBLE 1 +#define OTABSL_HAVE_STD_IS_TRIVIALLY_ASSIGNABLE 1 +#endif + +// OTABSL_HAVE_SOURCE_LOCATION_CURRENT +// +// Indicates whether `absl::SourceLocation::current()` will return useful +// information in some contexts. +#ifndef OTABSL_HAVE_SOURCE_LOCATION_CURRENT +#if OTABSL_INTERNAL_HAS_KEYWORD(__builtin_LINE) && \ + OTABSL_INTERNAL_HAS_KEYWORD(__builtin_FILE) +#define OTABSL_HAVE_SOURCE_LOCATION_CURRENT 1 +#endif +#endif + +// OTABSL_HAVE_THREAD_LOCAL +// +// Checks whether C++11's `thread_local` storage duration specifier is +// supported. +#ifdef OTABSL_HAVE_THREAD_LOCAL +#error OTABSL_HAVE_THREAD_LOCAL cannot be directly set +#elif defined(__APPLE__) +// Notes: +// * Xcode's clang did not support `thread_local` until version 8, and +// even then not for all iOS < 9.0. +// * Xcode 9.3 started disallowing `thread_local` for 32-bit iOS simulator +// targeting iOS 9.x. +// * Xcode 10 moves the deployment target check for iOS < 9.0 to link time +// making __has_feature unreliable there. +// +// Otherwise, `__has_feature` is only supported by Clang so it has be inside +// `defined(__APPLE__)` check. +#if __has_feature(cxx_thread_local) && \ + !(TARGET_OS_IPHONE && __IPHONE_OS_VERSION_MIN_REQUIRED < __IPHONE_9_0) +#define OTABSL_HAVE_THREAD_LOCAL 1 +#endif +#else // !defined(__APPLE__) +#define OTABSL_HAVE_THREAD_LOCAL 1 +#endif + +// There are platforms for which TLS should not be used even though the compiler +// makes it seem like it's supported (Android NDK < r12b for example). +// This is primarily because of linker problems and toolchain misconfiguration: +// Abseil does not intend to support this indefinitely. Currently, the newest +// toolchain that we intend to support that requires this behavior is the +// r11 NDK - allowing for a 5 year support window on that means this option +// is likely to be removed around June of 2021. +// TLS isn't supported until NDK r12b per +// https://developer.android.com/ndk/downloads/revision_history.html +// Since NDK r16, `__NDK_MAJOR__` and `__NDK_MINOR__` are defined in +// . For NDK < r16, users should define these macros, +// e.g. `-D__NDK_MAJOR__=11 -D__NKD_MINOR__=0` for NDK r11. +#if defined(__ANDROID__) && defined(__clang__) +#if __has_include() +#include +#endif // __has_include() +#if defined(__ANDROID__) && defined(__clang__) && defined(__NDK_MAJOR__) && \ + defined(__NDK_MINOR__) && \ + ((__NDK_MAJOR__ < 12) || ((__NDK_MAJOR__ == 12) && (__NDK_MINOR__ < 1))) +#undef OTABSL_HAVE_TLS +#undef OTABSL_HAVE_THREAD_LOCAL +#endif +#endif // defined(__ANDROID__) && defined(__clang__) + +// Emscripten doesn't yet support `thread_local` or `__thread`. +// https://github.com/emscripten-core/emscripten/issues/3502 +#if defined(__EMSCRIPTEN__) +#undef OTABSL_HAVE_TLS +#undef OTABSL_HAVE_THREAD_LOCAL +#endif // defined(__EMSCRIPTEN__) + +// OTABSL_HAVE_INTRINSIC_INT128 +// +// Checks whether the __int128 compiler extension for a 128-bit integral type is +// supported. +// +// Note: __SIZEOF_INT128__ is defined by Clang and GCC when __int128 is +// supported, but we avoid using it in certain cases: +// * On Clang: +// * Building using Clang for Windows, where the Clang runtime library has +// 128-bit support only on LP64 architectures, but Windows is LLP64. +// * On Nvidia's nvcc: +// * nvcc also defines __GNUC__ and __SIZEOF_INT128__, but not all versions +// actually support __int128. +#ifdef OTABSL_HAVE_INTRINSIC_INT128 +#error OTABSL_HAVE_INTRINSIC_INT128 cannot be directly set +#elif defined(__SIZEOF_INT128__) +#if (defined(__clang__) && !defined(_WIN32)) || \ + (defined(__CUDACC__) && __CUDACC_VER_MAJOR__ >= 9) || \ + (defined(__GNUC__) && !defined(__clang__) && !defined(__CUDACC__)) +#define OTABSL_HAVE_INTRINSIC_INT128 1 +#elif defined(__CUDACC__) +// __CUDACC_VER__ is a full version number before CUDA 9, and is defined to a +// string explaining that it has been removed starting with CUDA 9. We use +// nested #ifs because there is no short-circuiting in the preprocessor. +// NOTE: `__CUDACC__` could be undefined while `__CUDACC_VER__` is defined. +#if __CUDACC_VER__ >= 70000 +#define OTABSL_HAVE_INTRINSIC_INT128 1 +#endif // __CUDACC_VER__ >= 70000 +#endif // defined(__CUDACC__) +#endif // OTABSL_HAVE_INTRINSIC_INT128 + +// OTABSL_HAVE_EXCEPTIONS +// +// Checks whether the compiler both supports and enables exceptions. Many +// compilers support a "no exceptions" mode that disables exceptions. +// +// Generally, when OTABSL_HAVE_EXCEPTIONS is not defined: +// +// * Code using `throw` and `try` may not compile. +// * The `noexcept` specifier will still compile and behave as normal. +// * The `noexcept` operator may still return `false`. +// +// For further details, consult the compiler's documentation. +#ifdef OTABSL_HAVE_EXCEPTIONS +#error OTABSL_HAVE_EXCEPTIONS cannot be directly set. + +#elif defined(__clang__) + +#if __clang_major__ > 3 || (__clang_major__ == 3 && __clang_minor__ >= 6) +// Clang >= 3.6 +#if __has_feature(cxx_exceptions) +#define OTABSL_HAVE_EXCEPTIONS 1 +#endif // __has_feature(cxx_exceptions) +#else +// Clang < 3.6 +// http://releases.llvm.org/3.6.0/tools/clang/docs/ReleaseNotes.html#the-exceptions-macro +#if defined(__EXCEPTIONS) && __has_feature(cxx_exceptions) +#define OTABSL_HAVE_EXCEPTIONS 1 +#endif // defined(__EXCEPTIONS) && __has_feature(cxx_exceptions) +#endif // __clang_major__ > 3 || (__clang_major__ == 3 && __clang_minor__ >= 6) + +// Handle remaining special cases and default to exceptions being supported. +#elif !(defined(__GNUC__) && (__GNUC__ < 5) && !defined(__EXCEPTIONS)) && \ + !(defined(__GNUC__) && (__GNUC__ >= 5) && !defined(__cpp_exceptions)) && \ + !(defined(_MSC_VER) && !defined(_CPPUNWIND)) +#define OTABSL_HAVE_EXCEPTIONS 1 +#endif + +// ----------------------------------------------------------------------------- +// Platform Feature Checks +// ----------------------------------------------------------------------------- + +// Currently supported operating systems and associated preprocessor +// symbols: +// +// Linux and Linux-derived __linux__ +// Android __ANDROID__ (implies __linux__) +// Linux (non-Android) __linux__ && !__ANDROID__ +// Darwin (macOS and iOS) __APPLE__ +// Akaros (http://akaros.org) __ros__ +// Windows _WIN32 +// NaCL __native_client__ +// AsmJS __asmjs__ +// WebAssembly __wasm__ +// Fuchsia __Fuchsia__ +// +// Note that since Android defines both __ANDROID__ and __linux__, one +// may probe for either Linux or Android by simply testing for __linux__. + +// OTABSL_HAVE_MMAP +// +// Checks whether the platform has an mmap(2) implementation as defined in +// POSIX.1-2001. +#ifdef OTABSL_HAVE_MMAP +#error OTABSL_HAVE_MMAP cannot be directly set +#elif defined(__linux__) || defined(__APPLE__) || defined(__FreeBSD__) || \ + defined(__ros__) || defined(__native_client__) || defined(__asmjs__) || \ + defined(__wasm__) || defined(__Fuchsia__) || defined(__sun) || \ + defined(__ASYLO__) +#define OTABSL_HAVE_MMAP 1 +#endif + +// OTABSL_HAVE_PTHREAD_GETSCHEDPARAM +// +// Checks whether the platform implements the pthread_(get|set)schedparam(3) +// functions as defined in POSIX.1-2001. +#ifdef OTABSL_HAVE_PTHREAD_GETSCHEDPARAM +#error OTABSL_HAVE_PTHREAD_GETSCHEDPARAM cannot be directly set +#elif defined(__linux__) || defined(__APPLE__) || defined(__FreeBSD__) || \ + defined(__ros__) +#define OTABSL_HAVE_PTHREAD_GETSCHEDPARAM 1 +#endif + +// OTABSL_HAVE_SCHED_YIELD +// +// Checks whether the platform implements sched_yield(2) as defined in +// POSIX.1-2001. +#ifdef OTABSL_HAVE_SCHED_YIELD +#error OTABSL_HAVE_SCHED_YIELD cannot be directly set +#elif defined(__linux__) || defined(__ros__) || defined(__native_client__) +#define OTABSL_HAVE_SCHED_YIELD 1 +#endif + +// OTABSL_HAVE_SEMAPHORE_H +// +// Checks whether the platform supports the header and sem_init(3) +// family of functions as standardized in POSIX.1-2001. +// +// Note: While Apple provides for both iOS and macOS, it is +// explicitly deprecated and will cause build failures if enabled for those +// platforms. We side-step the issue by not defining it here for Apple +// platforms. +#ifdef OTABSL_HAVE_SEMAPHORE_H +#error OTABSL_HAVE_SEMAPHORE_H cannot be directly set +#elif defined(__linux__) || defined(__ros__) +#define OTABSL_HAVE_SEMAPHORE_H 1 +#endif + +// OTABSL_HAVE_ALARM +// +// Checks whether the platform supports the header and alarm(2) +// function as standardized in POSIX.1-2001. +#ifdef OTABSL_HAVE_ALARM +#error OTABSL_HAVE_ALARM cannot be directly set +#elif defined(__GOOGLE_GRTE_VERSION__) +// feature tests for Google's GRTE +#define OTABSL_HAVE_ALARM 1 +#elif defined(__GLIBC__) +// feature test for glibc +#define OTABSL_HAVE_ALARM 1 +#elif defined(_MSC_VER) +// feature tests for Microsoft's library +#elif defined(__MINGW32__) +// mingw32 doesn't provide alarm(2): +// https://osdn.net/projects/mingw/scm/git/mingw-org-wsl/blobs/5.2-trunk/mingwrt/include/unistd.h +// mingw-w64 provides a no-op implementation: +// https://sourceforge.net/p/mingw-w64/mingw-w64/ci/master/tree/mingw-w64-crt/misc/alarm.c +#elif defined(__EMSCRIPTEN__) +// emscripten doesn't support signals +#elif defined(__Fuchsia__) +// Signals don't exist on fuchsia. +#elif defined(__native_client__) +#else +// other standard libraries +#define OTABSL_HAVE_ALARM 1 +#endif + +// OTABSL_IS_LITTLE_ENDIAN +// OTABSL_IS_BIG_ENDIAN +// +// Checks the endianness of the platform. +// +// Notes: uses the built in endian macros provided by GCC (since 4.6) and +// Clang (since 3.2); see +// https://gcc.gnu.org/onlinedocs/cpp/Common-Predefined-Macros.html. +// Otherwise, if _WIN32, assume little endian. Otherwise, bail with an error. +#if defined(OTABSL_IS_BIG_ENDIAN) +#error "OTABSL_IS_BIG_ENDIAN cannot be directly set." +#endif +#if defined(OTABSL_IS_LITTLE_ENDIAN) +#error "OTABSL_IS_LITTLE_ENDIAN cannot be directly set." +#endif + +#if (defined(__BYTE_ORDER__) && defined(__ORDER_LITTLE_ENDIAN__) && \ + __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__) +#define OTABSL_IS_LITTLE_ENDIAN 1 +#elif defined(__BYTE_ORDER__) && defined(__ORDER_BIG_ENDIAN__) && \ + __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ +#define OTABSL_IS_BIG_ENDIAN 1 +#elif defined(_WIN32) +#define OTABSL_IS_LITTLE_ENDIAN 1 +#else +#error "absl endian detection needs to be set up for your compiler" +#endif + +// macOS 10.13 and iOS 10.11 don't let you use , , or +// even though the headers exist and are publicly noted to work. See +// https://github.com/abseil/abseil-cpp/issues/207 and +// https://developer.apple.com/documentation/xcode_release_notes/xcode_10_release_notes +// libc++ spells out the availability requirements in the file +// llvm-project/libcxx/include/__config via the #define +// _LIBCPP_AVAILABILITY_BAD_OPTIONAL_ACCESS. +#if defined(__APPLE__) && defined(_LIBCPP_VERSION) && \ + ((defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && \ + __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 101400) || \ + (defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && \ + __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ < 120000) || \ + (defined(__ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__) && \ + __ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__ < 120000) || \ + (defined(__ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__) && \ + __ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__ < 50000)) +#define OTABSL_INTERNAL_APPLE_CXX17_TYPES_UNAVAILABLE 1 +#else +#define OTABSL_INTERNAL_APPLE_CXX17_TYPES_UNAVAILABLE 0 +#endif + +// OTABSL_HAVE_STD_ANY +// +// Checks whether C++17 std::any is available by checking whether exists. +#ifdef OTABSL_HAVE_STD_ANY +#error "OTABSL_HAVE_STD_ANY cannot be directly set." +#endif + +#ifdef __has_include +#if __has_include() && __cplusplus >= 201703L && \ + !OTABSL_INTERNAL_APPLE_CXX17_TYPES_UNAVAILABLE +#define OTABSL_HAVE_STD_ANY 1 +#endif +#endif + +// OTABSL_HAVE_STD_OPTIONAL +// +// Checks whether C++17 std::optional is available. +#ifdef OTABSL_HAVE_STD_OPTIONAL +#error "OTABSL_HAVE_STD_OPTIONAL cannot be directly set." +#endif + +#ifdef __has_include +#if __has_include() && __cplusplus >= 201703L && \ + !OTABSL_INTERNAL_APPLE_CXX17_TYPES_UNAVAILABLE +#define OTABSL_HAVE_STD_OPTIONAL 1 +#endif +#endif + +// OTABSL_HAVE_STD_VARIANT +// +// Checks whether C++17 std::variant is available. +#ifdef OTABSL_HAVE_STD_VARIANT +#error "OTABSL_HAVE_STD_VARIANT cannot be directly set." +#endif + +#ifdef __has_include +#if __has_include() && __cplusplus >= 201703L && \ + !OTABSL_INTERNAL_APPLE_CXX17_TYPES_UNAVAILABLE +#define OTABSL_HAVE_STD_VARIANT 1 +#endif +#endif + +// OTABSL_HAVE_STD_STRING_VIEW +// +// Checks whether C++17 std::string_view is available. +#ifdef OTABSL_HAVE_STD_STRING_VIEW +#error "OTABSL_HAVE_STD_STRING_VIEW cannot be directly set." +#endif + +#ifdef __has_include +#if __has_include() && __cplusplus >= 201703L +#define OTABSL_HAVE_STD_STRING_VIEW 1 +#endif +#endif + +// For MSVC, `__has_include` is supported in VS 2017 15.3, which is later than +// the support for , , , . So we use +// _MSC_VER to check whether we have VS 2017 RTM (when , , +// , is implemented) or higher. Also, `__cplusplus` is +// not correctly set by MSVC, so we use `_MSVC_LANG` to check the language +// version. +// TODO(zhangxy): fix tests before enabling aliasing for `std::any`. +#if defined(_MSC_VER) && _MSC_VER >= 1910 && \ + ((defined(_MSVC_LANG) && _MSVC_LANG > 201402) || __cplusplus > 201402) +// #define OTABSL_HAVE_STD_ANY 1 +#define OTABSL_HAVE_STD_OPTIONAL 1 +#define OTABSL_HAVE_STD_VARIANT 1 +#define OTABSL_HAVE_STD_STRING_VIEW 1 +#endif + +// OTABSL_USES_STD_ANY +// +// Indicates whether absl::any is an alias for std::any. +#if !defined(OTABSL_OPTION_USE_STD_ANY) +#error options.h is misconfigured. +#elif OTABSL_OPTION_USE_STD_ANY == 0 || \ + (OTABSL_OPTION_USE_STD_ANY == 2 && !defined(OTABSL_HAVE_STD_ANY)) +#undef OTABSL_USES_STD_ANY +#elif OTABSL_OPTION_USE_STD_ANY == 1 || \ + (OTABSL_OPTION_USE_STD_ANY == 2 && defined(OTABSL_HAVE_STD_ANY)) +#define OTABSL_USES_STD_ANY 1 +#else +#error options.h is misconfigured. +#endif + +// OTABSL_USES_STD_OPTIONAL +// +// Indicates whether absl::optional is an alias for std::optional. +#if !defined(OTABSL_OPTION_USE_STD_OPTIONAL) +#error options.h is misconfigured. +#elif OTABSL_OPTION_USE_STD_OPTIONAL == 0 || \ + (OTABSL_OPTION_USE_STD_OPTIONAL == 2 && !defined(OTABSL_HAVE_STD_OPTIONAL)) +#undef OTABSL_USES_STD_OPTIONAL +#elif OTABSL_OPTION_USE_STD_OPTIONAL == 1 || \ + (OTABSL_OPTION_USE_STD_OPTIONAL == 2 && defined(OTABSL_HAVE_STD_OPTIONAL)) +#define OTABSL_USES_STD_OPTIONAL 1 +#else +#error options.h is misconfigured. +#endif + +// OTABSL_USES_STD_VARIANT +// +// Indicates whether absl::variant is an alias for std::variant. +#if !defined(OTABSL_OPTION_USE_STD_VARIANT) +#error options.h is misconfigured. +#elif OTABSL_OPTION_USE_STD_VARIANT == 0 || \ + (OTABSL_OPTION_USE_STD_VARIANT == 2 && !defined(OTABSL_HAVE_STD_VARIANT)) +#undef OTABSL_USES_STD_VARIANT +#elif OTABSL_OPTION_USE_STD_VARIANT == 1 || \ + (OTABSL_OPTION_USE_STD_VARIANT == 2 && defined(OTABSL_HAVE_STD_VARIANT)) +#define OTABSL_USES_STD_VARIANT 1 +#else +#error options.h is misconfigured. +#endif + +// OTABSL_USES_STD_STRING_VIEW +// +// Indicates whether absl::string_view is an alias for std::string_view. +#if !defined(OTABSL_OPTION_USE_STD_STRING_VIEW) +#error options.h is misconfigured. +#elif OTABSL_OPTION_USE_STD_STRING_VIEW == 0 || \ + (OTABSL_OPTION_USE_STD_STRING_VIEW == 2 && \ + !defined(OTABSL_HAVE_STD_STRING_VIEW)) +#undef OTABSL_USES_STD_STRING_VIEW +#elif OTABSL_OPTION_USE_STD_STRING_VIEW == 1 || \ + (OTABSL_OPTION_USE_STD_STRING_VIEW == 2 && \ + defined(OTABSL_HAVE_STD_STRING_VIEW)) +#define OTABSL_USES_STD_STRING_VIEW 1 +#else +#error options.h is misconfigured. +#endif + +// In debug mode, MSVC 2017's std::variant throws a EXCEPTION_ACCESS_VIOLATION +// SEH exception from emplace for variant when constructing the +// struct can throw. This defeats some of variant_test and +// variant_exception_safety_test. +#if defined(_MSC_VER) && _MSC_VER >= 1700 && defined(_DEBUG) +#define OTABSL_INTERNAL_MSVC_2017_DBG_MODE +#endif + +// OTABSL_INTERNAL_MANGLED_NS +// OTABSL_INTERNAL_MANGLED_BACKREFERENCE +// +// Internal macros for building up mangled names in our internal fork of CCTZ. +// This implementation detail is only needed and provided for the MSVC build. +// +// These macros both expand to string literals. OTABSL_INTERNAL_MANGLED_NS is +// the mangled spelling of the `absl` namespace, and +// OTABSL_INTERNAL_MANGLED_BACKREFERENCE is a back-reference integer representing +// the proper count to skip past the CCTZ fork namespace names. (This number +// is one larger when there is an inline namespace name to skip.) +#if defined(_MSC_VER) +#if OTABSL_OPTION_USE_INLINE_NAMESPACE == 0 +#define OTABSL_INTERNAL_MANGLED_NS "absl" +#define OTABSL_INTERNAL_MANGLED_BACKREFERENCE "5" +#else +#define OTABSL_INTERNAL_MANGLED_NS \ + OTABSL_INTERNAL_TOKEN_STR(OTABSL_OPTION_INLINE_NAMESPACE_NAME) "@absl" +#define OTABSL_INTERNAL_MANGLED_BACKREFERENCE "6" +#endif +#endif + +#undef OTABSL_INTERNAL_HAS_KEYWORD + +// OTABSL_DLL +// +// When building Abseil as a DLL, this macro expands to `__declspec(dllexport)` +// so we can annotate symbols appropriately as being exported. When used in +// headers consuming a DLL, this macro expands to `__declspec(dllimport)` so +// that consumers know the symbol is defined inside the DLL. In all other cases, +// the macro expands to nothing. +#if defined(_MSC_VER) +#if defined(OTABSL_BUILD_DLL) +#define OTABSL_DLL __declspec(dllexport) +#elif 1 +#define OTABSL_DLL __declspec(dllimport) +#else +#define OTABSL_DLL +#endif +#else +#define OTABSL_DLL +#endif // defined(_MSC_VER) + +#endif // OTABSL_BASE_CONFIG_H_ diff --git a/jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/nostd/internal/absl/base/internal/identity.h b/jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/nostd/internal/absl/base/internal/identity.h new file mode 100644 index 000000000..4afba3179 --- /dev/null +++ b/jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/nostd/internal/absl/base/internal/identity.h @@ -0,0 +1,37 @@ +// Copyright 2017 The Abseil Authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +#ifndef OTABSL_BASE_INTERNAL_IDENTITY_H_ +#define OTABSL_BASE_INTERNAL_IDENTITY_H_ + +#include "../config.h" + +namespace absl { +OTABSL_NAMESPACE_BEGIN +namespace internal { + +template +struct identity { + typedef T type; +}; + +template +using identity_t = typename identity::type; + +} // namespace internal +OTABSL_NAMESPACE_END +} // namespace absl + +#endif // OTABSL_BASE_INTERNAL_IDENTITY_H_ diff --git a/jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/nostd/internal/absl/base/internal/inline_variable.h b/jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/nostd/internal/absl/base/internal/inline_variable.h new file mode 100644 index 000000000..9d024a2d9 --- /dev/null +++ b/jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/nostd/internal/absl/base/internal/inline_variable.h @@ -0,0 +1,107 @@ +// Copyright 2017 The Abseil Authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef OTABSL_BASE_INTERNAL_INLINE_VARIABLE_EMULATION_H_ +#define OTABSL_BASE_INTERNAL_INLINE_VARIABLE_EMULATION_H_ + +#include + +#include "identity.h" + +// File: +// This file define a macro that allows the creation of or emulation of C++17 +// inline variables based on whether or not the feature is supported. + +//////////////////////////////////////////////////////////////////////////////// +// Macro: OTABSL_INTERNAL_INLINE_CONSTEXPR(type, name, init) +// +// Description: +// Expands to the equivalent of an inline constexpr instance of the specified +// `type` and `name`, initialized to the value `init`. If the compiler being +// used is detected as supporting actual inline variables as a language +// feature, then the macro expands to an actual inline variable definition. +// +// Requires: +// `type` is a type that is usable in an extern variable declaration. +// +// Requires: `name` is a valid identifier +// +// Requires: +// `init` is an expression that can be used in the following definition: +// constexpr type name = init; +// +// Usage: +// +// // Equivalent to: `inline constexpr size_t variant_npos = -1;` +// OTABSL_INTERNAL_INLINE_CONSTEXPR(size_t, variant_npos, -1); +// +// Differences in implementation: +// For a direct, language-level inline variable, decltype(name) will be the +// type that was specified along with const qualification, whereas for +// emulated inline variables, decltype(name) may be different (in practice +// it will likely be a reference type). +//////////////////////////////////////////////////////////////////////////////// + +#ifdef __cpp_inline_variables + +// Clang's -Wmissing-variable-declarations option erroneously warned that +// inline constexpr objects need to be pre-declared. This has now been fixed, +// but we will need to support this workaround for people building with older +// versions of clang. +// +// Bug: https://bugs.llvm.org/show_bug.cgi?id=35862 +// +// Note: +// identity_t is used here so that the const and name are in the +// appropriate place for pointer types, reference types, function pointer +// types, etc.. +#if defined(__clang__) +#define OTABSL_INTERNAL_EXTERN_DECL(type, name) \ + extern const ::absl::OTABSL_OPTION_INLINE_NAMESPACE_NAME::internal::identity_t name; +#else // Otherwise, just define the macro to do nothing. +#define OTABSL_INTERNAL_EXTERN_DECL(type, name) +#endif // defined(__clang__) + +// See above comment at top of file for details. +#define OTABSL_INTERNAL_INLINE_CONSTEXPR(type, name, init) \ + OTABSL_INTERNAL_EXTERN_DECL(type, name) \ + inline constexpr ::absl::OTABSL_OPTION_INLINE_NAMESPACE_NAME::internal::identity_t name = init + +#else + +// See above comment at top of file for details. +// +// Note: +// identity_t is used here so that the const and name are in the +// appropriate place for pointer types, reference types, function pointer +// types, etc.. +#define OTABSL_INTERNAL_INLINE_CONSTEXPR(var_type, name, init) \ + template \ + struct AbslInternalInlineVariableHolder##name { \ + static constexpr ::absl::OTABSL_OPTION_INLINE_NAMESPACE_NAME::internal::identity_t kInstance = init; \ + }; \ + \ + template \ + constexpr ::absl::OTABSL_OPTION_INLINE_NAMESPACE_NAME::internal::identity_t \ + AbslInternalInlineVariableHolder##name::kInstance; \ + \ + static constexpr const ::absl::OTABSL_OPTION_INLINE_NAMESPACE_NAME::internal::identity_t& \ + name = /* NOLINT */ \ + AbslInternalInlineVariableHolder##name<>::kInstance; \ + static_assert(sizeof(void (*)(decltype(name))) != 0, \ + "Silence unused variable warnings.") + +#endif // __cpp_inline_variables + +#endif // OTABSL_BASE_INTERNAL_INLINE_VARIABLE_EMULATION_H_ diff --git a/jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/nostd/internal/absl/base/internal/invoke.h b/jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/nostd/internal/absl/base/internal/invoke.h new file mode 100644 index 000000000..99c37ba24 --- /dev/null +++ b/jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/nostd/internal/absl/base/internal/invoke.h @@ -0,0 +1,188 @@ +// Copyright 2017 The Abseil Authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// absl::base_internal::Invoke(f, args...) is an implementation of +// INVOKE(f, args...) from section [func.require] of the C++ standard. +// +// [func.require] +// Define INVOKE (f, t1, t2, ..., tN) as follows: +// 1. (t1.*f)(t2, ..., tN) when f is a pointer to a member function of a class T +// and t1 is an object of type T or a reference to an object of type T or a +// reference to an object of a type derived from T; +// 2. ((*t1).*f)(t2, ..., tN) when f is a pointer to a member function of a +// class T and t1 is not one of the types described in the previous item; +// 3. t1.*f when N == 1 and f is a pointer to member data of a class T and t1 is +// an object of type T or a reference to an object of type T or a reference +// to an object of a type derived from T; +// 4. (*t1).*f when N == 1 and f is a pointer to member data of a class T and t1 +// is not one of the types described in the previous item; +// 5. f(t1, t2, ..., tN) in all other cases. +// +// The implementation is SFINAE-friendly: substitution failure within Invoke() +// isn't an error. + +#ifndef OTABSL_BASE_INTERNAL_INVOKE_H_ +#define OTABSL_BASE_INTERNAL_INVOKE_H_ + +#include +#include +#include + +#include "../../meta/type_traits.h" + +// The following code is internal implementation detail. See the comment at the +// top of this file for the API documentation. + +namespace absl { +OTABSL_NAMESPACE_BEGIN +namespace base_internal { + +// The five classes below each implement one of the clauses from the definition +// of INVOKE. The inner class template Accept checks whether the +// clause is applicable; static function template Invoke(f, args...) does the +// invocation. +// +// By separating the clause selection logic from invocation we make sure that +// Invoke() does exactly what the standard says. + +template +struct StrippedAccept { + template + struct Accept : Derived::template AcceptImpl::type>::type...> {}; +}; + +// (t1.*f)(t2, ..., tN) when f is a pointer to a member function of a class T +// and t1 is an object of type T or a reference to an object of type T or a +// reference to an object of a type derived from T. +struct MemFunAndRef : StrippedAccept { + template + struct AcceptImpl : std::false_type {}; + + template + struct AcceptImpl + : std::integral_constant::value && + absl::is_function::value> { + }; + + template + static decltype((std::declval().* + std::declval())(std::declval()...)) + Invoke(MemFun&& mem_fun, Obj&& obj, Args&&... args) { + return (std::forward(obj).* + std::forward(mem_fun))(std::forward(args)...); + } +}; + +// ((*t1).*f)(t2, ..., tN) when f is a pointer to a member function of a +// class T and t1 is not one of the types described in the previous item. +struct MemFunAndPtr : StrippedAccept { + template + struct AcceptImpl : std::false_type {}; + + template + struct AcceptImpl + : std::integral_constant::value && + absl::is_function::value> { + }; + + template + static decltype(((*std::declval()).* + std::declval())(std::declval()...)) + Invoke(MemFun&& mem_fun, Ptr&& ptr, Args&&... args) { + return ((*std::forward(ptr)).* + std::forward(mem_fun))(std::forward(args)...); + } +}; + +// t1.*f when N == 1 and f is a pointer to member data of a class T and t1 is +// an object of type T or a reference to an object of type T or a reference +// to an object of a type derived from T. +struct DataMemAndRef : StrippedAccept { + template + struct AcceptImpl : std::false_type {}; + + template + struct AcceptImpl + : std::integral_constant::value && + !absl::is_function::value> {}; + + template + static decltype(std::declval().*std::declval()) Invoke( + DataMem&& data_mem, Ref&& ref) { + return std::forward(ref).*std::forward(data_mem); + } +}; + +// (*t1).*f when N == 1 and f is a pointer to member data of a class T and t1 +// is not one of the types described in the previous item. +struct DataMemAndPtr : StrippedAccept { + template + struct AcceptImpl : std::false_type {}; + + template + struct AcceptImpl + : std::integral_constant::value && + !absl::is_function::value> {}; + + template + static decltype((*std::declval()).*std::declval()) Invoke( + DataMem&& data_mem, Ptr&& ptr) { + return (*std::forward(ptr)).*std::forward(data_mem); + } +}; + +// f(t1, t2, ..., tN) in all other cases. +struct Callable { + // Callable doesn't have Accept because it's the last clause that gets picked + // when none of the previous clauses are applicable. + template + static decltype(std::declval()(std::declval()...)) Invoke( + F&& f, Args&&... args) { + return std::forward(f)(std::forward(args)...); + } +}; + +// Resolves to the first matching clause. +template +struct Invoker { + typedef typename std::conditional< + MemFunAndRef::Accept::value, MemFunAndRef, + typename std::conditional< + MemFunAndPtr::Accept::value, MemFunAndPtr, + typename std::conditional< + DataMemAndRef::Accept::value, DataMemAndRef, + typename std::conditional::value, + DataMemAndPtr, Callable>::type>::type>:: + type>::type type; +}; + +// The result type of Invoke. +template +using InvokeT = decltype(Invoker::type::Invoke( + std::declval(), std::declval()...)); + +// Invoke(f, args...) is an implementation of INVOKE(f, args...) from section +// [func.require] of the C++ standard. +template +InvokeT Invoke(F&& f, Args&&... args) { + return Invoker::type::Invoke(std::forward(f), + std::forward(args)...); +} + +} // namespace base_internal +OTABSL_NAMESPACE_END +} // namespace absl + +#endif // OTABSL_BASE_INTERNAL_INVOKE_H_ diff --git a/jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/nostd/internal/absl/base/macros.h b/jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/nostd/internal/absl/base/macros.h new file mode 100644 index 000000000..7b4f427d3 --- /dev/null +++ b/jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/nostd/internal/absl/base/macros.h @@ -0,0 +1,220 @@ +// +// Copyright 2017 The Abseil Authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ----------------------------------------------------------------------------- +// File: macros.h +// ----------------------------------------------------------------------------- +// +// This header file defines the set of language macros used within Abseil code. +// For the set of macros used to determine supported compilers and platforms, +// see absl/base/config.h instead. +// +// This code is compiled directly on many platforms, including client +// platforms like Windows, Mac, and embedded systems. Before making +// any changes here, make sure that you're not breaking any platforms. + +#ifndef OTABSL_BASE_MACROS_H_ +#define OTABSL_BASE_MACROS_H_ + +#include +#include + +#include "attributes.h" +#include "optimization.h" +#include "port.h" + +// OTABSL_ARRAYSIZE() +// +// Returns the number of elements in an array as a compile-time constant, which +// can be used in defining new arrays. If you use this macro on a pointer by +// mistake, you will get a compile-time error. +#define OTABSL_ARRAYSIZE(array) \ + (sizeof(::absl::macros_internal::ArraySizeHelper(array))) + +namespace absl { +OTABSL_NAMESPACE_BEGIN +namespace macros_internal { +// Note: this internal template function declaration is used by OTABSL_ARRAYSIZE. +// The function doesn't need a definition, as we only use its type. +template +auto ArraySizeHelper(const T (&array)[N]) -> char (&)[N]; +} // namespace macros_internal +OTABSL_NAMESPACE_END +} // namespace absl + +// kLinkerInitialized +// +// An enum used only as a constructor argument to indicate that a variable has +// static storage duration, and that the constructor should do nothing to its +// state. Use of this macro indicates to the reader that it is legal to +// declare a static instance of the class, provided the constructor is given +// the absl::base_internal::kLinkerInitialized argument. +// +// Normally, it is unsafe to declare a static variable that has a constructor or +// a destructor because invocation order is undefined. However, if the type can +// be zero-initialized (which the loader does for static variables) into a valid +// state and the type's destructor does not affect storage, then a constructor +// for static initialization can be declared. +// +// Example: +// // Declaration +// explicit MyClass(absl::base_internal:LinkerInitialized x) {} +// +// // Invocation +// static MyClass my_global(absl::base_internal::kLinkerInitialized); +namespace absl { +OTABSL_NAMESPACE_BEGIN +namespace base_internal { +enum LinkerInitialized { + kLinkerInitialized = 0, +}; +} // namespace base_internal +OTABSL_NAMESPACE_END +} // namespace absl + +// OTABSL_FALLTHROUGH_INTENDED +// +// Annotates implicit fall-through between switch labels, allowing a case to +// indicate intentional fallthrough and turn off warnings about any lack of a +// `break` statement. The OTABSL_FALLTHROUGH_INTENDED macro should be followed by +// a semicolon and can be used in most places where `break` can, provided that +// no statements exist between it and the next switch label. +// +// Example: +// +// switch (x) { +// case 40: +// case 41: +// if (truth_is_out_there) { +// ++x; +// OTABSL_FALLTHROUGH_INTENDED; // Use instead of/along with annotations +// // in comments +// } else { +// return x; +// } +// case 42: +// ... +// +// Notes: when compiled with clang in C++11 mode, the OTABSL_FALLTHROUGH_INTENDED +// macro is expanded to the [[clang::fallthrough]] attribute, which is analysed +// when performing switch labels fall-through diagnostic +// (`-Wimplicit-fallthrough`). See clang documentation on language extensions +// for details: +// https://clang.llvm.org/docs/AttributeReference.html#fallthrough-clang-fallthrough +// +// When used with unsupported compilers, the OTABSL_FALLTHROUGH_INTENDED macro +// has no effect on diagnostics. In any case this macro has no effect on runtime +// behavior and performance of code. +#ifdef OTABSL_FALLTHROUGH_INTENDED +#error "OTABSL_FALLTHROUGH_INTENDED should not be defined." +#endif + +// TODO(zhangxy): Use c++17 standard [[fallthrough]] macro, when supported. +#if defined(__clang__) && defined(__has_warning) +#if __has_feature(cxx_attributes) && __has_warning("-Wimplicit-fallthrough") +#define OTABSL_FALLTHROUGH_INTENDED [[clang::fallthrough]] +#endif +#elif defined(__GNUC__) && __GNUC__ >= 7 +#define OTABSL_FALLTHROUGH_INTENDED [[gnu::fallthrough]] +#endif + +#ifndef OTABSL_FALLTHROUGH_INTENDED +#define OTABSL_FALLTHROUGH_INTENDED \ + do { \ + } while (0) +#endif + +// OTABSL_DEPRECATED() +// +// Marks a deprecated class, struct, enum, function, method and variable +// declarations. The macro argument is used as a custom diagnostic message (e.g. +// suggestion of a better alternative). +// +// Examples: +// +// class OTABSL_DEPRECATED("Use Bar instead") Foo {...}; +// +// OTABSL_DEPRECATED("Use Baz() instead") void Bar() {...} +// +// template +// OTABSL_DEPRECATED("Use DoThat() instead") +// void DoThis(); +// +// Every usage of a deprecated entity will trigger a warning when compiled with +// clang's `-Wdeprecated-declarations` option. This option is turned off by +// default, but the warnings will be reported by clang-tidy. +#if defined(__clang__) && __cplusplus >= 201103L +#define OTABSL_DEPRECATED(message) __attribute__((deprecated(message))) +#endif + +#ifndef OTABSL_DEPRECATED +#define OTABSL_DEPRECATED(message) +#endif + +// OTABSL_BAD_CALL_IF() +// +// Used on a function overload to trap bad calls: any call that matches the +// overload will cause a compile-time error. This macro uses a clang-specific +// "enable_if" attribute, as described at +// https://clang.llvm.org/docs/AttributeReference.html#enable-if +// +// Overloads which use this macro should be bracketed by +// `#ifdef OTABSL_BAD_CALL_IF`. +// +// Example: +// +// int isdigit(int c); +// #ifdef OTABSL_BAD_CALL_IF +// int isdigit(int c) +// OTABSL_BAD_CALL_IF(c <= -1 || c > 255, +// "'c' must have the value of an unsigned char or EOF"); +// #endif // OTABSL_BAD_CALL_IF +#if OTABSL_HAVE_ATTRIBUTE(enable_if) +#define OTABSL_BAD_CALL_IF(expr, msg) \ + __attribute__((enable_if(expr, "Bad call trap"), unavailable(msg))) +#endif + +// OTABSL_ASSERT() +// +// In C++11, `assert` can't be used portably within constexpr functions. +// OTABSL_ASSERT functions as a runtime assert but works in C++11 constexpr +// functions. Example: +// +// constexpr double Divide(double a, double b) { +// return OTABSL_ASSERT(b != 0), a / b; +// } +// +// This macro is inspired by +// https://akrzemi1.wordpress.com/2017/05/18/asserts-in-constexpr-functions/ +#if defined(NDEBUG) +#define OTABSL_ASSERT(expr) \ + (false ? static_cast(expr) : static_cast(0)) +#else +#define OTABSL_ASSERT(expr) \ + (OTABSL_PREDICT_TRUE((expr)) ? static_cast(0) \ + : [] { assert(false && #expr); }()) // NOLINT +#endif + +#ifdef OTABSL_HAVE_EXCEPTIONS +#define OTABSL_INTERNAL_TRY try +#define OTABSL_INTERNAL_CATCH_ANY catch (...) +#define OTABSL_INTERNAL_RETHROW do { throw; } while (false) +#else // OTABSL_HAVE_EXCEPTIONS +#define OTABSL_INTERNAL_TRY if (true) +#define OTABSL_INTERNAL_CATCH_ANY else if (false) +#define OTABSL_INTERNAL_RETHROW do {} while (false) +#endif // OTABSL_HAVE_EXCEPTIONS + +#endif // OTABSL_BASE_MACROS_H_ diff --git a/jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/nostd/internal/absl/base/optimization.h b/jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/nostd/internal/absl/base/optimization.h new file mode 100644 index 000000000..69713654a --- /dev/null +++ b/jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/nostd/internal/absl/base/optimization.h @@ -0,0 +1,181 @@ +// +// Copyright 2017 The Abseil Authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ----------------------------------------------------------------------------- +// File: optimization.h +// ----------------------------------------------------------------------------- +// +// This header file defines portable macros for performance optimization. + +#ifndef OTABSL_BASE_OPTIMIZATION_H_ +#define OTABSL_BASE_OPTIMIZATION_H_ + +#include "config.h" + +// OTABSL_BLOCK_TAIL_CALL_OPTIMIZATION +// +// Instructs the compiler to avoid optimizing tail-call recursion. Use of this +// macro is useful when you wish to preserve the existing function order within +// a stack trace for logging, debugging, or profiling purposes. +// +// Example: +// +// int f() { +// int result = g(); +// OTABSL_BLOCK_TAIL_CALL_OPTIMIZATION(); +// return result; +// } +#if defined(__pnacl__) +#define OTABSL_BLOCK_TAIL_CALL_OPTIMIZATION() if (volatile int x = 0) { (void)x; } +#elif defined(__clang__) +// Clang will not tail call given inline volatile assembly. +#define OTABSL_BLOCK_TAIL_CALL_OPTIMIZATION() __asm__ __volatile__("") +#elif defined(__GNUC__) +// GCC will not tail call given inline volatile assembly. +#define OTABSL_BLOCK_TAIL_CALL_OPTIMIZATION() __asm__ __volatile__("") +#elif defined(_MSC_VER) +#include +// The __nop() intrinsic blocks the optimisation. +#define OTABSL_BLOCK_TAIL_CALL_OPTIMIZATION() __nop() +#else +#define OTABSL_BLOCK_TAIL_CALL_OPTIMIZATION() if (volatile int x = 0) { (void)x; } +#endif + +// OTABSL_CACHELINE_SIZE +// +// Explicitly defines the size of the L1 cache for purposes of alignment. +// Setting the cacheline size allows you to specify that certain objects be +// aligned on a cacheline boundary with `OTABSL_CACHELINE_ALIGNED` declarations. +// (See below.) +// +// NOTE: this macro should be replaced with the following C++17 features, when +// those are generally available: +// +// * `std::hardware_constructive_interference_size` +// * `std::hardware_destructive_interference_size` +// +// See http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0154r1.html +// for more information. +#if defined(__GNUC__) +// Cache line alignment +#if defined(__i386__) || defined(__x86_64__) +#define OTABSL_CACHELINE_SIZE 64 +#elif defined(__powerpc64__) +#define OTABSL_CACHELINE_SIZE 128 +#elif defined(__aarch64__) +// We would need to read special register ctr_el0 to find out L1 dcache size. +// This value is a good estimate based on a real aarch64 machine. +#define OTABSL_CACHELINE_SIZE 64 +#elif defined(__arm__) +// Cache line sizes for ARM: These values are not strictly correct since +// cache line sizes depend on implementations, not architectures. There +// are even implementations with cache line sizes configurable at boot +// time. +#if defined(__ARM_ARCH_5T__) +#define OTABSL_CACHELINE_SIZE 32 +#elif defined(__ARM_ARCH_7A__) +#define OTABSL_CACHELINE_SIZE 64 +#endif +#endif + +#ifndef OTABSL_CACHELINE_SIZE +// A reasonable default guess. Note that overestimates tend to waste more +// space, while underestimates tend to waste more time. +#define OTABSL_CACHELINE_SIZE 64 +#endif + +// OTABSL_CACHELINE_ALIGNED +// +// Indicates that the declared object be cache aligned using +// `OTABSL_CACHELINE_SIZE` (see above). Cacheline aligning objects allows you to +// load a set of related objects in the L1 cache for performance improvements. +// Cacheline aligning objects properly allows constructive memory sharing and +// prevents destructive (or "false") memory sharing. +// +// NOTE: this macro should be replaced with usage of `alignas()` using +// `std::hardware_constructive_interference_size` and/or +// `std::hardware_destructive_interference_size` when available within C++17. +// +// See http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0154r1.html +// for more information. +// +// On some compilers, `OTABSL_CACHELINE_ALIGNED` expands to an `__attribute__` +// or `__declspec` attribute. For compilers where this is not known to work, +// the macro expands to nothing. +// +// No further guarantees are made here. The result of applying the macro +// to variables and types is always implementation-defined. +// +// WARNING: It is easy to use this attribute incorrectly, even to the point +// of causing bugs that are difficult to diagnose, crash, etc. It does not +// of itself guarantee that objects are aligned to a cache line. +// +// NOTE: Some compilers are picky about the locations of annotations such as +// this attribute, so prefer to put it at the beginning of your declaration. +// For example, +// +// OTABSL_CACHELINE_ALIGNED static Foo* foo = ... +// +// class OTABSL_CACHELINE_ALIGNED Bar { ... +// +// Recommendations: +// +// 1) Consult compiler documentation; this comment is not kept in sync as +// toolchains evolve. +// 2) Verify your use has the intended effect. This often requires inspecting +// the generated machine code. +// 3) Prefer applying this attribute to individual variables. Avoid +// applying it to types. This tends to localize the effect. +#define OTABSL_CACHELINE_ALIGNED __attribute__((aligned(OTABSL_CACHELINE_SIZE))) +#elif defined(_MSC_VER) +#define OTABSL_CACHELINE_SIZE 64 +#define OTABSL_CACHELINE_ALIGNED __declspec(align(OTABSL_CACHELINE_SIZE)) +#else +#define OTABSL_CACHELINE_SIZE 64 +#define OTABSL_CACHELINE_ALIGNED +#endif + +// OTABSL_PREDICT_TRUE, OTABSL_PREDICT_FALSE +// +// Enables the compiler to prioritize compilation using static analysis for +// likely paths within a boolean branch. +// +// Example: +// +// if (OTABSL_PREDICT_TRUE(expression)) { +// return result; // Faster if more likely +// } else { +// return 0; +// } +// +// Compilers can use the information that a certain branch is not likely to be +// taken (for instance, a CHECK failure) to optimize for the common case in +// the absence of better information (ie. compiling gcc with `-fprofile-arcs`). +// +// Recommendation: Modern CPUs dynamically predict branch execution paths, +// typically with accuracy greater than 97%. As a result, annotating every +// branch in a codebase is likely counterproductive; however, annotating +// specific branches that are both hot and consistently mispredicted is likely +// to yield performance improvements. +#if OTABSL_HAVE_BUILTIN(__builtin_expect) || \ + (defined(__GNUC__) && !defined(__clang__)) +#define OTABSL_PREDICT_FALSE(x) (__builtin_expect(x, 0)) +#define OTABSL_PREDICT_TRUE(x) (__builtin_expect(false || (x), true)) +#else +#define OTABSL_PREDICT_FALSE(x) (x) +#define OTABSL_PREDICT_TRUE(x) (x) +#endif + +#endif // OTABSL_BASE_OPTIMIZATION_H_ diff --git a/jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/nostd/internal/absl/base/options.h b/jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/nostd/internal/absl/base/options.h new file mode 100644 index 000000000..3632b74f6 --- /dev/null +++ b/jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/nostd/internal/absl/base/options.h @@ -0,0 +1,211 @@ +#ifndef OTABSL_BASE_OPTIONS_H_ +#define OTABSL_BASE_OPTIONS_H_ + +// Copyright 2019 The Abseil Authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ----------------------------------------------------------------------------- +// File: options.h +// ----------------------------------------------------------------------------- +// +// This file contains Abseil configuration options for setting specific +// implementations instead of letting Abseil determine which implementation to +// use at compile-time. Setting these options may be useful for package or build +// managers who wish to guarantee ABI stability within binary builds (which are +// otherwise difficult to enforce). +// +// *** IMPORTANT NOTICE FOR PACKAGE MANAGERS: It is important that +// maintainers of package managers who wish to package Abseil read and +// understand this file! *** +// +// Abseil contains a number of possible configuration endpoints, based on +// parameters such as the detected platform, language version, or command-line +// flags used to invoke the underlying binary. As is the case with all +// libraries, binaries which contain Abseil code must ensure that separate +// packages use the same compiled copy of Abseil to avoid a diamond dependency +// problem, which can occur if two packages built with different Abseil +// configuration settings are linked together. Diamond dependency problems in +// C++ may manifest as violations to the One Definition Rule (ODR) (resulting in +// linker errors), or undefined behavior (resulting in crashes). +// +// Diamond dependency problems can be avoided if all packages utilize the same +// exact version of Abseil. Building from source code with the same compilation +// parameters is the easiest way to avoid such dependency problems. However, for +// package managers who cannot control such compilation parameters, we are +// providing the file to allow you to inject ABI (Application Binary Interface) +// stability across builds. Settings options in this file will neither change +// API nor ABI, providing a stable copy of Abseil between packages. +// +// Care must be taken to keep options within these configurations isolated +// from any other dynamic settings, such as command-line flags which could alter +// these options. This file is provided specifically to help build and package +// managers provide a stable copy of Abseil within their libraries and binaries; +// other developers should not have need to alter the contents of this file. +// +// ----------------------------------------------------------------------------- +// Usage +// ----------------------------------------------------------------------------- +// +// For any particular package release, set the appropriate definitions within +// this file to whatever value makes the most sense for your package(s). Note +// that, by default, most of these options, at the moment, affect the +// implementation of types; future options may affect other implementation +// details. +// +// NOTE: the defaults within this file all assume that Abseil can select the +// proper Abseil implementation at compile-time, which will not be sufficient +// to guarantee ABI stability to package managers. + +// Include a standard library header to allow configuration based on the +// standard library in use. +#ifdef __cplusplus +#include +#endif + +// ----------------------------------------------------------------------------- +// Type Compatibility Options +// ----------------------------------------------------------------------------- +// +// OTABSL_OPTION_USE_STD_ANY +// +// This option controls whether absl::any is implemented as an alias to +// std::any, or as an independent implementation. +// +// A value of 0 means to use Abseil's implementation. This requires only C++11 +// support, and is expected to work on every toolchain we support. +// +// A value of 1 means to use an alias to std::any. This requires that all code +// using Abseil is built in C++17 mode or later. +// +// A value of 2 means to detect the C++ version being used to compile Abseil, +// and use an alias only if a working std::any is available. This option is +// useful when you are building your entire program, including all of its +// dependencies, from source. It should not be used otherwise -- for example, +// if you are distributing Abseil in a binary package manager -- since in +// mode 2, absl::any will name a different type, with a different mangled name +// and binary layout, depending on the compiler flags passed by the end user. +// For more info, see https://abseil.io/about/design/dropin-types. +// +// User code should not inspect this macro. To check in the preprocessor if +// absl::any is a typedef of std::any, use the feature macro OTABSL_USES_STD_ANY. + +#define OTABSL_OPTION_USE_STD_ANY 0 + + +// OTABSL_OPTION_USE_STD_OPTIONAL +// +// This option controls whether absl::optional is implemented as an alias to +// std::optional, or as an independent implementation. +// +// A value of 0 means to use Abseil's implementation. This requires only C++11 +// support, and is expected to work on every toolchain we support. +// +// A value of 1 means to use an alias to std::optional. This requires that all +// code using Abseil is built in C++17 mode or later. +// +// A value of 2 means to detect the C++ version being used to compile Abseil, +// and use an alias only if a working std::optional is available. This option +// is useful when you are building your program from source. It should not be +// used otherwise -- for example, if you are distributing Abseil in a binary +// package manager -- since in mode 2, absl::optional will name a different +// type, with a different mangled name and binary layout, depending on the +// compiler flags passed by the end user. For more info, see +// https://abseil.io/about/design/dropin-types. + +// User code should not inspect this macro. To check in the preprocessor if +// absl::optional is a typedef of std::optional, use the feature macro +// OTABSL_USES_STD_OPTIONAL. + +#define OTABSL_OPTION_USE_STD_OPTIONAL 0 + + +// OTABSL_OPTION_USE_STD_STRING_VIEW +// +// This option controls whether absl::string_view is implemented as an alias to +// std::string_view, or as an independent implementation. +// +// A value of 0 means to use Abseil's implementation. This requires only C++11 +// support, and is expected to work on every toolchain we support. +// +// A value of 1 means to use an alias to std::string_view. This requires that +// all code using Abseil is built in C++17 mode or later. +// +// A value of 2 means to detect the C++ version being used to compile Abseil, +// and use an alias only if a working std::string_view is available. This +// option is useful when you are building your program from source. It should +// not be used otherwise -- for example, if you are distributing Abseil in a +// binary package manager -- since in mode 2, absl::string_view will name a +// different type, with a different mangled name and binary layout, depending on +// the compiler flags passed by the end user. For more info, see +// https://abseil.io/about/design/dropin-types. +// +// User code should not inspect this macro. To check in the preprocessor if +// absl::string_view is a typedef of std::string_view, use the feature macro +// OTABSL_USES_STD_STRING_VIEW. + +#define OTABSL_OPTION_USE_STD_STRING_VIEW 0 + +// OTABSL_OPTION_USE_STD_VARIANT +// +// This option controls whether absl::variant is implemented as an alias to +// std::variant, or as an independent implementation. +// +// A value of 0 means to use Abseil's implementation. This requires only C++11 +// support, and is expected to work on every toolchain we support. +// +// A value of 1 means to use an alias to std::variant. This requires that all +// code using Abseil is built in C++17 mode or later. +// +// A value of 2 means to detect the C++ version being used to compile Abseil, +// and use an alias only if a working std::variant is available. This option +// is useful when you are building your program from source. It should not be +// used otherwise -- for example, if you are distributing Abseil in a binary +// package manager -- since in mode 2, absl::variant will name a different +// type, with a different mangled name and binary layout, depending on the +// compiler flags passed by the end user. For more info, see +// https://abseil.io/about/design/dropin-types. +// +// User code should not inspect this macro. To check in the preprocessor if +// absl::variant is a typedef of std::variant, use the feature macro +// OTABSL_USES_STD_VARIANT. + +#define OTABSL_OPTION_USE_STD_VARIANT 0 + + +// OTABSL_OPTION_USE_INLINE_NAMESPACE +// OTABSL_OPTION_INLINE_NAMESPACE_NAME +// +// These options controls whether all entities in the absl namespace are +// contained within an inner inline namespace. This does not affect the +// user-visible API of Abseil, but it changes the mangled names of all symbols. +// +// This can be useful as a version tag if you are distributing Abseil in +// precompiled form. This will prevent a binary library build of Abseil with +// one inline namespace being used with headers configured with a different +// inline namespace name. Binary packagers are reminded that Abseil does not +// guarantee any ABI stability in Abseil, so any update of Abseil or +// configuration change in such a binary package should be combined with a +// new, unique value for the inline namespace name. +// +// A value of 0 means not to use inline namespaces. +// +// A value of 1 means to use an inline namespace with the given name inside +// namespace absl. If this is set, OTABSL_OPTION_INLINE_NAMESPACE_NAME must also +// be changed to a new, unique identifier name. In particular "head" is not +// allowed. + +#define OTABSL_OPTION_USE_INLINE_NAMESPACE 1 +#define OTABSL_OPTION_INLINE_NAMESPACE_NAME otel_v1 + +#endif // OTABSL_BASE_OPTIONS_H_ diff --git a/jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/nostd/internal/absl/base/policy_checks.h b/jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/nostd/internal/absl/base/policy_checks.h new file mode 100644 index 000000000..02bdda4b6 --- /dev/null +++ b/jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/nostd/internal/absl/base/policy_checks.h @@ -0,0 +1,113 @@ +// Copyright 2017 The Abseil Authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ----------------------------------------------------------------------------- +// File: policy_checks.h +// ----------------------------------------------------------------------------- +// +// This header enforces a minimum set of policies at build time, such as the +// supported compiler and library versions. Unsupported configurations are +// reported with `#error`. This enforcement is best effort, so successfully +// compiling this header does not guarantee a supported configuration. + +#ifndef OTABSL_BASE_POLICY_CHECKS_H_ +#define OTABSL_BASE_POLICY_CHECKS_H_ + +// Included for the __GLIBC_PREREQ macro used below. +#include + +// Included for the _STLPORT_VERSION macro used below. +#if defined(__cplusplus) +#include +#endif + +// ----------------------------------------------------------------------------- +// Operating System Check +// ----------------------------------------------------------------------------- + +#if defined(__CYGWIN__) +#error "Cygwin is not supported." +#endif + +// ----------------------------------------------------------------------------- +// Compiler Check +// ----------------------------------------------------------------------------- + +#if 0 /* FIXME: MG */ +// We support MSVC++ 14.0 update 2 and later. +// This minimum will go up. +#if defined(_MSC_FULL_VER) && _MSC_FULL_VER < 190023918 && !defined(__clang__) +#error "This package requires Visual Studio 2015 Update 2 or higher." +#endif +#endif + +// We support gcc 4.7 and later. +// This minimum will go up. +#if defined(__GNUC__) && !defined(__clang__) +#if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 7) +#error "This package requires gcc 4.7 or higher." +#endif +#endif + +// We support Apple Xcode clang 4.2.1 (version 421.11.65) and later. +// This corresponds to Apple Xcode version 4.5. +// This minimum will go up. +#if defined(__apple_build_version__) && __apple_build_version__ < 4211165 +#error "This package requires __apple_build_version__ of 4211165 or higher." +#endif + +// ----------------------------------------------------------------------------- +// C++ Version Check +// ----------------------------------------------------------------------------- + +// Enforce C++11 as the minimum. Note that Visual Studio has not +// advanced __cplusplus despite being good enough for our purposes, so +// so we exempt it from the check. +#if defined(__cplusplus) && !defined(_MSC_VER) +#if __cplusplus < 201103L +#error "C++ versions less than C++11 are not supported." +#endif +#endif + +// ----------------------------------------------------------------------------- +// Standard Library Check +// ----------------------------------------------------------------------------- + +#if defined(_STLPORT_VERSION) +#error "STLPort is not supported." +#endif + +// ----------------------------------------------------------------------------- +// `char` Size Check +// ----------------------------------------------------------------------------- + +// Abseil currently assumes CHAR_BIT == 8. If you would like to use Abseil on a +// platform where this is not the case, please provide us with the details about +// your platform so we can consider relaxing this requirement. +#if CHAR_BIT != 8 +#error "Abseil assumes CHAR_BIT == 8." +#endif + +// ----------------------------------------------------------------------------- +// `int` Size Check +// ----------------------------------------------------------------------------- + +// Abseil currently assumes that an int is 4 bytes. If you would like to use +// Abseil on a platform where this is not the case, please provide us with the +// details about your platform so we can consider relaxing this requirement. +#if INT_MAX < 2147483647 +#error "Abseil assumes that int is at least 4 bytes. " +#endif + +#endif // OTABSL_BASE_POLICY_CHECKS_H_ diff --git a/jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/nostd/internal/absl/base/port.h b/jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/nostd/internal/absl/base/port.h new file mode 100644 index 000000000..aaba551b5 --- /dev/null +++ b/jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/nostd/internal/absl/base/port.h @@ -0,0 +1,26 @@ +// Copyright 2017 The Abseil Authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// This files is a forwarding header for other headers containing various +// portability macros and functions. +// This file is used for both C and C++! + +#ifndef OTABSL_BASE_PORT_H_ +#define OTABSL_BASE_PORT_H_ + +#include "attributes.h" +#include "config.h" +#include "optimization.h" + +#endif // OTABSL_BASE_PORT_H_ diff --git a/jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/nostd/internal/absl/meta/type_traits.h b/jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/nostd/internal/absl/meta/type_traits.h new file mode 100644 index 000000000..489f6d47f --- /dev/null +++ b/jdbc/extra/otel/opentelemetry-cpp-1.8.3/api/include/opentelemetry/nostd/internal/absl/meta/type_traits.h @@ -0,0 +1,772 @@ +// +// Copyright 2017 The Abseil Authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ----------------------------------------------------------------------------- +// type_traits.h +// ----------------------------------------------------------------------------- +// +// This file contains C++11-compatible versions of standard API +// functions for determining the characteristics of types. Such traits can +// support type inference, classification, and transformation, as well as +// make it easier to write templates based on generic type behavior. +// +// See https://en.cppreference.com/w/cpp/header/type_traits +// +// WARNING: use of many of the constructs in this header will count as "complex +// template metaprogramming", so before proceeding, please carefully consider +// https://google.github.io/styleguide/cppguide.html#Template_metaprogramming +// +// WARNING: using template metaprogramming to detect or depend on API +// features is brittle and not guaranteed. Neither the standard library nor +// Abseil provides any guarantee that APIs are stable in the face of template +// metaprogramming. Use with caution. +#ifndef OTABSL_META_TYPE_TRAITS_H_ +#define OTABSL_META_TYPE_TRAITS_H_ + +#include +#include +#include + +#include "../base/config.h" + +// MSVC constructibility traits do not detect destructor properties and so our +// implementations should not use them as a source-of-truth. +#if defined(_MSC_VER) && !defined(__clang__) && !defined(__GNUC__) +#define OTABSL_META_INTERNAL_STD_CONSTRUCTION_TRAITS_DONT_CHECK_DESTRUCTION 1 +#endif + +namespace absl { +OTABSL_NAMESPACE_BEGIN + +// Defined and documented later on in this file. +template +struct is_trivially_destructible; + +// Defined and documented later on in this file. +template +struct is_trivially_move_assignable; + +namespace type_traits_internal { + +// Silence MSVC warnings about the destructor being defined as deleted. +#if defined(_MSC_VER) && !defined(__GNUC__) +#pragma warning(push) +#pragma warning(disable : 4624) +#endif // defined(_MSC_VER) && !defined(__GNUC__) + +template +union SingleMemberUnion { + T t; +}; + +// Restore the state of the destructor warning that was silenced above. +#if defined(_MSC_VER) && !defined(__GNUC__) +#pragma warning(pop) +#endif // defined(_MSC_VER) && !defined(__GNUC__) + +template +struct IsTriviallyMoveConstructibleObject + : std::integral_constant< + bool, std::is_move_constructible< + type_traits_internal::SingleMemberUnion>::value && + absl::is_trivially_destructible::value> {}; + +template +struct IsTriviallyCopyConstructibleObject + : std::integral_constant< + bool, std::is_copy_constructible< + type_traits_internal::SingleMemberUnion>::value && + absl::is_trivially_destructible::value> {}; + +template +struct IsTriviallyMoveAssignableReference : std::false_type {}; + +template +struct IsTriviallyMoveAssignableReference + : absl::is_trivially_move_assignable::type {}; + +template +struct IsTriviallyMoveAssignableReference + : absl::is_trivially_move_assignable::type {}; + +template +struct VoidTImpl { + using type = void; +}; + +// This trick to retrieve a default alignment is necessary for our +// implementation of aligned_storage_t to be consistent with any implementation +// of std::aligned_storage. +template > +struct default_alignment_of_aligned_storage; + +template +struct default_alignment_of_aligned_storage> { + static constexpr size_t value = Align; +}; + +//////////////////////////////// +// Library Fundamentals V2 TS // +//////////////////////////////// + +// NOTE: The `is_detected` family of templates here differ from the library +// fundamentals specification in that for library fundamentals, `Op` is +// evaluated as soon as the type `is_detected` undergoes +// substitution, regardless of whether or not the `::value` is accessed. That +// is inconsistent with all other standard traits and prevents lazy evaluation +// in larger contexts (such as if the `is_detected` check is a trailing argument +// of a `conjunction`. This implementation opts to instead be lazy in the same +// way that the standard traits are (this "defect" of the detection idiom +// specifications has been reported). + +template class Op, class... Args> +struct is_detected_impl { + using type = std::false_type; +}; + +template