| 8735 | }; |
| 8736 | |
| 8737 | static char *expertDequote(const char *zIn){ |
| 8738 | int n = STRLEN(zIn); |
| 8739 | char *zRet = sqlite3_malloc(n); |
| 8740 | |
| 8741 | assert( zIn[0]=='\'' ); |
| 8742 | assert( zIn[n-1]=='\'' ); |
| 8743 | |
| 8744 | if( zRet ){ |
| 8745 | int iOut = 0; |
| 8746 | int iIn = 0; |
| 8747 | for(iIn=1; iIn<(n-1); iIn++){ |
| 8748 | if( zIn[iIn]=='\'' ){ |
| 8749 | assert( zIn[iIn+1]=='\'' ); |
| 8750 | iIn++; |
| 8751 | } |
| 8752 | zRet[iOut++] = zIn[iIn]; |
| 8753 | } |
| 8754 | zRet[iOut] = '\0'; |
| 8755 | } |
| 8756 | |
| 8757 | return zRet; |
| 8758 | } |
| 8759 | |
| 8760 | /* |
| 8761 | ** This function is the implementation of both the xConnect and xCreate |