OceanBase Plugin Interface
更多...
|
OBP_PUBLIC_API void * | obp_malloc (int64_t size) |
| malloc interface with alignment
|
|
OBP_PUBLIC_API void * | obp_malloc_align (int64_t alignment, int64_t size) |
| free memory
|
|
OBP_PUBLIC_API void | obp_free (void *ptr) |
|
OBP_PUBLIC_API void * | obp_allocate (ObPluginAllocatorPtr allocator, int64_t size) |
| allocate memory with the specific allocator
|
|
OBP_PUBLIC_API void * | obp_allocate_align (ObPluginAllocatorPtr allocator, int64_t alignment, int64_t size) |
| free memory
|
|
OBP_PUBLIC_API void | obp_deallocate (ObPluginAllocatorPtr allocator, void *ptr) |
|
OBP_PUBLIC_API int | obp_charset_is_utf8mb4 (ObPluginCharsetInfoPtr cs) |
| Test whether this is utf8 charset
|
|
OBP_PUBLIC_API const char * | obp_charset_csname (ObPluginCharsetInfoPtr cs) |
|
OBP_PUBLIC_API int | obp_charset_ctype (ObPluginCharsetInfoPtr cs, int *ctype, const unsigned char *str, const unsigned char *end) |
| Get the ctype of the char
|
|
OBP_PUBLIC_API size_t | obp_charset_numchars (ObPluginCharsetInfoPtr cs, const char *str, const char *end) |
| Count the char number in the string
|
|
OBP_PUBLIC_API int | obp_log_enabled (int32_t level) |
| test if we should output the log with specific level
|
|
OBP_PUBLIC_API void | obp_log_format (int32_t level, const char *filename, int32_t lineno, const char *location_string, int64_t location_string_size, const char *function, const char *format,...) __attribute__((format(printf |
| logging
|
|
OceanBase Plugin Interface
◆ OBP_LOG
#define OBP_LOG |
( |
| level, |
|
|
| fmt, |
|
|
| args... ) |
值: do { \
__FILE__, \
__LINE__, \
__FUNCTION__, \
fmt, \
##args); \
} \
} while (0)
OBP_PUBLIC_API int obp_log_enabled(int32_t level)
test if we should output the log with specific level
const int OBP_SUCCESS
this is the adaptor errno of oceanbase errno
OBP_PUBLIC_API void obp_log_format(int32_t level, const char *filename, int32_t lineno, const char *location_string, int64_t location_string_size, const char *function, const char *format,...) __attribute__((format(printf
logging
#define OBP_STRINGIZE(str)
logging macro
在文件 ob_plugin_log.h 第 61 行定义.
◆ OBP_LOG_INFO
#define OBP_LOG_INFO |
( |
| fmt, |
|
|
| args... ) |
◆ OBP_LOG_TRACE
#define OBP_LOG_TRACE |
( |
| fmt, |
|
|
| args... ) |
◆ OBP_LOG_WARN
#define OBP_LOG_WARN |
( |
| fmt, |
|
|
| args... ) |
◆ ObPluginAllocatorPtr
◆ ObPluginCharsetInfoPtr
◆ ObPluginLogLevel
Log Level
枚举值 |
---|
OBP_LOG_LEVEL_TRACE | |
OBP_LOG_LEVEL_INFO | |
OBP_LOG_LEVEL_WARN | |
在文件 ob_plugin_log.h 第 30 行定义.
◆ obp_allocate()
allocate memory with the specific allocator
you can get allocator from specific plugin interface, such as FTParser
- 注解
- A valid allocator always has a memory label allocate memory with alignment parameter
◆ obp_allocate_align()
◆ obp_charset_csname()
◆ obp_charset_ctype()
Get the ctype of the char
- 参数
-
[in] | cs | The charset |
[out] | ctype | The char type. Refer to ObPluginCharType for details. |
[in] | str | The beginning of the string. |
[in] | end | The end of the string(not inclusive). |
- 返回
- The byte number of the char(> 0) or error.
◆ obp_charset_is_utf8mb4()
Test whether this is utf8
charset
◆ obp_charset_numchars()
Count the char number in the string
- 参数
-
[in] | cs | The charset |
[in] | str | The beginning of the string. |
[in] | end | The end of the string(not inclusive). |
◆ obp_deallocate()
◆ obp_free()
◆ obp_log_enabled()
test if we should output the log with specific level
- 注解
- you shouldn't call this routine
- 返回
- OBP_SUCCESS enabled
- others not enabled
◆ obp_log_format()
OBP_PUBLIC_API void obp_log_format |
( |
int32_t | level, |
|
|
const char * | filename, |
|
|
int32_t | lineno, |
|
|
const char * | location_string, |
|
|
int64_t | location_string_size, |
|
|
const char * | function, |
|
|
const char * | format, |
|
|
| ... ) |
logging
- 注解
- you should use OBP_LOG_xxx instead
◆ obp_malloc()
malloc interface with alignment
◆ obp_malloc_align()
OBP_PUBLIC_API void * obp_malloc_align |
( |
int64_t | alignment, |
|
|
int64_t | size ) |
◆ OBP_ALLOCATE_MEMORY_FAILED
const int OBP_ALLOCATE_MEMORY_FAILED = -4013 |
◆ OBP_INIT_TWICE
const int OBP_INIT_TWICE = -4005 |
◆ OBP_INVALID_ARGUMENT
const int OBP_INVALID_ARGUMENT = -4002 |
◆ OBP_ITER_END
const int OBP_ITER_END = -4008 |
◆ OBP_NOT_INIT
const int OBP_NOT_INIT = -4006 |
◆ OBP_NOT_SUPPORTED
const int OBP_NOT_SUPPORTED = -4007 |
◆ OBP_PLUGIN_ERROR
const int OBP_PLUGIN_ERROR = -11078 |
◆ OBP_SUCCESS
const int OBP_SUCCESS = 0 |
◆ ObPluginCharType