MCPcopy Create free account
hub / github.com/mysql/mysql-connector-python / MySQL_buffered

Function MySQL_buffered

mysql-connector-python/src/mysql_capi.c:557–581  ·  view source on GitHub ↗

Toggle and return whether results are buffered (stored) or not. Return whether the MySQL instance is buffering or storing the results. If a boolean value is specified in the arguments then the instance will be reconfigured. Raises TypeError when the value is not PyBool_type. @param self MySQL instance @param args optional boolean type to toggle buffering @return Boo

Source from the content-addressed store, hash-verified

555 @retval NULL Exception
556*/
557PyObject *
558MySQL_buffered(MySQL *self, PyObject *args)
559{
560 PyObject *value = NULL;
561
562 if (!PyArg_ParseTuple(args, "|O!", &PyBool_Type, &value)) {
563 return NULL;
564 }
565
566 if (value) {
567 if (value == Py_True) {
568 self->buffered = Py_True;
569 }
570 else {
571 self->buffered = Py_False;
572 }
573 }
574
575 if (self->buffered == Py_True) {
576 Py_RETURN_TRUE;
577 }
578 else {
579 Py_RETURN_FALSE;
580 }
581}
582
583/**
584 Toggle and return whether results are converted to Python types or not.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…