api improvement, variable writes in one sql statement.
api improvement, variable reads in one sql statement.