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
| 555 | @retval NULL Exception |
| 556 | */ |
| 557 | PyObject * |
| 558 | MySQL_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. |
nothing calls this directly
no outgoing calls
no test coverage detected
searching dependent graphs…