1 #ifndef SQL_TYPE_JSON_INCLUDED
2 #define SQL_TYPE_JSON_INCLUDED
3 /*
4    Copyright (c) 2019, MariaDB
5 
6    This program is free software; you can redistribute it and/or
7    modify it under the terms of the GNU General Public License
8    as published by the Free Software Foundation; version 2 of
9    the License.
10 
11    This program is distributed in the hope that it will be useful,
12    but WITHOUT ANY WARRANTY; without even the implied warranty of
13    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14    GNU General Public License for more details.
15 
16    You should have received a copy of the GNU General Public License
17    along with this program; if not, write to the Free Software
18    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301  USA
19 */
20 
21 #include "mariadb.h"
22 #include "sql_type.h"
23 
24 class Type_handler_json_longtext: public Type_handler_long_blob
25 {
26   Virtual_column_info *make_json_valid_expr(THD *thd,
27                                             const LEX_CSTRING *field_name)
28                                             const;
29 public:
~Type_handler_json_longtext()30   virtual ~Type_handler_json_longtext() {}
31   bool Column_definition_validate_check_constraint(THD *thd,
32                                                    Column_definition *c) const;
33 };
34 
35 extern MYSQL_PLUGIN_IMPORT
36   Type_handler_json_longtext type_handler_json_longtext;
37 
38 #endif // SQL_TYPE_JSON_INCLUDED
39