/*
Copyright ( c ) 2026 , MariaDB Foundation .
Copyright ( c ) 2026 , Roman Nozdrin < drrtuy @ gmail . com >
Copyright ( c ) 2026 , Leonid Fedorov .
This program is free software ; you can redistribute it and / or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation ; version 2 of the License .
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 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 - 1335 USA
*/
#pragma once
#include <cstddef>
#include <cstdint>
#include <memory>
#include <string>
#include "duckdb.hpp"
#include "duckdb/main/connection.hpp"
class THD;
namespace myduck
{
enum class SqlRegionType
{
NONE,
COMMENT,
QUOTED,
UNTERMINATED
};
SqlRegionType scan_sql_region(const std::string &sql, size_t start,
bool backslash_escapes, size_t &end);
bool mariadb_query_has_unsafe_quote_escape(THD *thd, const char *query,
size_t length);
duckdb::unique_ptr<duckdb::MaterializedQueryResult>
duckdb_query(duckdb::Connection &connection, const std::string &query);
duckdb::unique_ptr<duckdb::QueryResult>
duckdb_stream_query(duckdb::Connection &connection, const std::string &query);
duckdb::unique_ptr<duckdb::MaterializedQueryResult>
duckdb_query(THD *thd, const std::string &query, bool need_config= true );
duckdb::unique_ptr<duckdb::QueryResult>
duckdb_stream_query(THD *thd, const std::string &query,
bool need_config= true );
duckdb::unique_ptr<duckdb::MaterializedQueryResult>
duckdb_query(const std::string &query);
} // namespace myduck
Messung V0.5 in Prozent C=97 H=100 G=98
¤ Dauer der Verarbeitung: 0.13 Sekunden
(vorverarbeitet am 2026-10-08)
¤
*© Formatika GbR, Deutschland