/* call-seq: SQLite3::Backup#step(nPage)
*
* Copy database pages up to +nPage+.
* If negative, copy all remaining source pages.
*
* If all pages are copied, it returns SQLite3::Constants::ErrorCode::DONE.
* When coping is not done, it returns SQLite3::Constants::ErrorCode::OK.
* When some errors occur, it returns the error code.
*/
static VALUE step(VALUE self, VALUE nPage)
{
sqlite3BackupRubyPtr ctx;
int status;
Data_Get_Struct(self, sqlite3BackupRuby, ctx);
REQUIRE_OPEN_BACKUP(ctx);
status = sqlite3_backup_step(ctx->p, NUM2INT(nPage));
return INT2NUM(status);
}