| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| #ifndef SQLITE_QRF_H |
| #define SQLITE_QRF_H |
| #ifdef __cplusplus |
| extern "C" { |
| #endif |
| #include <stdlib.h> |
| #include "sqlite3.h" |
|
|
| |
| |
| |
| typedef struct sqlite3_qrf_spec sqlite3_qrf_spec; |
| struct sqlite3_qrf_spec { |
| unsigned char iVersion; |
| unsigned char eStyle; |
| unsigned char eEsc; |
| unsigned char eText; |
| unsigned char eTitle; |
| unsigned char eBlob; |
| unsigned char bTitles; |
| unsigned char bWordWrap; |
| unsigned char bTextJsonb; |
| unsigned char eDfltAlign; |
| unsigned char eTitleAlign; |
| unsigned char bSplitColumn; |
| unsigned char bBorder; |
| short int nWrap; |
| short int nScreenWidth; |
| short int nLineLimit; |
| short int nTitleLimit; |
| int nCharLimit; |
| int nWidth; |
| int nAlign; |
| short int *aWidth; |
| unsigned char *aAlign; |
| char *zColumnSep; |
| char *zRowSep; |
| char *zTableName; |
| char *zNull; |
| char *(*xRender)(void*,sqlite3_value*); |
| int (*xWrite)(void*,const char*,sqlite3_int64); |
| void *pRenderArg; |
| void *pWriteArg; |
| char **pzOutput; |
| |
| }; |
|
|
| |
| |
| |
| int sqlite3_format_query_result( |
| sqlite3_stmt *pStmt, |
| const sqlite3_qrf_spec *pSpec, |
| char **pzErr |
| ); |
|
|
| |
| |
| |
| |
| #define QRF_MAX_WIDTH 10000 |
| #define QRF_MIN_WIDTH 0 |
|
|
| |
| |
| |
| #define QRF_STYLE_Auto 0 |
| #define QRF_STYLE_Box 1 |
| #define QRF_STYLE_Column 2 |
| #define QRF_STYLE_Count 3 |
| #define QRF_STYLE_Csv 4 |
| #define QRF_STYLE_Eqp 5 |
| #define QRF_STYLE_Explain 6 |
| #define QRF_STYLE_Html 7 |
| #define QRF_STYLE_Insert 8 |
| #define QRF_STYLE_Json 9 |
| #define QRF_STYLE_JObject 10 |
| #define QRF_STYLE_Line 11 |
| #define QRF_STYLE_List 12 |
| #define QRF_STYLE_Markdown 13 |
| #define QRF_STYLE_Off 14 |
| #define QRF_STYLE_Quote 15 |
| #define QRF_STYLE_Stats 16 |
| #define QRF_STYLE_StatsEst 17 |
| #define QRF_STYLE_StatsVm 18 |
| #define QRF_STYLE_Table 19 |
|
|
| |
| |
| |
| |
| #define QRF_TEXT_Auto 0 |
| #define QRF_TEXT_Plain 1 |
| #define QRF_TEXT_Sql 2 |
| #define QRF_TEXT_Csv 3 |
| #define QRF_TEXT_Html 4 |
| #define QRF_TEXT_Tcl 5 |
| #define QRF_TEXT_Json 6 |
| #define QRF_TEXT_Relaxed 7 |
|
|
| |
| |
| |
| |
| #define QRF_BLOB_Auto 0 |
| #define QRF_BLOB_Text 1 |
| #define QRF_BLOB_Sql 2 |
| #define QRF_BLOB_Hex 3 |
| #define QRF_BLOB_Tcl 4 |
| #define QRF_BLOB_Json 5 |
| #define QRF_BLOB_Size 6 |
|
|
| |
| |
| |
| |
| #define QRF_ESC_Auto 0 |
| #define QRF_ESC_Off 1 |
| #define QRF_ESC_Ascii 2 |
| #define QRF_ESC_Symbol 3 |
|
|
| |
| |
| |
| |
| |
| #define QRF_SW_Auto 0 |
| #define QRF_SW_Off 1 |
| #define QRF_SW_On 2 |
| #define QRF_Auto 0 |
| #define QRF_No 1 |
| #define QRF_Yes 2 |
|
|
| |
| |
| |
| |
| |
| #define QRF_ALIGN_Auto 0 |
| #define QRF_ALIGN_Left 1 |
| #define QRF_ALIGN_Center 2 |
| #define QRF_ALIGN_Right 3 |
| #define QRF_ALIGN_Top 4 |
| #define QRF_ALIGN_NW 5 |
| #define QRF_ALIGN_N 6 |
| #define QRF_ALIGN_NE 7 |
| #define QRF_ALIGN_Middle 8 |
| #define QRF_ALIGN_W 9 |
| #define QRF_ALIGN_C 10 |
| #define QRF_ALIGN_E 11 |
| #define QRF_ALIGN_Bottom 12 |
| #define QRF_ALIGN_SW 13 |
| #define QRF_ALIGN_S 14 |
| #define QRF_ALIGN_SE 15 |
| #define QRF_ALIGN_HMASK 3 |
| #define QRF_ALIGN_VMASK 12 |
|
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| int sqlite3_qrf_wcwidth(int c); |
|
|
| |
| |
| |
| |
| |
| |
| size_t sqlite3_qrf_wcswidth(const char*); |
|
|
|
|
| #ifdef __cplusplus |
| } |
| #endif |
| #endif |
|
|