modules_s/oracle/common.h

00001 /*
00002  * Common definitions.
00003  *
00004  * Copyright (C) 2005 RingCentral Inc.
00005  * Created by Dmitry Semyonov <dsemyonov@ringcentral.com>
00006  *
00007  *
00008  * This file is part of ser, a free SIP server.
00009  *
00010  * ser is free software; you can redistribute it and/or modify
00011  * it under the terms of the GNU General Public License as published by
00012  * the Free Software Foundation; either version 2 of the License, or
00013  * (at your option) any later version
00014  *
00015  * For a license to use the ser software under conditions
00016  * other than those described here, or to purchase support for this
00017  * software, please contact iptel.org by e-mail at the following addresses:
00018  *    info@iptel.org
00019  *
00020  * ser is distributed in the hope that it will be useful,
00021  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00022  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00023  * GNU General Public License for more details.
00024  *
00025  * You should have received a copy of the GNU General Public License 
00026  * along with this program; if not, write to the Free Software 
00027  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00028  */
00029 
00030 #ifndef _COMMON_H_
00031 #define _COMMON_H_
00032 
00033 #define DB_DEBUG    1
00034 
00035 #define DB_PREALLOC_SQLT_HANDLE 1
00036 
00037 /*
00038  * Values are not included directly into the statements,
00039  * so we can safely use relatively small buffer size.
00040  */
00041 #define SQL_STMT_BUFF_SZ    2048
00042 
00043 /* Maximum supported number of columns in a table */
00044 #define ORA_PARAMS_MAX  128
00045 #define ORA_BINDS_MAX   ('z' - 'a' + 1)
00046 
00047 #ifdef DB_DEBUG
00048 #define DBG1(fmt, args...) LOG(L_DBG, fmt, ## args)
00049 #endif
00050 
00051 #warning "\
00052 This module is experimental and may crash SER or create unexpected \
00053 results. You use the module at your own risk. Please submit bugs at \
00054 http://tracker.iptel.org"
00055 
00056 #endif /* _COMMON_H_ */