adbc_xptr_move()allocates a fresh R object and moves all values pointed to byxinto it. The original R object is invalidated by zeroing its content. This is useful when returning from a function where lifecycle helpers were used to manage the original object.adbc_xptr_is_valid()provides a means by which to test for an invalidated pointer.
Value
adbc_xptr_move(): A freshly-allocated R object identical toxadbc_xptr_is_valid(): Returns FALSE if the ADBC object pointed to byxhas been invalidated.
Examples
db <- adbc_database_init(adbc_driver_void())
adbc_xptr_is_valid(db)
#> [1] TRUE
db_new <- adbc_xptr_move(db)
adbc_xptr_is_valid(db)
#> [1] FALSE
adbc_xptr_is_valid(db_new)
#> [1] TRUE