** SQL function: shell_module_schema(X) ** ** Return a fake schema for the table-valued function or eponymous virtual ** table X. */
| 1064 | ** table X. |
| 1065 | */ |
| 1066 | static void shellModuleSchema( |
| 1067 | sqlite3_context *pCtx, |
| 1068 | int nVal, |
| 1069 | sqlite3_value **apVal |
| 1070 | ){ |
| 1071 | const char *zName; |
| 1072 | char *zFake; |
| 1073 | UNUSED_PARAMETER(nVal); |
| 1074 | zName = (const char*)sqlite3_value_text(apVal[0]); |
| 1075 | zFake = zName? shellFakeSchema(sqlite3_context_db_handle(pCtx), 0, zName) : 0; |
| 1076 | if( zFake ){ |
| 1077 | sqlite3_result_text(pCtx, sqlite3_mprintf("/* %s */", zFake), |
| 1078 | -1, sqlite3_free); |
| 1079 | free(zFake); |
| 1080 | } |
| 1081 | } |
| 1082 | |
| 1083 | /* |
| 1084 | ** SQL function: shell_add_schema(S,X) |
nothing calls this directly
no test coverage detected