| 748 | }; |
| 749 | |
| 750 | void db_sqlite::show_conf(const char* pragma /* = NULL */) |
| 751 | { |
| 752 | if (db_ == NULL) { |
| 753 | logger_error("db not open yet!"); |
| 754 | return; |
| 755 | } |
| 756 | |
| 757 | string buf; |
| 758 | |
| 759 | if (pragma != NULL) { |
| 760 | if (get_conf(pragma, buf) != NULL) { |
| 761 | printf("%s: %s\r\n", pragma, buf.c_str()); |
| 762 | } else { |
| 763 | printf("%s: UNKNOWN\r\n", pragma); |
| 764 | } |
| 765 | return; |
| 766 | } |
| 767 | |
| 768 | int i; |
| 769 | for (i = 0; __pragmas[i] != NULL; i++) { |
| 770 | if (get_conf(__pragmas[i], buf) != NULL) { |
| 771 | printf("%s: %s\r\n", __pragmas[i], buf.c_str()); |
| 772 | } else { |
| 773 | printf("%s: UNKNOWN\r\n", __pragmas[i]); |
| 774 | } |
| 775 | } |
| 776 | } |
| 777 | |
| 778 | bool db_sqlite::tbl_exists(const char* tbl_name) |
| 779 | { |