summaryrefslogtreecommitdiff
path: root/sql/sql_schema.h
diff options
context:
space:
mode:
Diffstat (limited to 'sql/sql_schema.h')
-rw-r--r--sql/sql_schema.h32
1 files changed, 32 insertions, 0 deletions
diff --git a/sql/sql_schema.h b/sql/sql_schema.h
index 7c8f284d526..36914e36990 100644
--- a/sql/sql_schema.h
+++ b/sql/sql_schema.h
@@ -19,6 +19,9 @@
#include "mysqld.h"
#include "lex_string.h"
+class Lex_ident_sys;
+class Create_func;
+
class Schema
{
LEX_CSTRING m_name;
@@ -33,6 +36,34 @@ public:
{
return src;
}
+
+
+ /**
+ Find the native function builder associated with a given function name.
+ @param thd The current thread
+ @param name The native function name
+ @return The native function builder associated with the name, or NULL
+ */
+ virtual Create_func *find_native_function_builder(THD *thd,
+ const LEX_CSTRING &name)
+ const;
+ /**
+ Find a native function builder, return an error if not found,
+ build an Item otherwise.
+ */
+ Item *make_item_func_call_native(THD *thd,
+ const Lex_ident_sys &name,
+ List<Item> *args) const;
+
+ // Builders for native SQL function with a special syntax in sql_yacc.yy
+ virtual Item *make_item_func_substr(THD *thd,
+ const Lex_substring_spec_st &spec) const;
+
+ virtual Item *make_item_func_trim(THD *thd, const Lex_trim_st &spec) const;
+ virtual Item *make_item_func_replace(THD *thd,
+ Item *subj,
+ Item *find,
+ Item *replace) const;
/*
For now we have *hard-coded* compatibility schemas:
schema_mariadb, schema_oracle, schema_maxdb.
@@ -66,5 +97,6 @@ public:
extern Schema mariadb_schema;
+extern const Schema &oracle_schema_ref;
#endif // SQL_SCHEMA_H_INCLUDED