Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Remove broken row_seek() and row_tell() #220

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 21, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 0 additions & 52 deletions 52 _mysql.c
Original file line number Diff line number Diff line change
Expand Up @@ -2166,46 +2166,6 @@ _mysql_ResultObject_data_seek(
return Py_None;
}

static char _mysql_ResultObject_row_seek__doc__[] =
"row_seek(n) -- seek by offset n rows of result set";
static PyObject *
_mysql_ResultObject_row_seek(
_mysql_ResultObject *self,
PyObject *args)
{
int offset;
MYSQL_ROW_OFFSET r;
if (!PyArg_ParseTuple(args, "i:row_seek", &offset)) return NULL;
check_result_connection(self);
if (self->use) {
PyErr_SetString(_mysql_ProgrammingError,
"cannot be used with connection.use_result()");
return NULL;
}
r = mysql_row_tell(self->result);
mysql_row_seek(self->result, r+offset);
Py_INCREF(Py_None);
return Py_None;
}

static char _mysql_ResultObject_row_tell__doc__[] =
"row_tell() -- return the current row number of the result set.";
static PyObject *
_mysql_ResultObject_row_tell(
_mysql_ResultObject *self,
PyObject *noargs)
{
MYSQL_ROW_OFFSET r;
check_result_connection(self);
if (self->use) {
PyErr_SetString(_mysql_ProgrammingError,
"cannot be used with connection.use_result()");
return NULL;
}
r = mysql_row_tell(self->result);
return PyInt_FromLong(r-self->result->data->data);
}

static void
_mysql_ResultObject_dealloc(
_mysql_ResultObject *self)
Expand Down Expand Up @@ -2504,18 +2464,6 @@ static PyMethodDef _mysql_ResultObject_methods[] = {
METH_VARARGS,
_mysql_ResultObject_data_seek__doc__
},
{
"row_seek",
(PyCFunction)_mysql_ResultObject_row_seek,
METH_VARARGS,
_mysql_ResultObject_row_seek__doc__
},
{
"row_tell",
(PyCFunction)_mysql_ResultObject_row_tell,
METH_NOARGS,
_mysql_ResultObject_row_tell__doc__
},
{
"describe",
(PyCFunction)_mysql_ResultObject_describe,
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.