jbrodriguez/react-native-android-sqlite

sqlite.close not found

rhaker opened this issue · 1 comments

Thanks for putting this together. I'm just doing some initial tests and it seems that sqlite.close is not found in the current build. It exists in DBManager.java, but not in your javascript module definition.

If I add the following code to index.android.js, the function is found:

close: function(
        callback?: ?(error: ?Error, result: ?string) => void
    ): Promise {
        return new Promise((resolve, reject) => {
            DBManager.close(function(errors, result) {
                callback && callback((errors && convertError(errors[0])) || null, result);
                if (errors) {
                    reject(convertError(errors[0]));
                } else {
                    resolve(result)
                }
            });
        });
    },

All the best.

@rhaker, you're absolutely right.

This is fixed in 8b5d08c .

Thanks a lot for raising the issue.