add sqlite code from sqlit-amalgamation-3071602