1/* Copyright (C) 2009-2014 Kentoku Shiba
2
3 This program is free software; you can redistribute it and/or modify
4 it under the terms of the GNU General Public License as published by
5 the Free Software Foundation; version 2 of the License.
6
7 This program is distributed in the hope that it will be useful,
8 but WITHOUT ANY WARRANTY; without even the implied warranty of
9 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 GNU General Public License for more details.
11
12 You should have received a copy of the GNU General Public License
13 along with this program; if not, write to the Free Software
14 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
15
16uint spider_udf_calc_hash(
17 char *key,
18 uint mod
19);
20
21int spider_udf_direct_sql_create_table_list(
22 SPIDER_DIRECT_SQL *direct_sql,
23 char *table_name_list,
24 uint table_name_list_length
25);
26
27int spider_udf_direct_sql_create_conn_key(
28 SPIDER_DIRECT_SQL *direct_sql
29);
30
31SPIDER_CONN *spider_udf_direct_sql_create_conn(
32 const SPIDER_DIRECT_SQL *direct_sql,
33 int *error_num
34);
35
36SPIDER_CONN *spider_udf_direct_sql_get_conn(
37 const SPIDER_DIRECT_SQL *direct_sql,
38 SPIDER_TRX *trx,
39 int *error_num
40);
41
42int spider_udf_direct_sql_get_server(
43 SPIDER_DIRECT_SQL *direct_sql
44);
45
46int spider_udf_parse_direct_sql_param(
47 SPIDER_TRX *trx,
48 SPIDER_DIRECT_SQL *direct_sql,
49 const char *param,
50 int param_length
51);
52
53int spider_udf_set_direct_sql_param_default(
54 SPIDER_TRX *trx,
55 SPIDER_DIRECT_SQL *direct_sql
56);
57
58void spider_udf_free_direct_sql_alloc(
59 SPIDER_DIRECT_SQL *direct_sql,
60 my_bool bg
61);
62
63#ifndef WITHOUT_SPIDER_BG_SEARCH
64int spider_udf_bg_direct_sql(
65 SPIDER_DIRECT_SQL *direct_sql
66);
67#endif
68