Generated by Cython 3.0.9

Yellow lines hint at Python interaction.
Click on a line that starts with a "+" to see the C code that Cython generated for it.

Raw output: ingress.c

+0001: ################################################################################
  __pyx_t_19 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_19);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_19) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
 0002: ##     ___                  _   ____  ____
 0003: ##    / _ \ _   _  ___  ___| |_|  _ \| __ )
 0004: ##   | | | | | | |/ _ \/ __| __| | | |  _ \
 0005: ##   | |_| | |_| |  __/\__ \ |_| |_| | |_) |
 0006: ##    \__\_\\__,_|\___||___/\__|____/|____/
 0007: ##
 0008: ##  Copyright (c) 2014-2019 Appsicle
 0009: ##  Copyright (c) 2019-2024 QuestDB
 0010: ##
 0011: ##  Licensed under the Apache License, Version 2.0 (the "License");
 0012: ##  you may not use this file except in compliance with the License.
 0013: ##  You may obtain a copy of the License at
 0014: ##
 0015: ##  http://www.apache.org/licenses/LICENSE-2.0
 0016: ##
 0017: ##  Unless required by applicable law or agreed to in writing, software
 0018: ##  distributed under the License is distributed on an "AS IS" BASIS,
 0019: ##  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 0020: ##  See the License for the specific language governing permissions and
 0021: ##  limitations under the License.
 0022: ##
 0023: ################################################################################
 0024: 
 0025: # distutils: language=c
 0026: # cython: language_level=3
 0027: # cython: binding=True
 0028: 
 0029: """
 0030: API for fast data ingestion into QuestDB.
 0031: """
 0032: 
+0033: __all__ = [
  __pyx_t_2 = PyList_New(9); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 33, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_u_Buffer);
  __Pyx_GIVEREF(__pyx_n_u_Buffer);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_u_Buffer)) __PYX_ERR(0, 33, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_u_IngressError);
  __Pyx_GIVEREF(__pyx_n_u_IngressError);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 1, __pyx_n_u_IngressError)) __PYX_ERR(0, 33, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_u_IngressErrorCode);
  __Pyx_GIVEREF(__pyx_n_u_IngressErrorCode);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 2, __pyx_n_u_IngressErrorCode)) __PYX_ERR(0, 33, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_u_Protocol);
  __Pyx_GIVEREF(__pyx_n_u_Protocol);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 3, __pyx_n_u_Protocol)) __PYX_ERR(0, 33, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_u_Sender);
  __Pyx_GIVEREF(__pyx_n_u_Sender);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 4, __pyx_n_u_Sender)) __PYX_ERR(0, 33, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_u_ServerTimestamp_2);
  __Pyx_GIVEREF(__pyx_n_u_ServerTimestamp_2);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 5, __pyx_n_u_ServerTimestamp_2)) __PYX_ERR(0, 33, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_u_TimestampMicros_2);
  __Pyx_GIVEREF(__pyx_n_u_TimestampMicros_2);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 6, __pyx_n_u_TimestampMicros_2)) __PYX_ERR(0, 33, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_u_TimestampNanos_2);
  __Pyx_GIVEREF(__pyx_n_u_TimestampNanos_2);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 7, __pyx_n_u_TimestampNanos_2)) __PYX_ERR(0, 33, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_u_TlsCa);
  __Pyx_GIVEREF(__pyx_n_u_TlsCa);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 8, __pyx_n_u_TlsCa)) __PYX_ERR(0, 33, __pyx_L1_error);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_all, __pyx_t_2) < 0) __PYX_ERR(0, 33, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 0034:     'Buffer',
 0035:     'IngressError',
 0036:     'IngressErrorCode',
 0037:     'Protocol',
 0038:     'Sender',
 0039:     'ServerTimestamp',
 0040:     'TimestampMicros',
 0041:     'TimestampNanos',
 0042:     'TlsCa',
 0043: ]
 0044: 
 0045: # For prototypes: https://github.com/cython/cython/tree/master/Cython/Includes
 0046: from libc.stdint cimport uint8_t, uint64_t, int64_t, uint32_t, uintptr_t, \
 0047:     INT64_MAX, INT64_MIN
 0048: from libc.stdlib cimport malloc, calloc, realloc, free, abort, qsort
 0049: from libc.string cimport strncmp, memset
 0050: from libc.math cimport isnan
 0051: from libc.errno cimport errno
 0052: # from libc.stdio cimport stderr, fprintf
 0053: from cpython.datetime cimport datetime, timedelta
 0054: from cpython.bool cimport bool
 0055: from cpython.weakref cimport PyWeakref_NewRef, PyWeakref_GetObject
 0056: from cpython.object cimport PyObject
 0057: from cpython.buffer cimport Py_buffer, PyObject_CheckBuffer, \
 0058:     PyObject_GetBuffer, PyBuffer_Release, PyBUF_SIMPLE
 0059: from cpython.memoryview cimport PyMemoryView_FromMemory
 0060: 
 0061: from .line_sender cimport *
 0062: from .pystr_to_utf8 cimport *
 0063: from .conf_str cimport *
 0064: from .arrow_c_data_interface cimport *
 0065: from .extra_cpython cimport *
 0066: from .ingress_helper cimport *
 0067: 
 0068: # An int we use only for error reporting.
 0069: #  0 is success.
 0070: # -1 is failure.
 0071: ctypedef int void_int
 0072: 
 0073: import cython
 0074: include "dataframe.pxi"
 0075: 
 0076: 
+0077: from enum import Enum
  __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 77, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_n_s_Enum);
  __Pyx_GIVEREF(__pyx_n_s_Enum);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 0, __pyx_n_s_Enum)) __PYX_ERR(0, 77, __pyx_L1_error);
  __pyx_t_15 = __Pyx_Import(__pyx_n_s_enum, __pyx_t_3, 0); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 77, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_15);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_ImportFrom(__pyx_t_15, __pyx_n_s_Enum); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 77, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Enum, __pyx_t_3) < 0) __PYX_ERR(0, 77, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
+0078: from typing import List, Tuple, Dict, Union, Any, Optional, Callable, \
  __pyx_t_15 = PyList_New(8); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 78, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_15);
  __Pyx_INCREF(__pyx_n_s_List);
  __Pyx_GIVEREF(__pyx_n_s_List);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_15, 0, __pyx_n_s_List)) __PYX_ERR(0, 78, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_s_Tuple);
  __Pyx_GIVEREF(__pyx_n_s_Tuple);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_15, 1, __pyx_n_s_Tuple)) __PYX_ERR(0, 78, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_s_Dict);
  __Pyx_GIVEREF(__pyx_n_s_Dict);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_15, 2, __pyx_n_s_Dict)) __PYX_ERR(0, 78, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_s_Union);
  __Pyx_GIVEREF(__pyx_n_s_Union);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_15, 3, __pyx_n_s_Union)) __PYX_ERR(0, 78, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_s_Any);
  __Pyx_GIVEREF(__pyx_n_s_Any);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_15, 4, __pyx_n_s_Any)) __PYX_ERR(0, 78, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_s_Optional);
  __Pyx_GIVEREF(__pyx_n_s_Optional);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_15, 5, __pyx_n_s_Optional)) __PYX_ERR(0, 78, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_s_Callable);
  __Pyx_GIVEREF(__pyx_n_s_Callable);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_15, 6, __pyx_n_s_Callable)) __PYX_ERR(0, 78, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_s_Iterable);
  __Pyx_GIVEREF(__pyx_n_s_Iterable);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_15, 7, __pyx_n_s_Iterable)) __PYX_ERR(0, 78, __pyx_L1_error);
  __pyx_t_3 = __Pyx_Import(__pyx_n_s_typing, __pyx_t_15, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 78, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
  __pyx_t_15 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_List); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 78, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_15);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_List, __pyx_t_15) < 0) __PYX_ERR(0, 78, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
  __pyx_t_15 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_Tuple); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 78, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_15);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Tuple, __pyx_t_15) < 0) __PYX_ERR(0, 78, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
  __pyx_t_15 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_Dict); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 78, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_15);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Dict, __pyx_t_15) < 0) __PYX_ERR(0, 78, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
  __pyx_t_15 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_Union); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 78, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_15);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Union, __pyx_t_15) < 0) __PYX_ERR(0, 78, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
  __pyx_t_15 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_Any); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 78, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_15);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Any, __pyx_t_15) < 0) __PYX_ERR(0, 78, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
  __pyx_t_15 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_Optional); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 78, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_15);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Optional, __pyx_t_15) < 0) __PYX_ERR(0, 78, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
  __pyx_t_15 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_Callable); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 78, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_15);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Callable, __pyx_t_15) < 0) __PYX_ERR(0, 78, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
  __pyx_t_15 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_Iterable); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 78, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_15);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Iterable, __pyx_t_15) < 0) __PYX_ERR(0, 79, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 0079:     Iterable
+0080: import pathlib
  __pyx_t_3 = __Pyx_ImportDottedModule(__pyx_n_s_pathlib, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 80, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pathlib, __pyx_t_3) < 0) __PYX_ERR(0, 80, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 0081: 
+0082: import sys
  __pyx_t_3 = __Pyx_ImportDottedModule(__pyx_n_s_sys, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 82, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_sys, __pyx_t_3) < 0) __PYX_ERR(0, 82, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+0083: import os
  __pyx_t_3 = __Pyx_ImportDottedModule(__pyx_n_s_os, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 83, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_os, __pyx_t_3) < 0) __PYX_ERR(0, 83, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 0084: 
 0085: 
 0086: # This value is automatically updated by the `bump2version` tool.
 0087: # If you need to update it, also update the search definition in
 0088: # .bumpversion.cfg.
+0089: VERSION = '2.0.0'
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_VERSION, __pyx_kp_u_2_0_0) < 0) __PYX_ERR(0, 89, __pyx_L1_error)
 0090: 
 0091: 
+0092: cdef bint _has_gil(PyThreadState** gs):
static int __pyx_f_7questdb_7ingress__has_gil(PyThreadState **__pyx_v_gs) {
  int __pyx_r;
/* … */
  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}
+0093:     return gs[0] == NULL
  __pyx_r = ((__pyx_v_gs[0]) == NULL);
  goto __pyx_L0;
 0094: 
 0095: 
+0096: cdef bint _ensure_doesnt_have_gil(PyThreadState** gs):
static int __pyx_f_7questdb_7ingress__ensure_doesnt_have_gil(PyThreadState **__pyx_v_gs) {
  int __pyx_r;
/* … */
  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("questdb.ingress._ensure_doesnt_have_gil", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  return __pyx_r;
}
 0097:     """Returns True if previously had the GIL, False otherwise."""
+0098:     if _has_gil(gs):
  __pyx_t_1 = __pyx_f_7questdb_7ingress__has_gil(__pyx_v_gs); if (unlikely(__pyx_t_1 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 98, __pyx_L1_error)
  if (__pyx_t_1) {
/* … */
  }
+0099:         gs[0] = PyEval_SaveThread()
    (__pyx_v_gs[0]) = PyEval_SaveThread();
+0100:         return True
    __pyx_r = 1;
    goto __pyx_L0;
+0101:     return False
  __pyx_r = 0;
  goto __pyx_L0;
 0102: 
 0103: 
+0104: cdef void _ensure_has_gil(PyThreadState** gs):
static void __pyx_f_7questdb_7ingress__ensure_has_gil(PyThreadState **__pyx_v_gs) {
/* … */
  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("questdb.ingress._ensure_has_gil", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
}
+0105:     if not _has_gil(gs):
  __pyx_t_1 = __pyx_f_7questdb_7ingress__has_gil(__pyx_v_gs); if (unlikely(__pyx_t_1 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 105, __pyx_L1_error)
  __pyx_t_2 = (!__pyx_t_1);
  if (__pyx_t_2) {
/* … */
  }
+0106:         PyEval_RestoreThread(gs[0])
    PyEval_RestoreThread((__pyx_v_gs[0]));
+0107:         gs[0] = NULL
    (__pyx_v_gs[0]) = NULL;
 0108: 
 0109: 
+0110: class IngressErrorCode(Enum):
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_Enum); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 110, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_15 = PyTuple_New(1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 110, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_15);
  __Pyx_GIVEREF(__pyx_t_3);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_3)) __PYX_ERR(0, 110, __pyx_L1_error);
  __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PEP560_update_bases(__pyx_t_15); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 110, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_19 = __Pyx_CalculateMetaclass(NULL, __pyx_t_3); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 110, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_19);
  __pyx_t_18 = __Pyx_Py3MetaclassPrepare(__pyx_t_19, __pyx_t_3, __pyx_n_s_IngressErrorCode, __pyx_n_s_IngressErrorCode, (PyObject *) NULL, __pyx_n_s_questdb_ingress, __pyx_kp_s_Category_of_Error); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 110, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_18);
  if (__pyx_t_3 != __pyx_t_15) {
    if (unlikely((PyDict_SetItemString(__pyx_t_18, "__orig_bases__", __pyx_t_15) < 0))) __PYX_ERR(0, 110, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
/* … */
  __pyx_t_20 = __Pyx_Py3ClassCreate(__pyx_t_19, __pyx_n_s_IngressErrorCode, __pyx_t_3, __pyx_t_18, NULL, 0, 0); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 110, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_20);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_IngressErrorCode, __pyx_t_20) < 0) __PYX_ERR(0, 110, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
  __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 0111:     """Category of Error."""
+0112:     CouldNotResolveAddr = line_sender_error_could_not_resolve_addr
  __pyx_t_15 = __Pyx_PyInt_From_enum__line_sender_error_code(line_sender_error_could_not_resolve_addr); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 112, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_15);
  if (__Pyx_SetNameInClass(__pyx_t_18, __pyx_n_s_CouldNotResolveAddr, __pyx_t_15) < 0) __PYX_ERR(0, 112, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
+0113:     InvalidApiCall = line_sender_error_invalid_api_call
  __pyx_t_15 = __Pyx_PyInt_From_enum__line_sender_error_code(line_sender_error_invalid_api_call); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 113, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_15);
  if (__Pyx_SetNameInClass(__pyx_t_18, __pyx_n_s_InvalidApiCall, __pyx_t_15) < 0) __PYX_ERR(0, 113, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
+0114:     SocketError = line_sender_error_socket_error
  __pyx_t_15 = __Pyx_PyInt_From_enum__line_sender_error_code(line_sender_error_socket_error); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 114, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_15);
  if (__Pyx_SetNameInClass(__pyx_t_18, __pyx_n_s_SocketError, __pyx_t_15) < 0) __PYX_ERR(0, 114, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
+0115:     InvalidUtf8 = line_sender_error_invalid_utf8
  __pyx_t_15 = __Pyx_PyInt_From_enum__line_sender_error_code(line_sender_error_invalid_utf8); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 115, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_15);
  if (__Pyx_SetNameInClass(__pyx_t_18, __pyx_n_s_InvalidUtf8, __pyx_t_15) < 0) __PYX_ERR(0, 115, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
+0116:     InvalidName = line_sender_error_invalid_name
  __pyx_t_15 = __Pyx_PyInt_From_enum__line_sender_error_code(line_sender_error_invalid_name); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 116, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_15);
  if (__Pyx_SetNameInClass(__pyx_t_18, __pyx_n_s_InvalidName, __pyx_t_15) < 0) __PYX_ERR(0, 116, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
+0117:     InvalidTimestamp = line_sender_error_invalid_timestamp
  __pyx_t_15 = __Pyx_PyInt_From_enum__line_sender_error_code(line_sender_error_invalid_timestamp); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 117, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_15);
  if (__Pyx_SetNameInClass(__pyx_t_18, __pyx_n_s_InvalidTimestamp, __pyx_t_15) < 0) __PYX_ERR(0, 117, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
+0118:     AuthError = line_sender_error_auth_error
  __pyx_t_15 = __Pyx_PyInt_From_enum__line_sender_error_code(line_sender_error_auth_error); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 118, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_15);
  if (__Pyx_SetNameInClass(__pyx_t_18, __pyx_n_s_AuthError, __pyx_t_15) < 0) __PYX_ERR(0, 118, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
+0119:     TlsError = line_sender_error_tls_error
  __pyx_t_15 = __Pyx_PyInt_From_enum__line_sender_error_code(line_sender_error_tls_error); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 119, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_15);
  if (__Pyx_SetNameInClass(__pyx_t_18, __pyx_n_s_TlsError, __pyx_t_15) < 0) __PYX_ERR(0, 119, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
+0120:     HttpNotSupported = line_sender_error_http_not_supported
  __pyx_t_15 = __Pyx_PyInt_From_enum__line_sender_error_code(line_sender_error_http_not_supported); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 120, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_15);
  if (__Pyx_SetNameInClass(__pyx_t_18, __pyx_n_s_HttpNotSupported, __pyx_t_15) < 0) __PYX_ERR(0, 120, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
+0121:     ServerFlushError = line_sender_error_server_flush_error
  __pyx_t_15 = __Pyx_PyInt_From_enum__line_sender_error_code(line_sender_error_server_flush_error); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 121, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_15);
  if (__Pyx_SetNameInClass(__pyx_t_18, __pyx_n_s_ServerFlushError, __pyx_t_15) < 0) __PYX_ERR(0, 121, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
+0122:     ConfigError = line_sender_error_config_error
  __pyx_t_15 = __Pyx_PyInt_From_enum__line_sender_error_code(line_sender_error_config_error); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 122, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_15);
  if (__Pyx_SetNameInClass(__pyx_t_18, __pyx_n_s_ConfigError, __pyx_t_15) < 0) __PYX_ERR(0, 122, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
+0123:     BadDataFrame = <int>line_sender_error_server_flush_error + 1
  __pyx_t_15 = __Pyx_PyInt_From_long((((int)line_sender_error_server_flush_error) + 1)); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 123, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_15);
  if (__Pyx_SetNameInClass(__pyx_t_18, __pyx_n_s_BadDataFrame, __pyx_t_15) < 0) __PYX_ERR(0, 123, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
 0124: 
+0125:     def __str__(self) -> str:
/* Python wrapper */
static PyObject *__pyx_pw_7questdb_7ingress_16IngressErrorCode_1__str__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7questdb_7ingress_16IngressErrorCode___str__, "Return the name of the enum.");
static PyMethodDef __pyx_mdef_7questdb_7ingress_16IngressErrorCode_1__str__ = {"__str__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7questdb_7ingress_16IngressErrorCode_1__str__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7questdb_7ingress_16IngressErrorCode___str__};
static PyObject *__pyx_pw_7questdb_7ingress_16IngressErrorCode_1__str__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,0};
  PyObject* values[1] = {0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 125, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__str__") < 0)) __PYX_ERR(0, 125, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__str__", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 125, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("questdb.ingress.IngressErrorCode.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7questdb_7ingress_16IngressErrorCode___str__(__pyx_self, __pyx_v_self);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7questdb_7ingress_16IngressErrorCode___str__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
/* … */
  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("questdb.ingress.IngressErrorCode.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
/* … */
  __pyx_tuple__48 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__48)) __PYX_ERR(0, 125, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__48);
  __Pyx_GIVEREF(__pyx_tuple__48);
/* … */
  __pyx_t_15 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 125, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_15);
  if (PyDict_SetItem(__pyx_t_15, __pyx_n_s_return, __pyx_n_s_str) < 0) __PYX_ERR(0, 125, __pyx_L1_error)
  __pyx_t_20 = __Pyx_CyFunction_New(&__pyx_mdef_7questdb_7ingress_16IngressErrorCode_1__str__, 0, __pyx_n_s_IngressErrorCode___str, NULL, __pyx_n_s_questdb_ingress, __pyx_d, ((PyObject *)__pyx_codeobj__49)); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 125, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_20);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_20, __pyx_t_15);
  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_18, __pyx_n_s_str_2, __pyx_t_20) < 0) __PYX_ERR(0, 125, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
  __pyx_codeobj__49 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__48, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_questdb_ingress_pyx, __pyx_n_s_str_2, 125, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__49)) __PYX_ERR(0, 125, __pyx_L1_error)
 0126:         """Return the name of the enum."""
+0127:         return self.name
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 127, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyUnicode_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("unicode", __pyx_t_1))) __PYX_ERR(0, 127, __pyx_L1_error)
  __pyx_r = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;
 0128: 
 0129: 
+0130: class IngressError(Exception):
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 130, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]));
  __Pyx_GIVEREF((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]));
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])))) __PYX_ERR(0, 130, __pyx_L1_error);
  __pyx_t_19 = __Pyx_PEP560_update_bases(__pyx_t_3); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 130, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_19);
  __pyx_t_18 = __Pyx_CalculateMetaclass(NULL, __pyx_t_19); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 130, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_18);
  __pyx_t_20 = __Pyx_Py3MetaclassPrepare(__pyx_t_18, __pyx_t_19, __pyx_n_s_IngressError, __pyx_n_s_IngressError, (PyObject *) NULL, __pyx_n_s_questdb_ingress, __pyx_kp_s_An_error_whilst_using_the_Sender); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 130, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_20);
  if (__pyx_t_19 != __pyx_t_3) {
    if (unlikely((PyDict_SetItemString(__pyx_t_20, "__orig_bases__", __pyx_t_3) < 0))) __PYX_ERR(0, 130, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 130, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
/* … */
  __pyx_t_15 = __Pyx_Py3ClassCreate(__pyx_t_18, __pyx_n_s_IngressError, __pyx_t_19, __pyx_t_20, NULL, 0, 0); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 130, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_15);
  if (__Pyx_CyFunction_InitClassCell(__pyx_t_3, __pyx_t_15) < 0) __PYX_ERR(0, 130, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_IngressError, __pyx_t_15) < 0) __PYX_ERR(0, 130, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
  __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
  __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
 0131:     """An error whilst using the ``Sender`` or constructing its ``Buffer``."""
+0132:     def __init__(self, code, msg):
/* Python wrapper */
static PyObject *__pyx_pw_7questdb_7ingress_12IngressError_1__init__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_7questdb_7ingress_12IngressError_1__init__ = {"__init__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7questdb_7ingress_12IngressError_1__init__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7questdb_7ingress_12IngressError_1__init__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_code = 0;
  PyObject *__pyx_v_msg = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_code,&__pyx_n_s_msg,0};
  PyObject* values[3] = {0,0,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 132, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_code)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 132, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, 1); __PYX_ERR(0, 132, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_msg)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[2]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 132, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, 2); __PYX_ERR(0, 132, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__init__") < 0)) __PYX_ERR(0, 132, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 3)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
      values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
    }
    __pyx_v_self = values[0];
    __pyx_v_code = values[1];
    __pyx_v_msg = values[2];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 132, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("questdb.ingress.IngressError.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7questdb_7ingress_12IngressError___init__(__pyx_self, __pyx_v_self, __pyx_v_code, __pyx_v_msg);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7questdb_7ingress_12IngressError___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_code, PyObject *__pyx_v_msg) {
  PyObject *__pyx_r = NULL;
/* … */
  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("questdb.ingress.IngressError.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
/* … */
  __pyx_tuple__50 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_code, __pyx_n_s_msg); if (unlikely(!__pyx_tuple__50)) __PYX_ERR(0, 132, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__50);
  __Pyx_GIVEREF(__pyx_tuple__50);
/* … */
  __pyx_t_15 = __Pyx_CyFunction_New(&__pyx_mdef_7questdb_7ingress_12IngressError_1__init__, 0, __pyx_n_s_IngressError___init, NULL, __pyx_n_s_questdb_ingress, __pyx_d, ((PyObject *)__pyx_codeobj__51)); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 132, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_15);
  __Pyx_INCREF(__pyx_t_15);
  PyList_Append(__pyx_t_3, __pyx_t_15);
  __Pyx_GIVEREF(__pyx_t_15);
  if (__Pyx_SetNameInClass(__pyx_t_20, __pyx_n_s_init, __pyx_t_15) < 0) __PYX_ERR(0, 132, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
  __pyx_codeobj__51 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__50, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_questdb_ingress_pyx, __pyx_n_s_init, 132, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__51)) __PYX_ERR(0, 132, __pyx_L1_error)
+0133:         super().__init__(msg)
  __pyx_t_2 = __Pyx_CyFunction_GetClassObj(__pyx_self);
  if (!__pyx_t_2) { PyErr_SetString(PyExc_SystemError, "super(): empty __class__ cell"); __PYX_ERR(0, 133, __pyx_L1_error) }
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 133, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2)) __PYX_ERR(0, 133, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_self);
  __Pyx_GIVEREF(__pyx_v_self);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_self)) __PYX_ERR(0, 133, __pyx_L1_error);
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 133, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_init); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 133, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_msg};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 133, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+0134:         self._code = code
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_code_2, __pyx_v_code) < 0) __PYX_ERR(0, 134, __pyx_L1_error)
 0135: 
+0136:     @property
/* Python wrapper */
static PyObject *__pyx_pw_7questdb_7ingress_12IngressError_3code(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7questdb_7ingress_12IngressError_2code, "Return the error code.");
static PyMethodDef __pyx_mdef_7questdb_7ingress_12IngressError_3code = {"code", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7questdb_7ingress_12IngressError_3code, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7questdb_7ingress_12IngressError_2code};
static PyObject *__pyx_pw_7questdb_7ingress_12IngressError_3code(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("code (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,0};
  PyObject* values[1] = {0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 136, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "code") < 0)) __PYX_ERR(0, 136, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("code", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 136, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("questdb.ingress.IngressError.code", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7questdb_7ingress_12IngressError_2code(__pyx_self, __pyx_v_self);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7questdb_7ingress_12IngressError_2code(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
/* … */
  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("questdb.ingress.IngressError.code", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
/* … */
  __pyx_t_15 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 136, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_15);
  if (PyDict_SetItem(__pyx_t_15, __pyx_n_s_return, __pyx_n_s_IngressErrorCode) < 0) __PYX_ERR(0, 136, __pyx_L1_error)
  __pyx_t_16 = __Pyx_CyFunction_New(&__pyx_mdef_7questdb_7ingress_12IngressError_3code, 0, __pyx_n_s_IngressError_code, NULL, __pyx_n_s_questdb_ingress, __pyx_d, ((PyObject *)__pyx_codeobj__52)); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 136, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_16);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_16, __pyx_t_15);
  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
  __pyx_t_15 = __Pyx_PyObject_CallOneArg(__pyx_builtin_property, __pyx_t_16); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 136, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_15);
  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_20, __pyx_n_s_code, __pyx_t_15) < 0) __PYX_ERR(0, 136, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
/* … */
  __pyx_codeobj__52 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__48, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_questdb_ingress_pyx, __pyx_n_s_code, 136, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__52)) __PYX_ERR(0, 136, __pyx_L1_error)
 0137:     def code(self) -> IngressErrorCode:
 0138:         """Return the error code."""
+0139:         return self._code
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_code_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 139, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;
 0140: 
 0141: 
+0142: cdef inline object c_err_code_to_py(line_sender_error_code code):
static CYTHON_INLINE PyObject *__pyx_f_7questdb_7ingress_c_err_code_to_py(enum line_sender_error_code __pyx_v_code) {
  PyObject *__pyx_r = NULL;
/* … */
  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("questdb.ingress.c_err_code_to_py", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
+0143:     if code == line_sender_error_could_not_resolve_addr:
  switch (__pyx_v_code) {
    case line_sender_error_could_not_resolve_addr:
/* … */
    break;
    case line_sender_error_invalid_api_call:
+0144:         return IngressErrorCode.CouldNotResolveAddr
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_IngressErrorCode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 144, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_CouldNotResolveAddr); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 144, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;
+0145:     elif code == line_sender_error_invalid_api_call:
    break;
    case line_sender_error_socket_error:
+0146:         return IngressErrorCode.InvalidApiCall
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_IngressErrorCode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 146, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_InvalidApiCall); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 146, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;
+0147:     elif code == line_sender_error_socket_error:
    break;
    case line_sender_error_invalid_utf8:
+0148:         return IngressErrorCode.SocketError
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_IngressErrorCode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 148, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_SocketError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 148, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;
+0149:     elif code == line_sender_error_invalid_utf8:
    break;
    case line_sender_error_invalid_name:
+0150:         return IngressErrorCode.InvalidUtf8
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_IngressErrorCode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 150, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_InvalidUtf8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 150, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;
+0151:     elif code == line_sender_error_invalid_name:
    break;
    case line_sender_error_invalid_timestamp:
+0152:         return IngressErrorCode.InvalidName
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_IngressErrorCode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 152, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_InvalidName); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 152, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;
+0153:     elif code == line_sender_error_invalid_timestamp:
    break;
    case line_sender_error_auth_error:
+0154:         return IngressErrorCode.InvalidTimestamp
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_IngressErrorCode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 154, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_InvalidTimestamp); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 154, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;
+0155:     elif code == line_sender_error_auth_error:
    break;
    case line_sender_error_tls_error:
+0156:         return IngressErrorCode.AuthError
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_IngressErrorCode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 156, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_AuthError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 156, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;
+0157:     elif code == line_sender_error_tls_error:
    break;
    case line_sender_error_http_not_supported:
+0158:         return IngressErrorCode.TlsError
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_IngressErrorCode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 158, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_TlsError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 158, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;
+0159:     elif code == line_sender_error_http_not_supported:
    break;
    case line_sender_error_server_flush_error:
+0160:         return IngressErrorCode.HttpNotSupported
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_IngressErrorCode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 160, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_HttpNotSupported); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 160, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;
+0161:     elif code == line_sender_error_server_flush_error:
    break;
    case line_sender_error_config_error:
+0162:         return IngressErrorCode.ServerFlushError
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_IngressErrorCode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 162, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_ServerFlushError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 162, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;
+0163:     elif code == line_sender_error_config_error:
    break;
    default:
+0164:         return IngressErrorCode.ConfigError
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_IngressErrorCode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 164, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_ConfigError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 164, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;
 0165:     else:
+0166:         raise ValueError('Internal error converting error code.')
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__29, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 166, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(0, 166, __pyx_L1_error)
    break;
  }
/* … */
  __pyx_tuple__29 = PyTuple_Pack(1, __pyx_kp_u_Internal_error_converting_error); if (unlikely(!__pyx_tuple__29)) __PYX_ERR(0, 166, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__29);
  __Pyx_GIVEREF(__pyx_tuple__29);
 0167: 
 0168: 
+0169: cdef inline object c_err_to_code_and_msg(line_sender_error* err):
static CYTHON_INLINE PyObject *__pyx_f_7questdb_7ingress_c_err_to_code_and_msg(struct line_sender_error *__pyx_v_err) {
  enum line_sender_error_code __pyx_v_code;
  size_t __pyx_v_c_len;
  char const *__pyx_v_c_msg;
  PyObject *__pyx_v_py_msg = 0;
  PyObject *__pyx_v_py_code = 0;
  PyObject *__pyx_r = NULL;
/* … */
  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("questdb.ingress.c_err_to_code_and_msg", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_py_msg);
  __Pyx_XDECREF(__pyx_v_py_code);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
 0170:     """Construct a ``SenderError`` from a C error, which will be freed."""
+0171:     cdef line_sender_error_code code = line_sender_error_get_code(err)
  __pyx_v_code = line_sender_error_get_code(__pyx_v_err);
+0172:     cdef size_t c_len = 0
  __pyx_v_c_len = 0;
+0173:     cdef const char* c_msg = line_sender_error_msg(err, &c_len)
  __pyx_v_c_msg = line_sender_error_msg(__pyx_v_err, (&__pyx_v_c_len));
 0174:     cdef object py_err
 0175:     cdef object py_msg
 0176:     cdef object py_code
+0177:     try:
  /*try:*/ {
+0178:         py_code = c_err_code_to_py(code)
    __pyx_t_1 = __pyx_f_7questdb_7ingress_c_err_code_to_py(__pyx_v_code); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 178, __pyx_L4_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_v_py_code = __pyx_t_1;
    __pyx_t_1 = 0;
+0179:         py_msg = PyUnicode_FromStringAndSize(c_msg, <Py_ssize_t>c_len)
    __pyx_t_1 = PyUnicode_FromStringAndSize(__pyx_v_c_msg, ((Py_ssize_t)__pyx_v_c_len)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 179, __pyx_L4_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_v_py_msg = __pyx_t_1;
    __pyx_t_1 = 0;
+0180:         return (py_code, py_msg)
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 180, __pyx_L4_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_v_py_code);
    __Pyx_GIVEREF(__pyx_v_py_code);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_py_code)) __PYX_ERR(0, 180, __pyx_L4_error);
    __Pyx_INCREF(__pyx_v_py_msg);
    __Pyx_GIVEREF(__pyx_v_py_msg);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_py_msg)) __PYX_ERR(0, 180, __pyx_L4_error);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L3_return;
  }
 0181:     finally:
+0182:         line_sender_error_free(err)
  /*finally:*/ {
    __pyx_L4_error:;
    /*exception exit:*/{
      __Pyx_PyThreadState_declare
      __Pyx_PyThreadState_assign
      __pyx_t_5 = 0; __pyx_t_6 = 0; __pyx_t_7 = 0; __pyx_t_8 = 0; __pyx_t_9 = 0; __pyx_t_10 = 0;
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10);
      if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0)) __Pyx_ErrFetch(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7);
      __Pyx_XGOTREF(__pyx_t_5);
      __Pyx_XGOTREF(__pyx_t_6);
      __Pyx_XGOTREF(__pyx_t_7);
      __Pyx_XGOTREF(__pyx_t_8);
      __Pyx_XGOTREF(__pyx_t_9);
      __Pyx_XGOTREF(__pyx_t_10);
      __pyx_t_2 = __pyx_lineno; __pyx_t_3 = __pyx_clineno; __pyx_t_4 = __pyx_filename;
      {
        line_sender_error_free(__pyx_v_err);
      }
      if (PY_MAJOR_VERSION >= 3) {
        __Pyx_XGIVEREF(__pyx_t_8);
        __Pyx_XGIVEREF(__pyx_t_9);
        __Pyx_XGIVEREF(__pyx_t_10);
        __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10);
      }
      __Pyx_XGIVEREF(__pyx_t_5);
      __Pyx_XGIVEREF(__pyx_t_6);
      __Pyx_XGIVEREF(__pyx_t_7);
      __Pyx_ErrRestore(__pyx_t_5, __pyx_t_6, __pyx_t_7);
      __pyx_t_5 = 0; __pyx_t_6 = 0; __pyx_t_7 = 0; __pyx_t_8 = 0; __pyx_t_9 = 0; __pyx_t_10 = 0;
      __pyx_lineno = __pyx_t_2; __pyx_clineno = __pyx_t_3; __pyx_filename = __pyx_t_4;
      goto __pyx_L1_error;
    }
    __pyx_L3_return: {
      __pyx_t_10 = __pyx_r;
      __pyx_r = 0;
      line_sender_error_free(__pyx_v_err);
      __pyx_r = __pyx_t_10;
      __pyx_t_10 = 0;
      goto __pyx_L0;
    }
  }
 0183: 
 0184: 
+0185: cdef inline object c_err_to_py(line_sender_error* err):
static CYTHON_INLINE PyObject *__pyx_f_7questdb_7ingress_c_err_to_py(struct line_sender_error *__pyx_v_err) {
  PyObject *__pyx_v_tup = 0;
  PyObject *__pyx_r = NULL;
/* … */
  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("questdb.ingress.c_err_to_py", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_tup);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
 0186:     """Construct an ``IngressError`` from a C error, which will be freed."""
+0187:     cdef object tup = c_err_to_code_and_msg(err)
  __pyx_t_1 = __pyx_f_7questdb_7ingress_c_err_to_code_and_msg(__pyx_v_err); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 187, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_tup = __pyx_t_1;
  __pyx_t_1 = 0;
+0188:     return IngressError(tup[0], tup[1])
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_IngressError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 188, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_tup, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 188, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_tup, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 188, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = NULL;
  __pyx_t_6 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_6 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_5, __pyx_t_3, __pyx_t_4};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_6, 2+__pyx_t_6);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 188, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;
 0189: 
 0190: 
+0191: cdef inline object c_err_to_py_fmt(line_sender_error* err, str fmt):
static CYTHON_INLINE PyObject *__pyx_f_7questdb_7ingress_c_err_to_py_fmt(struct line_sender_error *__pyx_v_err, PyObject *__pyx_v_fmt) {
  PyObject *__pyx_v_tup = 0;
  PyObject *__pyx_r = NULL;
/* … */
  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("questdb.ingress.c_err_to_py_fmt", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_tup);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
 0192:     """Construct an ``IngressError`` from a C error, which will be freed."""
+0193:     cdef object tup = c_err_to_code_and_msg(err)
  __pyx_t_1 = __pyx_f_7questdb_7ingress_c_err_to_code_and_msg(__pyx_v_err); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 193, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_tup = __pyx_t_1;
  __pyx_t_1 = 0;
+0194:     return IngressError(tup[0], fmt.format(tup[1]))
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_IngressError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 194, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_tup, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 194, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_tup, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 194, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_CallUnboundCMethod1(&__pyx_umethod_PyUnicode_Type_format, __pyx_v_fmt, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 194, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = NULL;
  __pyx_t_6 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_6 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_4, __pyx_t_3, __pyx_t_5};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_6, 2+__pyx_t_6);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 194, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;
 0195: 
 0196: 
+0197: cdef object _utf8_decode_error(
static PyObject *__pyx_f_7questdb_7ingress__utf8_decode_error(PyObject *__pyx_v_string, uint32_t __pyx_v_bad_codepoint) {
  PyObject *__pyx_v_s = 0;
  PyObject *__pyx_r = NULL;
/* … */
  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("questdb.ingress._utf8_decode_error", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_s);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
 0198:         PyObject* string, uint32_t bad_codepoint):
+0199:     cdef str s = <str><object>string
  __pyx_t_1 = ((PyObject *)__pyx_v_string);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_v_s = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
+0200:     return IngressError(
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_IngressError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 200, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
+0201:         IngressErrorCode.InvalidUtf8,
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_IngressErrorCode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 201, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_InvalidUtf8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 201, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+0202:         f'Invalid codepoint 0x{bad_codepoint:x} in string {s!r}: ' +
  __pyx_t_3 = PyTuple_New(5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 202, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = 0;
  __pyx_t_6 = 127;
  __Pyx_INCREF(__pyx_kp_u_Invalid_codepoint_0x);
  __pyx_t_5 += 20;
  __Pyx_GIVEREF(__pyx_kp_u_Invalid_codepoint_0x);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_kp_u_Invalid_codepoint_0x);
  __pyx_t_7 = __Pyx_PyInt_From_uint32_t(__pyx_v_bad_codepoint); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 202, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = __Pyx_PyObject_Format(__pyx_t_7, __pyx_n_u_x); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 202, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_6 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_8) > __pyx_t_6) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_8) : __pyx_t_6;
  __pyx_t_5 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_8);
  __Pyx_GIVEREF(__pyx_t_8);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_8);
  __pyx_t_8 = 0;
  __Pyx_INCREF(__pyx_kp_u_in_string);
  __pyx_t_5 += 11;
  __Pyx_GIVEREF(__pyx_kp_u_in_string);
  PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_kp_u_in_string);
  __pyx_t_8 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_v_s), __pyx_empty_unicode); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 202, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_6 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_8) > __pyx_t_6) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_8) : __pyx_t_6;
  __pyx_t_5 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_8);
  __Pyx_GIVEREF(__pyx_t_8);
  PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_t_8);
  __pyx_t_8 = 0;
  __Pyx_INCREF(__pyx_kp_u__21);
  __pyx_t_5 += 2;
  __Pyx_GIVEREF(__pyx_kp_u__21);
  PyTuple_SET_ITEM(__pyx_t_3, 4, __pyx_kp_u__21);
  __pyx_t_8 = __Pyx_PyUnicode_Join(__pyx_t_3, 5, __pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 202, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyUnicode_ConcatInPlace(__pyx_t_8, __pyx_kp_u_Cannot_be_encoded_as_UTF_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 202, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_8 = NULL;
  __pyx_t_9 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_9 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_8, __pyx_t_4, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_9, 2+__pyx_t_9);
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 200, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;
 0203:         'Cannot be encoded as UTF-8.')
 0204: 
 0205: 
+0206: cdef str _fqn(type obj):
static PyObject *__pyx_f_7questdb_7ingress__fqn(PyTypeObject *__pyx_v_obj) {
  PyObject *__pyx_r = NULL;
/* … */
  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("questdb.ingress._fqn", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
+0207:     if obj.__module__ == 'builtins':
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_obj), __pyx_n_s_module); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 207, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_t_1, __pyx_n_u_builtins, Py_EQ)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 207, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {
/* … */
  }
+0208:         return obj.__qualname__
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_obj), __pyx_n_s_qualname); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 208, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (!(likely(PyUnicode_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("unicode", __pyx_t_1))) __PYX_ERR(0, 208, __pyx_L1_error)
    __pyx_r = ((PyObject*)__pyx_t_1);
    __pyx_t_1 = 0;
    goto __pyx_L0;
 0209:     else:
+0210:         return f'{obj.__module__}.{obj.__qualname__}'
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 210, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = 0;
    __pyx_t_4 = 127;
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_obj), __pyx_n_s_module); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 210, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 210, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_4 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) > __pyx_t_4) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) : __pyx_t_4;
    __pyx_t_3 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_6);
    __pyx_t_6 = 0;
    __Pyx_INCREF(__pyx_kp_u__5);
    __pyx_t_3 += 1;
    __Pyx_GIVEREF(__pyx_kp_u__5);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_kp_u__5);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_obj), __pyx_n_s_qualname); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 210, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_5 = __Pyx_PyObject_FormatSimple(__pyx_t_6, __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 210, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_4 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) > __pyx_t_4) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) : __pyx_t_4;
    __pyx_t_3 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_t_5);
    __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_1, 3, __pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 210, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_r = ((PyObject*)__pyx_t_5);
    __pyx_t_5 = 0;
    goto __pyx_L0;
  }
 0211: 
 0212: 
+0213: cdef inline void_int _encode_utf8(
static CYTHON_INLINE __pyx_t_7questdb_7ingress_void_int __pyx_f_7questdb_7ingress__encode_utf8(struct qdb_pystr_buf *__pyx_v_b, PyObject *__pyx_v_string, struct line_sender_utf8 *__pyx_v_utf8_out) {
  uint32_t __pyx_v_bad_codepoint;
  size_t __pyx_v_count;
  int __pyx_v_kind;
  __pyx_t_7questdb_7ingress_void_int __pyx_r;
/* … */
  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("questdb.ingress._encode_utf8", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
 0214:         qdb_pystr_buf* b,
 0215:         PyObject* string,
 0216:         line_sender_utf8* utf8_out) except -1:
+0217:     cdef uint32_t bad_codepoint = 0
  __pyx_v_bad_codepoint = 0;
+0218:     cdef size_t count = <size_t>(PyUnicode_GET_LENGTH(string))
  __pyx_v_count = ((size_t)PyUnicode_GET_LENGTH(__pyx_v_string));
+0219:     cdef int kind = PyUnicode_KIND(string)
  __pyx_v_kind = PyUnicode_KIND(__pyx_v_string);
+0220:     if kind == PyUnicode_1BYTE_KIND:
  switch (__pyx_v_kind) {
    case PyUnicode_1BYTE_KIND:
/* … */
    break;
    case PyUnicode_2BYTE_KIND:
 0221:         # No error handling for UCS1: All code points translate into valid UTF8.
+0222:         qdb_ucs1_to_utf8(
    qdb_ucs1_to_utf8(__pyx_v_b, __pyx_v_count, PyUnicode_1BYTE_DATA(__pyx_v_string), (&__pyx_v_utf8_out->len), (&__pyx_v_utf8_out->buf));
 0223:             b,
 0224:             count,
 0225:             PyUnicode_1BYTE_DATA(string),
 0226:             &utf8_out.len,
 0227:             &utf8_out.buf)
+0228:     elif kind == PyUnicode_2BYTE_KIND:
    break;
    case PyUnicode_4BYTE_KIND:
+0229:         if not qdb_ucs2_to_utf8(
    __pyx_t_1 = (!qdb_ucs2_to_utf8(__pyx_v_b, __pyx_v_count, PyUnicode_2BYTE_DATA(__pyx_v_string), (&__pyx_v_utf8_out->len), (&__pyx_v_utf8_out->buf), (&__pyx_v_bad_codepoint)));
    if (unlikely(__pyx_t_1)) {
/* … */
    }
 0230:                 b,
 0231:                 count,
 0232:                 PyUnicode_2BYTE_DATA(string),
 0233:                 &utf8_out.len,
 0234:                 &utf8_out.buf,
 0235:                 &bad_codepoint):
+0236:             raise _utf8_decode_error(string, bad_codepoint)
      __pyx_t_2 = __pyx_f_7questdb_7ingress__utf8_decode_error(__pyx_v_string, __pyx_v_bad_codepoint); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 236, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_Raise(__pyx_t_2, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __PYX_ERR(0, 236, __pyx_L1_error)
+0237:     elif kind == PyUnicode_4BYTE_KIND:
    break;
    default:
+0238:         if not qdb_ucs4_to_utf8(
    __pyx_t_1 = (!qdb_ucs4_to_utf8(__pyx_v_b, __pyx_v_count, ((uint32_t const *)PyUnicode_4BYTE_DATA(__pyx_v_string)), (&__pyx_v_utf8_out->len), (&__pyx_v_utf8_out->buf), (&__pyx_v_bad_codepoint)));
    if (unlikely(__pyx_t_1)) {
/* … */
    }
 0239:                 b,
 0240:                 count,
 0241: 
 0242:                 # This cast is required and is possibly a Cython compiler bug.
 0243:                 # It doesn't recognize that `const Py_UCS4*`
 0244:                 # is the same as `const uint32_t*`.
 0245:                 <const uint32_t*>PyUnicode_4BYTE_DATA(string),
 0246: 
 0247:                 &utf8_out.len,
 0248:                 &utf8_out.buf,
 0249:                 &bad_codepoint):
+0250:             raise _utf8_decode_error(string, bad_codepoint)
      __pyx_t_2 = __pyx_f_7questdb_7ingress__utf8_decode_error(__pyx_v_string, __pyx_v_bad_codepoint); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 250, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_Raise(__pyx_t_2, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __PYX_ERR(0, 250, __pyx_L1_error)
 0251:     else:
+0252:         raise ValueError(f'Unknown UCS kind: {kind}.')
    __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 252, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = 0;
    __pyx_t_4 = 127;
    __Pyx_INCREF(__pyx_kp_u_Unknown_UCS_kind);
    __pyx_t_3 += 18;
    __Pyx_GIVEREF(__pyx_kp_u_Unknown_UCS_kind);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_u_Unknown_UCS_kind);
    __pyx_t_5 = __Pyx_PyUnicode_From_int(__pyx_v_kind, 0, ' ', 'd'); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 252, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_3 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_5);
    __pyx_t_5 = 0;
    __Pyx_INCREF(__pyx_kp_u__5);
    __pyx_t_3 += 1;
    __Pyx_GIVEREF(__pyx_kp_u__5);
    PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_kp_u__5);
    __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_2, 3, __pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 252, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 252, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(0, 252, __pyx_L1_error)
    break;
  }
 0253: 
 0254: 
+0255: cdef void_int str_to_utf8(
static __pyx_t_7questdb_7ingress_void_int __pyx_f_7questdb_7ingress_str_to_utf8(struct qdb_pystr_buf *__pyx_v_b, PyObject *__pyx_v_string, struct line_sender_utf8 *__pyx_v_utf8_out) {
  __pyx_t_7questdb_7ingress_void_int __pyx_r;
/* … */
  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("questdb.ingress.str_to_utf8", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
 0256:         qdb_pystr_buf* b,
 0257:         PyObject* string,
 0258:         line_sender_utf8* utf8_out) except -1:
 0259:     """
 0260:     Convert a Python string to a UTF-8 borrowed buffer.
 0261:     This is done without allocating new Python `bytes` objects.
 0262:     In case the string is an ASCII string, it's also generally zero-copy.
 0263:     The `utf8_out` param will point to (borrow from) either the ASCII buffer
 0264:     inside the original Python object or a part of memory allocated inside the
 0265:     `b` buffer.
 0266: 
 0267:     If you need to use `utf8_out` without the GIL, call `qdb_pystr_buf_copy`.
 0268:     """
+0269:     if not PyUnicode_CheckExact(string):
  __pyx_t_1 = (!PyUnicode_CheckExact(__pyx_v_string));
  if (unlikely(__pyx_t_1)) {
/* … */
  }
+0270:         raise TypeError(
    __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 270, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(0, 270, __pyx_L1_error)
+0271:             'Expected a str object, not an object of type ' +
    __pyx_t_3 = __Pyx_PyUnicode_ConcatSafe(__pyx_kp_u_Expected_a_str_object_not_an_obj, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 271, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+0272:             _fqn(type(<str><object>string)))
    __pyx_t_2 = __pyx_f_7questdb_7ingress__fqn(((PyTypeObject*)((PyObject *)Py_TYPE(((PyObject *)__pyx_v_string))))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 272, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
+0273:     PyUnicode_READY(string)
  __pyx_t_4 = PyUnicode_READY(__pyx_v_string); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 273, __pyx_L1_error)
 0274: 
 0275:     # We optimize the common case of ASCII strings.
 0276:     # This avoid memory allocations and copies altogether.
 0277:     # We get away with this because ASCII is a subset of UTF-8.
+0278:     if PyUnicode_IS_COMPACT_ASCII(string):
  __pyx_t_1 = PyUnicode_IS_COMPACT_ASCII(__pyx_v_string);
  if (__pyx_t_1) {
/* … */
  }
+0279:         utf8_out.len = <size_t>(PyUnicode_GET_LENGTH(string))
    __pyx_v_utf8_out->len = ((size_t)PyUnicode_GET_LENGTH(__pyx_v_string));
+0280:         utf8_out.buf = <const char*>(PyUnicode_1BYTE_DATA(string))
    __pyx_v_utf8_out->buf = ((char const *)PyUnicode_1BYTE_DATA(__pyx_v_string));
+0281:         return 0
    __pyx_r = 0;
    goto __pyx_L0;
 0282: 
+0283:     _encode_utf8(b, string, utf8_out)
  __pyx_t_5 = __pyx_f_7questdb_7ingress__encode_utf8(__pyx_v_b, __pyx_v_string, __pyx_v_utf8_out); if (unlikely(__pyx_t_5 == ((__pyx_t_7questdb_7ingress_void_int)-1))) __PYX_ERR(0, 283, __pyx_L1_error)
 0284: 
 0285: 
 0286: 
+0287: cdef void_int str_to_utf8_copy(
static __pyx_t_7questdb_7ingress_void_int __pyx_f_7questdb_7ingress_str_to_utf8_copy(struct qdb_pystr_buf *__pyx_v_b, PyObject *__pyx_v_string, struct line_sender_utf8 *__pyx_v_utf8_out) {
  __pyx_t_7questdb_7ingress_void_int __pyx_r;
/* … */
  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("questdb.ingress.str_to_utf8_copy", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
 0288:         qdb_pystr_buf* b,
 0289:         PyObject* string,
 0290:         line_sender_utf8* utf8_out) except -1:
 0291:     """
 0292:     Variant of `str_to_utf8` that always copies the string to a new buffer.
 0293: 
 0294:     The resulting `utf8_out` can be used when not holding the GIL:
 0295:     The pointed-to memory is owned by `b`.
 0296:     """
+0297:     if not PyUnicode_CheckExact(string):
  __pyx_t_1 = (!PyUnicode_CheckExact(__pyx_v_string));
  if (unlikely(__pyx_t_1)) {
/* … */
  }
+0298:         raise TypeError(
    __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 298, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(0, 298, __pyx_L1_error)
+0299:             'Expected a str object, not an object of type ' +
    __pyx_t_3 = __Pyx_PyUnicode_ConcatSafe(__pyx_kp_u_Expected_a_str_object_not_an_obj, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 299, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+0300:             _fqn(type(<str><object>string)))
    __pyx_t_2 = __pyx_f_7questdb_7ingress__fqn(((PyTypeObject*)((PyObject *)Py_TYPE(((PyObject *)__pyx_v_string))))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 300, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
 0301: 
+0302:     PyUnicode_READY(string)
  __pyx_t_4 = PyUnicode_READY(__pyx_v_string); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 302, __pyx_L1_error)
+0303:     _encode_utf8(b, string, utf8_out)
  __pyx_t_5 = __pyx_f_7questdb_7ingress__encode_utf8(__pyx_v_b, __pyx_v_string, __pyx_v_utf8_out); if (unlikely(__pyx_t_5 == ((__pyx_t_7questdb_7ingress_void_int)-1))) __PYX_ERR(0, 303, __pyx_L1_error)
 0304: 
 0305: 
+0306: cdef void_int str_to_table_name(
static __pyx_t_7questdb_7ingress_void_int __pyx_f_7questdb_7ingress_str_to_table_name(struct qdb_pystr_buf *__pyx_v_b, PyObject *__pyx_v_string, struct line_sender_table_name *__pyx_v_name_out) {
  struct line_sender_error *__pyx_v_err;
  struct line_sender_utf8 __pyx_v_utf8;
  __pyx_t_7questdb_7ingress_void_int __pyx_r;
/* … */
  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("questdb.ingress.str_to_table_name", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
 0307:         qdb_pystr_buf* b,
 0308:         PyObject* string,
 0309:         line_sender_table_name* name_out) except -1:
 0310:     """
 0311:     Python string to borrowed C table name.
 0312:     Also see `str_to_utf8`.
 0313:     """
+0314:     cdef line_sender_error* err = NULL
  __pyx_v_err = NULL;
 0315:     cdef line_sender_utf8 utf8
+0316:     str_to_utf8(b, string, &utf8)
  __pyx_t_1 = __pyx_f_7questdb_7ingress_str_to_utf8(__pyx_v_b, __pyx_v_string, (&__pyx_v_utf8)); if (unlikely(__pyx_t_1 == ((__pyx_t_7questdb_7ingress_void_int)-1))) __PYX_ERR(0, 316, __pyx_L1_error)
+0317:     if not line_sender_table_name_init(name_out, utf8.len, utf8.buf, &err):
  __pyx_t_2 = (!line_sender_table_name_init(__pyx_v_name_out, __pyx_v_utf8.len, __pyx_v_utf8.buf, (&__pyx_v_err)));
  if (unlikely(__pyx_t_2)) {
/* … */
  }
+0318:         raise c_err_to_py(err)
    __pyx_t_3 = __pyx_f_7questdb_7ingress_c_err_to_py(__pyx_v_err); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 318, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(0, 318, __pyx_L1_error)
 0319: 
 0320: 
+0321: cdef void_int str_to_table_name_copy(
static __pyx_t_7questdb_7ingress_void_int __pyx_f_7questdb_7ingress_str_to_table_name_copy(struct qdb_pystr_buf *__pyx_v_b, PyObject *__pyx_v_string, struct line_sender_table_name *__pyx_v_name_out) {
  struct line_sender_error *__pyx_v_err;
  struct line_sender_utf8 __pyx_v_utf8;
  __pyx_t_7questdb_7ingress_void_int __pyx_r;
/* … */
  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("questdb.ingress.str_to_table_name_copy", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
 0322:         qdb_pystr_buf* b,
 0323:         PyObject* string,
 0324:         line_sender_table_name* name_out) except -1:
 0325:     """
 0326:     Python string to copied C table name.
 0327:     Also see `str_to_utf8_copy`.
 0328:     """
+0329:     cdef line_sender_error* err = NULL
  __pyx_v_err = NULL;
 0330:     cdef line_sender_utf8 utf8
+0331:     str_to_utf8_copy(b, string, &utf8)
  __pyx_t_1 = __pyx_f_7questdb_7ingress_str_to_utf8_copy(__pyx_v_b, __pyx_v_string, (&__pyx_v_utf8)); if (unlikely(__pyx_t_1 == ((__pyx_t_7questdb_7ingress_void_int)-1))) __PYX_ERR(0, 331, __pyx_L1_error)
+0332:     if not line_sender_table_name_init(name_out, utf8.len, utf8.buf, &err):
  __pyx_t_2 = (!line_sender_table_name_init(__pyx_v_name_out, __pyx_v_utf8.len, __pyx_v_utf8.buf, (&__pyx_v_err)));
  if (unlikely(__pyx_t_2)) {
/* … */
  }
+0333:         raise c_err_to_py(err)
    __pyx_t_3 = __pyx_f_7questdb_7ingress_c_err_to_py(__pyx_v_err); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 333, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(0, 333, __pyx_L1_error)
 0334: 
 0335: 
+0336: cdef void_int str_to_column_name(
static __pyx_t_7questdb_7ingress_void_int __pyx_f_7questdb_7ingress_str_to_column_name(struct qdb_pystr_buf *__pyx_v_b, PyObject *__pyx_v_string, struct line_sender_column_name *__pyx_v_name_out) {
  struct line_sender_error *__pyx_v_err;
  struct line_sender_utf8 __pyx_v_utf8;
  __pyx_t_7questdb_7ingress_void_int __pyx_r;
/* … */
  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("questdb.ingress.str_to_column_name", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
 0337:         qdb_pystr_buf* b,
 0338:         str string,
 0339:         line_sender_column_name* name_out) except -1:
 0340:     """
 0341:     Python string to borrowed C column name.
 0342:     Also see `str_to_utf8`.
 0343:     """
+0344:     cdef line_sender_error* err = NULL
  __pyx_v_err = NULL;
 0345:     cdef line_sender_utf8 utf8
+0346:     str_to_utf8(b, <PyObject*>string, &utf8)
  __pyx_t_1 = __pyx_f_7questdb_7ingress_str_to_utf8(__pyx_v_b, ((PyObject *)__pyx_v_string), (&__pyx_v_utf8)); if (unlikely(__pyx_t_1 == ((__pyx_t_7questdb_7ingress_void_int)-1))) __PYX_ERR(0, 346, __pyx_L1_error)
+0347:     if not line_sender_column_name_init(name_out, utf8.len, utf8.buf, &err):
  __pyx_t_2 = (!line_sender_column_name_init(__pyx_v_name_out, __pyx_v_utf8.len, __pyx_v_utf8.buf, (&__pyx_v_err)));
  if (unlikely(__pyx_t_2)) {
/* … */
  }
+0348:         raise c_err_to_py(err)
    __pyx_t_3 = __pyx_f_7questdb_7ingress_c_err_to_py(__pyx_v_err); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 348, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(0, 348, __pyx_L1_error)
 0349: 
 0350: 
+0351: cdef void_int str_to_column_name_copy(
static __pyx_t_7questdb_7ingress_void_int __pyx_f_7questdb_7ingress_str_to_column_name_copy(struct qdb_pystr_buf *__pyx_v_b, PyObject *__pyx_v_string, struct line_sender_column_name *__pyx_v_name_out) {
  struct line_sender_error *__pyx_v_err;
  struct line_sender_utf8 __pyx_v_utf8;
  __pyx_t_7questdb_7ingress_void_int __pyx_r;
/* … */
  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("questdb.ingress.str_to_column_name_copy", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
 0352:         qdb_pystr_buf* b,
 0353:         str string,
 0354:         line_sender_column_name* name_out) except -1:
 0355:     """
 0356:     Python string to copied C column name.
 0357:     Also see `str_to_utf8_copy`.
 0358:     """
+0359:     cdef line_sender_error* err = NULL
  __pyx_v_err = NULL;
 0360:     cdef line_sender_utf8 utf8
+0361:     str_to_utf8_copy(b, <PyObject*>string, &utf8)
  __pyx_t_1 = __pyx_f_7questdb_7ingress_str_to_utf8_copy(__pyx_v_b, ((PyObject *)__pyx_v_string), (&__pyx_v_utf8)); if (unlikely(__pyx_t_1 == ((__pyx_t_7questdb_7ingress_void_int)-1))) __PYX_ERR(0, 361, __pyx_L1_error)
+0362:     if not line_sender_column_name_init(name_out, utf8.len, utf8.buf, &err):
  __pyx_t_2 = (!line_sender_column_name_init(__pyx_v_name_out, __pyx_v_utf8.len, __pyx_v_utf8.buf, (&__pyx_v_err)));
  if (unlikely(__pyx_t_2)) {
/* … */
  }
+0363:         raise c_err_to_py(err)
    __pyx_t_3 = __pyx_f_7questdb_7ingress_c_err_to_py(__pyx_v_err); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 363, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(0, 363, __pyx_L1_error)
 0364: 
 0365: 
+0366: cdef int64_t datetime_to_micros(datetime dt):
static int64_t __pyx_f_7questdb_7ingress_datetime_to_micros(PyDateTime_DateTime *__pyx_v_dt) {
  int64_t __pyx_r;
/* … */
  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("questdb.ingress.datetime_to_micros", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
 0367:     """
 0368:     Convert a `datetime.datetime` to microseconds since the epoch.
 0369:     """
 0370:     return (
+0371:         <int64_t>(dt.timestamp()) *
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_dt), __pyx_n_s_timestamp); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 371, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 371, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_t_5 = __Pyx_PyInt_As_int64_t(__pyx_t_1); if (unlikely((__pyx_t_5 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 371, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+0372:         <int64_t>(1000000) +
  __pyx_r = ((((int64_t)__pyx_t_5) * ((int64_t)0xF4240)) + ((int64_t)__pyx_t_4));
  goto __pyx_L0;
+0373:         <int64_t>(dt.microsecond))
  __pyx_t_4 = __pyx_f_7cpython_8datetime_8datetime_11microsecond_microsecond(__pyx_v_dt); if (unlikely(__pyx_t_4 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 373, __pyx_L1_error)
 0374: 
 0375: 
+0376: cdef int64_t datetime_to_nanos(datetime dt):
static int64_t __pyx_f_7questdb_7ingress_datetime_to_nanos(PyDateTime_DateTime *__pyx_v_dt) {
  int64_t __pyx_r;
/* … */
  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("questdb.ingress.datetime_to_nanos", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
 0377:     """
 0378:     Convert a `datetime.datetime` to nanoseconds since the epoch.
 0379:     """
 0380:     return (
+0381:         <int64_t>(dt.timestamp()) *
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_dt), __pyx_n_s_timestamp); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 381, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 381, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_t_5 = __Pyx_PyInt_As_int64_t(__pyx_t_1); if (unlikely((__pyx_t_5 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 381, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+0382:         <int64_t>(1000000000) +
  __pyx_r = ((((int64_t)__pyx_t_5) * ((int64_t)0x3B9ACA00)) + ((int64_t)(__pyx_t_4 * 0x3E8)));
  goto __pyx_L0;
+0383:         <int64_t>(dt.microsecond * 1000))
  __pyx_t_4 = __pyx_f_7cpython_8datetime_8datetime_11microsecond_microsecond(__pyx_v_dt); if (unlikely(__pyx_t_4 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 383, __pyx_L1_error)
 0384: 
+0385: cdef class _ServerTimestamp:
struct __pyx_obj_7questdb_7ingress__ServerTimestamp {
  PyObject_HEAD
};

 0386:     """
 0387:     A placeholder value to indicate using a server-generated-timestamp.
 0388:     """
 0389:     pass
 0390: 
+0391: ServerTimestamp = _ServerTimestamp()
  __pyx_t_19 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_7questdb_7ingress__ServerTimestamp)); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 391, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_19);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ServerTimestamp_2, __pyx_t_19) < 0) __PYX_ERR(0, 391, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
 0392: 
+0393: cdef class TimestampMicros:
struct __pyx_obj_7questdb_7ingress_TimestampMicros {
  PyObject_HEAD
  int64_t _value;
};

 0394:     """
 0395:     A timestamp in microseconds since the UNIX epoch (UTC).
 0396: 
 0397:     You may construct a ``TimestampMicros`` from an integer or a
 0398:     ``datetime.datetime``, or simply call the :func:`TimestampMicros.now`
 0399:     method.
 0400: 
 0401:     .. code-block:: python
 0402: 
 0403:         # Recommended way to get the current timestamp.
 0404:         TimestampMicros.now()
 0405: 
 0406:         # The above is equivalent to:
 0407:         TimestampMicros(time.time_ns() // 1000)
 0408: 
 0409:         # You can provide a numeric timestamp too. It can't be negative.
 0410:         TimestampMicros(1657888365426838)
 0411: 
 0412:     ``TimestampMicros`` can also be constructed from a ``datetime.datetime``
 0413:     object.
 0414: 
 0415:     .. code-block:: python
 0416: 
 0417:         TimestampMicros.from_datetime(
 0418:             datetime.datetime.now(tz=datetime.timezone.utc))
 0419: 
 0420:     We recommend that when using ``datetime`` objects, you explicitly pass in
 0421:     the timezone to use. This is because ``datetime`` objects without an
 0422:     associated timezone are assumed to be in the local timezone and it is easy
 0423:     to make mistakes (e.g. passing ``datetime.datetime.utcnow()`` is a likely
 0424:     bug).
 0425:     """
 0426:     cdef int64_t _value
 0427: 
+0428:     def __cinit__(self, value: int):
/* Python wrapper */
static int __pyx_pw_7questdb_7ingress_15TimestampMicros_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_7questdb_7ingress_15TimestampMicros_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_value = 0;
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
  #endif
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_value,0};
  PyObject* values[1] = {0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_VARARGS(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_value)) != 0)) {
          (void)__Pyx_Arg_NewRef_VARARGS(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 428, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__cinit__") < 0)) __PYX_ERR(0, 428, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
    }
    __pyx_v_value = ((PyObject*)values[0]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 428, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("questdb.ingress.TimestampMicros.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_value), (&PyInt_Type), 0, "value", 1))) __PYX_ERR(0, 428, __pyx_L1_error)
  __pyx_r = __pyx_pf_7questdb_7ingress_15TimestampMicros___cinit__(((struct __pyx_obj_7questdb_7ingress_TimestampMicros *)__pyx_v_self), __pyx_v_value);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_7questdb_7ingress_15TimestampMicros___cinit__(struct __pyx_obj_7questdb_7ingress_TimestampMicros *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
/* … */
  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("questdb.ingress.TimestampMicros.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
+0429:         if value < 0:
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_value, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 429, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 429, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(__pyx_t_2)) {
/* … */
  }
+0430:             raise ValueError('value must be a positive integer.')
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__30, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 430, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 430, __pyx_L1_error)
/* … */
  __pyx_tuple__30 = PyTuple_Pack(1, __pyx_kp_u_value_must_be_a_positive_integer); if (unlikely(!__pyx_tuple__30)) __PYX_ERR(0, 430, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__30);
  __Pyx_GIVEREF(__pyx_tuple__30);
+0431:         self._value = value
  __pyx_t_3 = __Pyx_PyInt_As_int64_t(__pyx_v_value); if (unlikely((__pyx_t_3 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 431, __pyx_L1_error)
  __pyx_v_self->_value = __pyx_t_3;
 0432: 
+0433:     @classmethod
/* Python wrapper */
static PyObject *__pyx_pw_7questdb_7ingress_15TimestampMicros_3from_datetime(PyObject *__pyx_v_cls, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7questdb_7ingress_15TimestampMicros_2from_datetime, "\n        Construct a ``TimestampMicros`` from a ``datetime.datetime`` object.\n        ");
static PyMethodDef __pyx_mdef_7questdb_7ingress_15TimestampMicros_3from_datetime = {"from_datetime", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7questdb_7ingress_15TimestampMicros_3from_datetime, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7questdb_7ingress_15TimestampMicros_2from_datetime};
static PyObject *__pyx_pw_7questdb_7ingress_15TimestampMicros_3from_datetime(PyObject *__pyx_v_cls, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyDateTime_DateTime *__pyx_v_dt = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("from_datetime (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_dt,0};
  PyObject* values[1] = {0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_dt)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 433, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "from_datetime") < 0)) __PYX_ERR(0, 433, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_dt = ((PyDateTime_DateTime *)values[0]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("from_datetime", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 433, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("questdb.ingress.TimestampMicros.from_datetime", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dt), __pyx_ptype_7cpython_8datetime_datetime, 0, "dt", 0))) __PYX_ERR(0, 434, __pyx_L1_error)
  __pyx_r = __pyx_pf_7questdb_7ingress_15TimestampMicros_2from_datetime(((PyTypeObject*)__pyx_v_cls), __pyx_v_dt);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7questdb_7ingress_15TimestampMicros_2from_datetime(PyTypeObject *__pyx_v_cls, PyDateTime_DateTime *__pyx_v_dt) {
  PyObject *__pyx_r = NULL;
/* … */
  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("questdb.ingress.TimestampMicros.from_datetime", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
/* … */
  __pyx_tuple__55 = PyTuple_Pack(2, __pyx_n_s_cls, __pyx_n_s_dt); if (unlikely(!__pyx_tuple__55)) __PYX_ERR(0, 433, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__55);
  __Pyx_GIVEREF(__pyx_tuple__55);
/* … */
  __pyx_t_19 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 433, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_19);
  if (PyDict_SetItem(__pyx_t_19, __pyx_n_s_dt, __pyx_n_s_datetime) < 0) __PYX_ERR(0, 433, __pyx_L1_error)
  __pyx_t_18 = __Pyx_CyFunction_New(&__pyx_mdef_7questdb_7ingress_15TimestampMicros_3from_datetime, __Pyx_CYFUNCTION_CLASSMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_TimestampMicros_from_datetime, NULL, __pyx_n_s_questdb_ingress, __pyx_d, ((PyObject *)__pyx_codeobj__56)); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 433, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_18);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_18, __pyx_t_19);
  __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_7questdb_7ingress_TimestampMicros, __pyx_n_s_from_datetime, __pyx_t_18) < 0) __PYX_ERR(0, 433, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
  PyType_Modified(__pyx_ptype_7questdb_7ingress_TimestampMicros);
  __Pyx_GetNameInClass(__pyx_t_18, (PyObject *)__pyx_ptype_7questdb_7ingress_TimestampMicros, __pyx_n_s_from_datetime); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 433, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_18);
  __pyx_t_19 = __Pyx_Method_ClassMethod(__pyx_t_18); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 433, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_19);
  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_7questdb_7ingress_TimestampMicros, __pyx_n_s_from_datetime, __pyx_t_19) < 0) __PYX_ERR(0, 433, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
  PyType_Modified(__pyx_ptype_7questdb_7ingress_TimestampMicros);
  __pyx_codeobj__56 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__55, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_questdb_ingress_pyx, __pyx_n_s_from_datetime, 433, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__56)) __PYX_ERR(0, 433, __pyx_L1_error)
 0434:     def from_datetime(cls, dt: datetime):
 0435:         """
 0436:         Construct a ``TimestampMicros`` from a ``datetime.datetime`` object.
 0437:         """
+0438:         if not isinstance(dt, datetime):
  __pyx_t_1 = __Pyx_TypeCheck(((PyObject *)__pyx_v_dt), __pyx_ptype_7cpython_8datetime_datetime); 
  __pyx_t_2 = (!__pyx_t_1);
  if (unlikely(__pyx_t_2)) {
/* … */
  }
+0439:             raise TypeError('dt must be a datetime object.')
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__31, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 439, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(0, 439, __pyx_L1_error)
/* … */
  __pyx_tuple__31 = PyTuple_Pack(1, __pyx_kp_u_dt_must_be_a_datetime_object); if (unlikely(!__pyx_tuple__31)) __PYX_ERR(0, 439, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__31);
  __Pyx_GIVEREF(__pyx_tuple__31);
+0440:         return cls(datetime_to_micros(dt))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_4 = __pyx_f_7questdb_7ingress_datetime_to_micros(__pyx_v_dt); if (unlikely(__pyx_t_4 == ((int64_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 440, __pyx_L1_error)
  __pyx_t_3 = __Pyx_PyInt_From_int64_t(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 440, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_v_cls), __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 440, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;
 0441: 
+0442:     @classmethod
/* Python wrapper */
static PyObject *__pyx_pw_7questdb_7ingress_15TimestampMicros_5now(PyObject *__pyx_v_cls, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7questdb_7ingress_15TimestampMicros_4now, "\n        Construct a ``TimestampMicros`` from the current time as UTC.\n        ");
static PyMethodDef __pyx_mdef_7questdb_7ingress_15TimestampMicros_5now = {"now", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7questdb_7ingress_15TimestampMicros_5now, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7questdb_7ingress_15TimestampMicros_4now};
static PyObject *__pyx_pw_7questdb_7ingress_15TimestampMicros_5now(PyObject *__pyx_v_cls, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("now (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) {
    __Pyx_RaiseArgtupleInvalid("now", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "now", 0))) return NULL;
  __pyx_r = __pyx_pf_7questdb_7ingress_15TimestampMicros_4now(((PyTypeObject*)__pyx_v_cls));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7questdb_7ingress_15TimestampMicros_4now(PyTypeObject *__pyx_v_cls) {
  int64_t __pyx_v_value;
  PyObject *__pyx_r = NULL;
/* … */
  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("questdb.ingress.TimestampMicros.now", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
/* … */
  __pyx_tuple__57 = PyTuple_Pack(2, __pyx_n_s_cls, __pyx_n_s_value); if (unlikely(!__pyx_tuple__57)) __PYX_ERR(0, 442, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__57);
  __Pyx_GIVEREF(__pyx_tuple__57);
/* … */
  __pyx_t_19 = __Pyx_CyFunction_New(&__pyx_mdef_7questdb_7ingress_15TimestampMicros_5now, __Pyx_CYFUNCTION_CLASSMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_TimestampMicros_now, NULL, __pyx_n_s_questdb_ingress, __pyx_d, ((PyObject *)__pyx_codeobj__58)); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 442, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_19);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_7questdb_7ingress_TimestampMicros, __pyx_n_s_now, __pyx_t_19) < 0) __PYX_ERR(0, 442, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
  PyType_Modified(__pyx_ptype_7questdb_7ingress_TimestampMicros);
  __Pyx_GetNameInClass(__pyx_t_19, (PyObject *)__pyx_ptype_7questdb_7ingress_TimestampMicros, __pyx_n_s_now); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 442, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_19);
  __pyx_t_18 = __Pyx_Method_ClassMethod(__pyx_t_19); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 442, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_18);
  __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_7questdb_7ingress_TimestampMicros, __pyx_n_s_now, __pyx_t_18) < 0) __PYX_ERR(0, 442, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
  PyType_Modified(__pyx_ptype_7questdb_7ingress_TimestampMicros);
  __pyx_codeobj__58 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__57, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_questdb_ingress_pyx, __pyx_n_s_now, 442, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__58)) __PYX_ERR(0, 442, __pyx_L1_error)
 0443:     def now(cls):
 0444:         """
 0445:         Construct a ``TimestampMicros`` from the current time as UTC.
 0446:         """
+0447:         cdef int64_t value = line_sender_now_micros()
  __pyx_v_value = line_sender_now_micros();
+0448:         return cls(value)
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int64_t(__pyx_v_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 448, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_v_cls), __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 448, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;
 0449: 
+0450:     @property
/* Python wrapper */
static PyObject *__pyx_pw_7questdb_7ingress_15TimestampMicros_5value_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7questdb_7ingress_15TimestampMicros_5value_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7questdb_7ingress_15TimestampMicros_5value___get__(((struct __pyx_obj_7questdb_7ingress_TimestampMicros *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7questdb_7ingress_15TimestampMicros_5value___get__(struct __pyx_obj_7questdb_7ingress_TimestampMicros *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
/* … */
  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("questdb.ingress.TimestampMicros.value.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
 0451:     def value(self) -> int:
 0452:         """Number of microseconds (Unix epoch timestamp, UTC)."""
+0453:         return self._value
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int64_t(__pyx_v_self->_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 453, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;
 0454: 
+0455:     def __repr__(self):
/* Python wrapper */
static PyObject *__pyx_pw_7questdb_7ingress_15TimestampMicros_7__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7questdb_7ingress_15TimestampMicros_7__repr__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7questdb_7ingress_15TimestampMicros_6__repr__(((struct __pyx_obj_7questdb_7ingress_TimestampMicros *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7questdb_7ingress_15TimestampMicros_6__repr__(struct __pyx_obj_7questdb_7ingress_TimestampMicros *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
/* … */
  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("questdb.ingress.TimestampMicros.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
+0456:         return f'TimestampMicros.({self._value})'
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 456, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = 0;
  __pyx_t_3 = 127;
  __Pyx_INCREF(__pyx_kp_u_TimestampMicros);
  __pyx_t_2 += 17;
  __Pyx_GIVEREF(__pyx_kp_u_TimestampMicros);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_u_TimestampMicros);
  __pyx_t_4 = __Pyx_PyInt_From_int64_t(__pyx_v_self->_value); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 456, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_FormatSimple(__pyx_t_4, __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 456, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) : __pyx_t_3;
  __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_5);
  __pyx_t_5 = 0;
  __Pyx_INCREF(__pyx_kp_u__12);
  __pyx_t_2 += 1;
  __Pyx_GIVEREF(__pyx_kp_u__12);
  PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_kp_u__12);
  __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_1, 3, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 456, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;
 0457: 
 0458: 
+0459: cdef class TimestampNanos:
struct __pyx_obj_7questdb_7ingress_TimestampNanos {
  PyObject_HEAD
  int64_t _value;
};

 0460:     """
 0461:     A timestamp in nanoseconds since the UNIX epoch (UTC).
 0462: 
 0463:     You may construct a ``TimestampNanos`` from an integer or a
 0464:     ``datetime.datetime``, or simply call the :func:`TimestampNanos.now`
 0465:     method.
 0466: 
 0467:     .. code-block:: python
 0468: 
 0469:         # Recommended way to get the current timestamp.
 0470:         TimestampNanos.now()
 0471: 
 0472:         # The above is equivalent to:
 0473:         TimestampNanos(time.time_ns())
 0474: 
 0475:         # You can provide a numeric timestamp too. It can't be negative.
 0476:         TimestampNanos(1657888365426838016)
 0477: 
 0478:     ``TimestampNanos`` can also be constructed from a ``datetime`` object.
 0479: 
 0480:     .. code-block:: python
 0481: 
 0482:         TimestampNanos.from_datetime(
 0483:             datetime.datetime.now(tz=datetime.timezone.utc))
 0484: 
 0485:     We recommend that when using ``datetime`` objects, you explicitly pass in
 0486:     the timezone to use. This is because ``datetime`` objects without an
 0487:     associated timezone are assumed to be in the local timezone and it is easy
 0488:     to make mistakes (e.g. passing ``datetime.datetime.utcnow()`` is a likely
 0489:     bug).
 0490:     """
 0491:     cdef int64_t _value
 0492: 
+0493:     def __cinit__(self, value: int):
/* Python wrapper */
static int __pyx_pw_7questdb_7ingress_14TimestampNanos_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_7questdb_7ingress_14TimestampNanos_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_value = 0;
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
  #endif
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_value,0};
  PyObject* values[1] = {0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_VARARGS(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_value)) != 0)) {
          (void)__Pyx_Arg_NewRef_VARARGS(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 493, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__cinit__") < 0)) __PYX_ERR(0, 493, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
    }
    __pyx_v_value = ((PyObject*)values[0]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 493, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("questdb.ingress.TimestampNanos.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_value), (&PyInt_Type), 0, "value", 1))) __PYX_ERR(0, 493, __pyx_L1_error)
  __pyx_r = __pyx_pf_7questdb_7ingress_14TimestampNanos___cinit__(((struct __pyx_obj_7questdb_7ingress_TimestampNanos *)__pyx_v_self), __pyx_v_value);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_7questdb_7ingress_14TimestampNanos___cinit__(struct __pyx_obj_7questdb_7ingress_TimestampNanos *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
/* … */
  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("questdb.ingress.TimestampNanos.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
+0494:         if value < 0:
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_value, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 494, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 494, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(__pyx_t_2)) {
/* … */
  }
+0495:             raise ValueError('value must be a positive integer.')
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__30, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 495, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 495, __pyx_L1_error)
+0496:         self._value = value
  __pyx_t_3 = __Pyx_PyInt_As_int64_t(__pyx_v_value); if (unlikely((__pyx_t_3 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 496, __pyx_L1_error)
  __pyx_v_self->_value = __pyx_t_3;
 0497: 
+0498:     @classmethod
/* Python wrapper */
static PyObject *__pyx_pw_7questdb_7ingress_14TimestampNanos_3from_datetime(PyObject *__pyx_v_cls, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7questdb_7ingress_14TimestampNanos_2from_datetime, "\n        Construct a ``TimestampNanos`` from a ``datetime.datetime`` object.\n        ");
static PyMethodDef __pyx_mdef_7questdb_7ingress_14TimestampNanos_3from_datetime = {"from_datetime", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7questdb_7ingress_14TimestampNanos_3from_datetime, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7questdb_7ingress_14TimestampNanos_2from_datetime};
static PyObject *__pyx_pw_7questdb_7ingress_14TimestampNanos_3from_datetime(PyObject *__pyx_v_cls, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyDateTime_DateTime *__pyx_v_dt = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("from_datetime (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_dt,0};
  PyObject* values[1] = {0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_dt)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 498, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "from_datetime") < 0)) __PYX_ERR(0, 498, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_dt = ((PyDateTime_DateTime *)values[0]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("from_datetime", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 498, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("questdb.ingress.TimestampNanos.from_datetime", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dt), __pyx_ptype_7cpython_8datetime_datetime, 0, "dt", 0))) __PYX_ERR(0, 499, __pyx_L1_error)
  __pyx_r = __pyx_pf_7questdb_7ingress_14TimestampNanos_2from_datetime(((PyTypeObject*)__pyx_v_cls), __pyx_v_dt);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7questdb_7ingress_14TimestampNanos_2from_datetime(PyTypeObject *__pyx_v_cls, PyDateTime_DateTime *__pyx_v_dt) {
  PyObject *__pyx_r = NULL;
/* … */
  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("questdb.ingress.TimestampNanos.from_datetime", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
/* … */
  __pyx_t_18 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 498, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_18);
  if (PyDict_SetItem(__pyx_t_18, __pyx_n_s_dt, __pyx_n_s_datetime) < 0) __PYX_ERR(0, 498, __pyx_L1_error)
  __pyx_t_19 = __Pyx_CyFunction_New(&__pyx_mdef_7questdb_7ingress_14TimestampNanos_3from_datetime, __Pyx_CYFUNCTION_CLASSMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_TimestampNanos_from_datetime, NULL, __pyx_n_s_questdb_ingress, __pyx_d, ((PyObject *)__pyx_codeobj__61)); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 498, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_19);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_19, __pyx_t_18);
  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_7questdb_7ingress_TimestampNanos, __pyx_n_s_from_datetime, __pyx_t_19) < 0) __PYX_ERR(0, 498, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
  PyType_Modified(__pyx_ptype_7questdb_7ingress_TimestampNanos);
  __Pyx_GetNameInClass(__pyx_t_19, (PyObject *)__pyx_ptype_7questdb_7ingress_TimestampNanos, __pyx_n_s_from_datetime); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 498, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_19);
  __pyx_t_18 = __Pyx_Method_ClassMethod(__pyx_t_19); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 498, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_18);
  __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_7questdb_7ingress_TimestampNanos, __pyx_n_s_from_datetime, __pyx_t_18) < 0) __PYX_ERR(0, 498, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
  PyType_Modified(__pyx_ptype_7questdb_7ingress_TimestampNanos);
/* … */
  __pyx_codeobj__61 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__55, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_questdb_ingress_pyx, __pyx_n_s_from_datetime, 498, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__61)) __PYX_ERR(0, 498, __pyx_L1_error)
 0499:     def from_datetime(cls, dt: datetime):
 0500:         """
 0501:         Construct a ``TimestampNanos`` from a ``datetime.datetime`` object.
 0502:         """
+0503:         if not isinstance(dt, datetime):
  __pyx_t_1 = __Pyx_TypeCheck(((PyObject *)__pyx_v_dt), __pyx_ptype_7cpython_8datetime_datetime); 
  __pyx_t_2 = (!__pyx_t_1);
  if (unlikely(__pyx_t_2)) {
/* … */
  }
+0504:             raise TypeError('dt must be a datetime object.')
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__31, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 504, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(0, 504, __pyx_L1_error)
+0505:         return cls(datetime_to_nanos(dt))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_4 = __pyx_f_7questdb_7ingress_datetime_to_nanos(__pyx_v_dt); if (unlikely(__pyx_t_4 == ((int64_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 505, __pyx_L1_error)
  __pyx_t_3 = __Pyx_PyInt_From_int64_t(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 505, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_v_cls), __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 505, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;
 0506: 
+0507:     @classmethod
/* Python wrapper */
static PyObject *__pyx_pw_7questdb_7ingress_14TimestampNanos_5now(PyObject *__pyx_v_cls, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7questdb_7ingress_14TimestampNanos_4now, "\n        Construct a ``TimestampNanos`` from the current time as UTC.\n        ");
static PyMethodDef __pyx_mdef_7questdb_7ingress_14TimestampNanos_5now = {"now", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7questdb_7ingress_14TimestampNanos_5now, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7questdb_7ingress_14TimestampNanos_4now};
static PyObject *__pyx_pw_7questdb_7ingress_14TimestampNanos_5now(PyObject *__pyx_v_cls, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("now (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) {
    __Pyx_RaiseArgtupleInvalid("now", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "now", 0))) return NULL;
  __pyx_r = __pyx_pf_7questdb_7ingress_14TimestampNanos_4now(((PyTypeObject*)__pyx_v_cls));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7questdb_7ingress_14TimestampNanos_4now(PyTypeObject *__pyx_v_cls) {
  int64_t __pyx_v_value;
  PyObject *__pyx_r = NULL;
/* … */
  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("questdb.ingress.TimestampNanos.now", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
/* … */
  __pyx_t_18 = __Pyx_CyFunction_New(&__pyx_mdef_7questdb_7ingress_14TimestampNanos_5now, __Pyx_CYFUNCTION_CLASSMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_TimestampNanos_now, NULL, __pyx_n_s_questdb_ingress, __pyx_d, ((PyObject *)__pyx_codeobj__62)); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 507, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_18);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_7questdb_7ingress_TimestampNanos, __pyx_n_s_now, __pyx_t_18) < 0) __PYX_ERR(0, 507, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
  PyType_Modified(__pyx_ptype_7questdb_7ingress_TimestampNanos);
  __Pyx_GetNameInClass(__pyx_t_18, (PyObject *)__pyx_ptype_7questdb_7ingress_TimestampNanos, __pyx_n_s_now); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 507, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_18);
  __pyx_t_19 = __Pyx_Method_ClassMethod(__pyx_t_18); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 507, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_19);
  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_7questdb_7ingress_TimestampNanos, __pyx_n_s_now, __pyx_t_19) < 0) __PYX_ERR(0, 507, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
  PyType_Modified(__pyx_ptype_7questdb_7ingress_TimestampNanos);
/* … */
  __pyx_codeobj__62 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__57, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_questdb_ingress_pyx, __pyx_n_s_now, 507, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__62)) __PYX_ERR(0, 507, __pyx_L1_error)
 0508:     def now(cls):
 0509:         """
 0510:         Construct a ``TimestampNanos`` from the current time as UTC.
 0511:         """
+0512:         cdef int64_t value = line_sender_now_nanos()
  __pyx_v_value = line_sender_now_nanos();
+0513:         return cls(value)
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int64_t(__pyx_v_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 513, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_v_cls), __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 513, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;
 0514: 
+0515:     @property
/* Python wrapper */
static PyObject *__pyx_pw_7questdb_7ingress_14TimestampNanos_5value_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7questdb_7ingress_14TimestampNanos_5value_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7questdb_7ingress_14TimestampNanos_5value___get__(((struct __pyx_obj_7questdb_7ingress_TimestampNanos *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7questdb_7ingress_14TimestampNanos_5value___get__(struct __pyx_obj_7questdb_7ingress_TimestampNanos *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
/* … */
  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("questdb.ingress.TimestampNanos.value.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
 0516:     def value(self) -> int:
 0517:         """Number of nanoseconds (Unix epoch timestamp, UTC)."""
+0518:         return self._value
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int64_t(__pyx_v_self->_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 518, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;
 0519: 
+0520:     def __repr__(self):
/* Python wrapper */
static PyObject *__pyx_pw_7questdb_7ingress_14TimestampNanos_7__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7questdb_7ingress_14TimestampNanos_7__repr__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7questdb_7ingress_14TimestampNanos_6__repr__(((struct __pyx_obj_7questdb_7ingress_TimestampNanos *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7questdb_7ingress_14TimestampNanos_6__repr__(struct __pyx_obj_7questdb_7ingress_TimestampNanos *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
/* … */
  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("questdb.ingress.TimestampNanos.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
+0521:         return f'TimestampNanos({self.value})'
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 521, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = 0;
  __pyx_t_3 = 127;
  __Pyx_INCREF(__pyx_kp_u_TimestampNanos);
  __pyx_t_2 += 15;
  __Pyx_GIVEREF(__pyx_kp_u_TimestampNanos);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_u_TimestampNanos);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_value); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 521, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_FormatSimple(__pyx_t_4, __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 521, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) : __pyx_t_3;
  __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_5);
  __pyx_t_5 = 0;
  __Pyx_INCREF(__pyx_kp_u__12);
  __pyx_t_2 += 1;
  __Pyx_GIVEREF(__pyx_kp_u__12);
  PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_kp_u__12);
  __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_1, 3, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 521, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;
 0522: 
 0523: 
+0524: cdef class Sender
struct __pyx_obj_7questdb_7ingress_Sender {
  PyObject_HEAD
  struct __pyx_vtabstruct_7questdb_7ingress_Sender *__pyx_vtab;
  PyObject *__weakref__;
  enum line_sender_protocol _c_protocol;
  struct line_sender_opts *_opts;
  struct line_sender *_impl;
  struct __pyx_obj_7questdb_7ingress_Buffer *_buffer;
  struct __pyx_t_7questdb_7ingress_auto_flush_mode_t _auto_flush_mode;
  int64_t *_last_flush_ms;
  size_t _init_buf_size;
  size_t _max_name_len;
  int _in_txn;
};


+0525: cdef class Buffer
struct __pyx_obj_7questdb_7ingress_Buffer {
  PyObject_HEAD
  struct __pyx_vtabstruct_7questdb_7ingress_Buffer *__pyx_vtab;
  struct line_sender_buffer *_impl;
  struct qdb_pystr_buf *_b;
  size_t _init_buf_size;
  size_t _max_name_len;
  PyObject *_row_complete_sender;
};

 0526: 
 0527: 
+0528: cdef void_int may_flush_on_row_complete(Buffer buffer, Sender sender) except -1:
static __pyx_t_7questdb_7ingress_void_int __pyx_f_7questdb_7ingress_may_flush_on_row_complete(struct __pyx_obj_7questdb_7ingress_Buffer *__pyx_v_buffer, struct __pyx_obj_7questdb_7ingress_Sender *__pyx_v_sender) {
  __pyx_t_7questdb_7ingress_void_int __pyx_r;
/* … */
  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("questdb.ingress.may_flush_on_row_complete", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
+0529:     if should_auto_flush(
  __pyx_t_1 = __pyx_f_7questdb_7ingress_should_auto_flush((&__pyx_v_sender->_auto_flush_mode), __pyx_v_buffer->_impl, (__pyx_v_sender->_last_flush_ms[0])); if (unlikely(__pyx_t_1 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 529, __pyx_L1_error)
  if (__pyx_t_1) {
/* … */
  }
 0530:             &sender._auto_flush_mode,
 0531:             buffer._impl,
 0532:             sender._last_flush_ms[0]):
+0533:         sender.flush(buffer)
    __pyx_t_3.__pyx_n = 1;
    __pyx_t_3.buffer = __pyx_v_buffer;
    __pyx_t_2 = ((struct __pyx_vtabstruct_7questdb_7ingress_Sender *)__pyx_v_sender->__pyx_vtab)->flush(__pyx_v_sender, 0, &__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 533, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 0534: 
 0535: 
+0536: cdef bint _is_tcp_protocol(line_sender_protocol protocol):
static int __pyx_f_7questdb_7ingress__is_tcp_protocol(enum line_sender_protocol __pyx_v_protocol) {
  int __pyx_r;
/* … */
  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}
 0537:     return (
+0538:         (protocol == line_sender_protocol_tcp) or
  switch (__pyx_v_protocol) {
    case line_sender_protocol_tcp:
    case line_sender_protocol_tcps:
/* … */
    __pyx_t_1 = 1;
/* … */
    break;
    default:
    __pyx_t_1 = 0;
    break;
  }
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;
 0539:         (protocol == line_sender_protocol_tcps))
 0540: 
 0541: 
+0542: cdef class SenderTransaction:
struct __pyx_obj_7questdb_7ingress_SenderTransaction {
  PyObject_HEAD
  struct __pyx_obj_7questdb_7ingress_Sender *_sender;
  PyObject *_table_name;
  int _complete;
};

 0543:     """
 0544:     A transaction for a specific table.
 0545: 
 0546:     Transactions are not supported with ILP/TCP, only ILP/HTTP.
 0547: 
 0548:     The sender API can only operate on one transaction at a time.
 0549: 
 0550:     To create a transaction:
 0551: 
 0552:     .. code_block:: python
 0553: 
 0554:         with sender.transaction('table_name') as txn:
 0555:             txn.row(..)
 0556:             txn.dataframe(..)
 0557:     """
 0558:     cdef Sender _sender
 0559:     cdef str _table_name
 0560:     cdef bint _complete
 0561: 
+0562:     def __cinit__(self, Sender sender, str table_name):
/* Python wrapper */
static int __pyx_pw_7questdb_7ingress_17SenderTransaction_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_7questdb_7ingress_17SenderTransaction_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct __pyx_obj_7questdb_7ingress_Sender *__pyx_v_sender = 0;
  PyObject *__pyx_v_table_name = 0;
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
  #endif
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_sender,&__pyx_n_s_table_name,0};
  PyObject* values[2] = {0,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_VARARGS(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_sender)) != 0)) {
          (void)__Pyx_Arg_NewRef_VARARGS(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 562, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_table_name)) != 0)) {
          (void)__Pyx_Arg_NewRef_VARARGS(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 562, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 2, 2, 1); __PYX_ERR(0, 562, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__cinit__") < 0)) __PYX_ERR(0, 562, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
      values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
    }
    __pyx_v_sender = ((struct __pyx_obj_7questdb_7ingress_Sender *)values[0]);
    __pyx_v_table_name = ((PyObject*)values[1]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 562, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("questdb.ingress.SenderTransaction.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_sender), __pyx_ptype_7questdb_7ingress_Sender, 1, "sender", 0))) __PYX_ERR(0, 562, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_table_name), (&PyUnicode_Type), 1, "table_name", 1))) __PYX_ERR(0, 562, __pyx_L1_error)
  __pyx_r = __pyx_pf_7questdb_7ingress_17SenderTransaction___cinit__(((struct __pyx_obj_7questdb_7ingress_SenderTransaction *)__pyx_v_self), __pyx_v_sender, __pyx_v_table_name);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_7questdb_7ingress_17SenderTransaction___cinit__(struct __pyx_obj_7questdb_7ingress_SenderTransaction *__pyx_v_self, struct __pyx_obj_7questdb_7ingress_Sender *__pyx_v_sender, PyObject *__pyx_v_table_name) {
  int __pyx_r;
/* … */
  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("questdb.ingress.SenderTransaction.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
+0563:         if _is_tcp_protocol(sender._c_protocol):
  __pyx_t_1 = __pyx_f_7questdb_7ingress__is_tcp_protocol(__pyx_v_sender->_c_protocol); if (unlikely(__pyx_t_1 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 563, __pyx_L1_error)
  if (unlikely(__pyx_t_1)) {
/* … */
  }
+0564:             raise IngressError(
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_IngressError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 564, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
+0565:                 IngressErrorCode.InvalidApiCall,
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_IngressErrorCode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 565, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_InvalidApiCall); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 565, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = NULL;
    __pyx_t_6 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
        __pyx_t_6 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[3] = {__pyx_t_4, __pyx_t_5, __pyx_kp_u_Transactions_aren_t_supported_fo};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_6, 2+__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 564, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(0, 564, __pyx_L1_error)
 0566:                 "Transactions aren't supported for ILP/TCP, " +
 0567:                 "use ILP/HTTP instead.")
+0568:         self._sender = sender
  __Pyx_INCREF((PyObject *)__pyx_v_sender);
  __Pyx_GIVEREF((PyObject *)__pyx_v_sender);
  __Pyx_GOTREF((PyObject *)__pyx_v_self->_sender);
  __Pyx_DECREF((PyObject *)__pyx_v_self->_sender);
  __pyx_v_self->_sender = __pyx_v_sender;
+0569:         self._table_name = table_name
  __Pyx_INCREF(__pyx_v_table_name);
  __Pyx_GIVEREF(__pyx_v_table_name);
  __Pyx_GOTREF(__pyx_v_self->_table_name);
  __Pyx_DECREF(__pyx_v_self->_table_name);
  __pyx_v_self->_table_name = __pyx_v_table_name;
+0570:         self._complete = False
  __pyx_v_self->_complete = 0;
 0571: 
+0572:     def __enter__(self):
/* Python wrapper */
static PyObject *__pyx_pw_7questdb_7ingress_17SenderTransaction_3__enter__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_7questdb_7ingress_17SenderTransaction_3__enter__ = {"__enter__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7questdb_7ingress_17SenderTransaction_3__enter__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7questdb_7ingress_17SenderTransaction_3__enter__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__enter__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) {
    __Pyx_RaiseArgtupleInvalid("__enter__", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__enter__", 0))) return NULL;
  __pyx_r = __pyx_pf_7questdb_7ingress_17SenderTransaction_2__enter__(((struct __pyx_obj_7questdb_7ingress_SenderTransaction *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7questdb_7ingress_17SenderTransaction_2__enter__(struct __pyx_obj_7questdb_7ingress_SenderTransaction *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
/* … */
  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("questdb.ingress.SenderTransaction.__enter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
/* … */
  __pyx_t_19 = __Pyx_CyFunction_New(&__pyx_mdef_7questdb_7ingress_17SenderTransaction_3__enter__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SenderTransaction___enter, NULL, __pyx_n_s_questdb_ingress, __pyx_d, ((PyObject *)__pyx_codeobj__65)); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 572, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_19);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_7questdb_7ingress_SenderTransaction, __pyx_n_s_enter, __pyx_t_19) < 0) __PYX_ERR(0, 572, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
  PyType_Modified(__pyx_ptype_7questdb_7ingress_SenderTransaction);
/* … */
  __pyx_codeobj__65 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__48, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_questdb_ingress_pyx, __pyx_n_s_enter, 572, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__65)) __PYX_ERR(0, 572, __pyx_L1_error)
+0573:         if self._sender._in_txn:
  if (unlikely(__pyx_v_self->_sender->_in_txn)) {
/* … */
  }
+0574:             raise IngressError(
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_IngressError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 574, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
+0575:                 IngressErrorCode.InvalidApiCall,
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_IngressErrorCode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 575, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_InvalidApiCall); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 575, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = NULL;
    __pyx_t_5 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
        __pyx_t_5 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_t_4, __pyx_kp_u_Already_inside_a_transaction_can};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 2+__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 574, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 574, __pyx_L1_error)
 0576:                 'Already inside a transaction, can\'t start another.')
+0577:         if len(self._sender._buffer):
  __pyx_t_1 = ((PyObject *)__pyx_v_self->_sender->_buffer);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_6 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 577, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_7 = (__pyx_t_6 != 0);
  if (__pyx_t_7) {
/* … */
  }
+0578:             if self._sender._auto_flush_mode.enabled:
    if (likely(__pyx_v_self->_sender->_auto_flush_mode.enabled)) {
/* … */
      goto __pyx_L5;
    }
+0579:                 self._sender.flush()
      __pyx_t_1 = ((struct __pyx_vtabstruct_7questdb_7ingress_Sender *)__pyx_v_self->_sender->__pyx_vtab)->flush(__pyx_v_self->_sender, 0, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 579, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 0580:             else:
+0581:                 raise IngressError(
    /*else*/ {
      __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_IngressError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 581, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
+0582:                     IngressErrorCode.InvalidApiCall,
      __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_IngressErrorCode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 582, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_InvalidApiCall); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 582, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = NULL;
      __pyx_t_5 = 0;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_2))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
        if (likely(__pyx_t_4)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_2, function);
          __pyx_t_5 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[3] = {__pyx_t_4, __pyx_t_3, __pyx_kp_u_Sender_buffer_must_be_clear_when};
        __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 2+__pyx_t_5);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 581, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      }
      __Pyx_Raise(__pyx_t_1, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __PYX_ERR(0, 581, __pyx_L1_error)
    }
    __pyx_L5:;
 0583:                     'Sender buffer must be clear when starting a ' +
 0584:                     'transaction. You must call `.flush()` before this call.')
+0585:         self._sender._in_txn = True
  __pyx_v_self->_sender->_in_txn = 1;
+0586:         return self
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_self);
  __pyx_r = ((PyObject *)__pyx_v_self);
  goto __pyx_L0;
 0587: 
+0588:     def __exit__(self, exc_type, _exc_value, _traceback):
/* Python wrapper */
static PyObject *__pyx_pw_7questdb_7ingress_17SenderTransaction_5__exit__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_7questdb_7ingress_17SenderTransaction_5__exit__ = {"__exit__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7questdb_7ingress_17SenderTransaction_5__exit__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7questdb_7ingress_17SenderTransaction_5__exit__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_exc_type = 0;
  CYTHON_UNUSED PyObject *__pyx_v__exc_value = 0;
  CYTHON_UNUSED PyObject *__pyx_v__traceback = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__exit__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_exc_type,&__pyx_n_s_exc_value,&__pyx_n_s_traceback,0};
  PyObject* values[3] = {0,0,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_exc_type)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 588, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_exc_value)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 588, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__exit__", 1, 3, 3, 1); __PYX_ERR(0, 588, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_traceback)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[2]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 588, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__exit__", 1, 3, 3, 2); __PYX_ERR(0, 588, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__exit__") < 0)) __PYX_ERR(0, 588, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 3)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
      values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
    }
    __pyx_v_exc_type = values[0];
    __pyx_v__exc_value = values[1];
    __pyx_v__traceback = values[2];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__exit__", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 588, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("questdb.ingress.SenderTransaction.__exit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7questdb_7ingress_17SenderTransaction_4__exit__(((struct __pyx_obj_7questdb_7ingress_SenderTransaction *)__pyx_v_self), __pyx_v_exc_type, __pyx_v__exc_value, __pyx_v__traceback);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7questdb_7ingress_17SenderTransaction_4__exit__(struct __pyx_obj_7questdb_7ingress_SenderTransaction *__pyx_v_self, PyObject *__pyx_v_exc_type, CYTHON_UNUSED PyObject *__pyx_v__exc_value, CYTHON_UNUSED PyObject *__pyx_v__traceback) {
  PyObject *__pyx_r = NULL;
/* … */
  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("questdb.ingress.SenderTransaction.__exit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
/* … */
  __pyx_tuple__66 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_exc_type, __pyx_n_s_exc_value, __pyx_n_s_traceback); if (unlikely(!__pyx_tuple__66)) __PYX_ERR(0, 588, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__66);
  __Pyx_GIVEREF(__pyx_tuple__66);
/* … */
  __pyx_t_19 = __Pyx_CyFunction_New(&__pyx_mdef_7questdb_7ingress_17SenderTransaction_5__exit__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SenderTransaction___exit, NULL, __pyx_n_s_questdb_ingress, __pyx_d, ((PyObject *)__pyx_codeobj__67)); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 588, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_19);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_7questdb_7ingress_SenderTransaction, __pyx_n_s_exit, __pyx_t_19) < 0) __PYX_ERR(0, 588, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
  PyType_Modified(__pyx_ptype_7questdb_7ingress_SenderTransaction);
  __pyx_codeobj__67 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__66, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_questdb_ingress_pyx, __pyx_n_s_exit, 588, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__67)) __PYX_ERR(0, 588, __pyx_L1_error)
+0589:         if exc_type is not None:
  __pyx_t_1 = (__pyx_v_exc_type != Py_None);
  if (__pyx_t_1) {
/* … */
  }
+0590:             if not self._complete:
    __pyx_t_1 = (!__pyx_v_self->_complete);
    if (__pyx_t_1) {
/* … */
    }
+0591:                 self.rollback()
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_rollback); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 591, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = NULL;
      __pyx_t_5 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_4)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
          __pyx_t_5 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
        __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 591, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      }
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+0592:             return False
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(Py_False);
    __pyx_r = Py_False;
    goto __pyx_L0;
 0593:         else:
+0594:             if not self._complete:
  /*else*/ {
    __pyx_t_1 = (!__pyx_v_self->_complete);
    if (__pyx_t_1) {
/* … */
    }
+0595:                 self.commit()
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_commit); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 595, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = NULL;
      __pyx_t_5 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_4)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
          __pyx_t_5 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
        __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 595, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      }
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+0596:             return True
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(Py_True);
    __pyx_r = Py_True;
    goto __pyx_L0;
  }
 0597: 
+0598:     def row(
/* Python wrapper */
static PyObject *__pyx_pw_7questdb_7ingress_17SenderTransaction_7row(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7questdb_7ingress_17SenderTransaction_6row, "\n        Write a row for the table in the transaction.\n\n        The table name is taken from the transaction.\n        ");
static PyMethodDef __pyx_mdef_7questdb_7ingress_17SenderTransaction_7row = {"row", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7questdb_7ingress_17SenderTransaction_7row, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7questdb_7ingress_17SenderTransaction_6row};
static PyObject *__pyx_pw_7questdb_7ingress_17SenderTransaction_7row(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_symbols = 0;
  PyObject *__pyx_v_columns = 0;
  PyObject *__pyx_v_at = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("row (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_at,&__pyx_n_s_symbols,&__pyx_n_s_columns,0};
  PyObject* values[3] = {0,0,0};
/* … */
  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7questdb_7ingress_17SenderTransaction_6row(struct __pyx_obj_7questdb_7ingress_SenderTransaction *__pyx_v_self, PyObject *__pyx_v_symbols, PyObject *__pyx_v_columns, PyObject *__pyx_v_at) {
  PyObject *__pyx_r = NULL;
/* … */
  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("questdb.ingress.SenderTransaction.row", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
/* … */
  __pyx_tuple__68 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_symbols, __pyx_n_s_columns, __pyx_n_s_at); if (unlikely(!__pyx_tuple__68)) __PYX_ERR(0, 598, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__68);
  __Pyx_GIVEREF(__pyx_tuple__68);
/* … */
  __pyx_t_19 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 598, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_19);
/* … */
  __pyx_t_18 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 598, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_18);
  if (PyDict_SetItem(__pyx_t_18, __pyx_n_s_symbols, __pyx_kp_s_Optional_Dict_str_Optional_str) < 0) __PYX_ERR(0, 598, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_18, __pyx_n_s_columns, __pyx_kp_s_Optional_Dict_str_Union_None_boo) < 0) __PYX_ERR(0, 598, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_18, __pyx_n_s_at, __pyx_kp_s_Union_ServerTimestamp_TimestampN) < 0) __PYX_ERR(0, 598, __pyx_L1_error)
  __pyx_t_20 = __Pyx_CyFunction_New(&__pyx_mdef_7questdb_7ingress_17SenderTransaction_7row, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SenderTransaction_row, NULL, __pyx_n_s_questdb_ingress, __pyx_d, ((PyObject *)__pyx_codeobj__69)); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 598, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_20);
  __Pyx_CyFunction_SetDefaultsKwDict(__pyx_t_20, __pyx_t_19);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_20, __pyx_t_18);
  __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_7questdb_7ingress_SenderTransaction, __pyx_n_s_row, __pyx_t_20) < 0) __PYX_ERR(0, 598, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
  PyType_Modified(__pyx_ptype_7questdb_7ingress_SenderTransaction);
  __pyx_codeobj__69 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__68, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_questdb_ingress_pyx, __pyx_n_s_row, 598, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__69)) __PYX_ERR(0, 598, __pyx_L1_error)
 0599:             self,
 0600:             *,
+0601:             symbols: Optional[Dict[str, Optional[str]]]=None,
    values[1] = __Pyx_Arg_NewRef_FASTCALL(((PyObject*)Py_None));
/* … */
  if (PyDict_SetItem(__pyx_t_19, __pyx_n_s_symbols, Py_None) < 0) __PYX_ERR(0, 598, __pyx_L1_error)
 0602:             columns: Optional[Dict[
 0603:                 str,
 0604:                 Union[None, bool, int, float, str, TimestampMicros, datetime]]
+0605:                 ]=None,
    values[2] = __Pyx_Arg_NewRef_FASTCALL(((PyObject*)Py_None));
    if (likely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_at)) != 0)) {
        (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
        kw_args--;
      }
      else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 598, __pyx_L3_error)
      else {
        __Pyx_RaiseKeywordRequired("row", __pyx_n_s_at); __PYX_ERR(0, 598, __pyx_L3_error)
      }
      if (kw_args > 0 && likely(kw_args <= 2)) {
        Py_ssize_t index;
        for (index = 1; index < 3 && kw_args > 0; index++) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, *__pyx_pyargnames[index]);
          if (value) { values[index] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 598, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, 0, "row") < 0)) __PYX_ERR(0, 598, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 0)) {
      goto __pyx_L5_argtuple_error;
    } else {
      __Pyx_RaiseKeywordRequired("row", __pyx_n_s_at); __PYX_ERR(0, 598, __pyx_L3_error)
    }
    __pyx_v_at = values[0];
    __pyx_v_symbols = ((PyObject*)values[1]);
    __pyx_v_columns = ((PyObject*)values[2]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("row", 1, 0, 0, __pyx_nargs); __PYX_ERR(0, 598, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("questdb.ingress.SenderTransaction.row", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_symbols), (&PyDict_Type), 1, "symbols", 1))) __PYX_ERR(0, 601, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_columns), (&PyDict_Type), 1, "columns", 1))) __PYX_ERR(0, 602, __pyx_L1_error)
  __pyx_r = __pyx_pf_7questdb_7ingress_17SenderTransaction_6row(((struct __pyx_obj_7questdb_7ingress_SenderTransaction *)__pyx_v_self), __pyx_v_symbols, __pyx_v_columns, __pyx_v_at);
/* … */
  if (PyDict_SetItem(__pyx_t_19, __pyx_n_s_columns, Py_None) < 0) __PYX_ERR(0, 598, __pyx_L1_error)
 0606:             at: Union[ServerTimestamp, TimestampNanos, datetime]):
 0607:         """
 0608:         Write a row for the table in the transaction.
 0609: 
 0610:         The table name is taken from the transaction.
 0611:         """
+0612:         if at is None:
  __pyx_t_1 = (__pyx_v_at == Py_None);
  if (unlikely(__pyx_t_1)) {
/* … */
  }
+0613:             raise IngressError(
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_IngressError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 613, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
+0614:                 IngressErrorCode.InvalidTimestamp,
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_IngressErrorCode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 614, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_InvalidTimestamp); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 614, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = NULL;
    __pyx_t_6 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
        __pyx_t_6 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[3] = {__pyx_t_4, __pyx_t_5, __pyx_kp_u_at_must_be_of_type_TimestampNan};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_6, 2+__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 613, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(0, 613, __pyx_L1_error)
 0615:                 "`at` must be of type TimestampNanos, datetime, or ServerTimestamp"
 0616:             )
+0617:         self._sender._buffer._row(
  __pyx_t_8.__pyx_n = 3;
  __pyx_t_8.symbols = __pyx_v_symbols;
  __pyx_t_8.columns = __pyx_v_columns;
  __pyx_t_8.at = __pyx_v_at;
  __pyx_t_7 = ((struct __pyx_vtabstruct_7questdb_7ingress_Buffer *)__pyx_v_self->_sender->_buffer->__pyx_vtab)->_row(__pyx_v_self->_sender->_buffer, 0, ((PyObject*)__pyx_t_2), &__pyx_t_8); if (unlikely(__pyx_t_7 == ((__pyx_t_7questdb_7ingress_void_int)-1))) __PYX_ERR(0, 617, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 0618:             False,  # allow_auto_flush
+0619:             self._table_name,
  __pyx_t_2 = __pyx_v_self->_table_name;
  __Pyx_INCREF(__pyx_t_2);
 0620:             symbols=symbols,
 0621:             columns=columns,
 0622:             at=at)
+0623:         return self
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_self);
  __pyx_r = ((PyObject *)__pyx_v_self);
  goto __pyx_L0;
 0624: 
+0625:     def dataframe(
/* Python wrapper */
static PyObject *__pyx_pw_7questdb_7ingress_17SenderTransaction_9dataframe(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7questdb_7ingress_17SenderTransaction_8dataframe, "\n        Write a dataframe for the table in the transaction.\n\n        The table name is taken from the transaction.\n        ");
static PyMethodDef __pyx_mdef_7questdb_7ingress_17SenderTransaction_9dataframe = {"dataframe", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7questdb_7ingress_17SenderTransaction_9dataframe, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7questdb_7ingress_17SenderTransaction_8dataframe};
static PyObject *__pyx_pw_7questdb_7ingress_17SenderTransaction_9dataframe(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_df = 0;
  PyObject *__pyx_v_symbols = 0;
  PyObject *__pyx_v_at = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("dataframe (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_df,&__pyx_n_s_at,&__pyx_n_s_symbols,0};
  PyObject* values[3] = {0,0,0};
    values[2] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)__pyx_n_u_auto));
    if (likely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_df)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 625, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_at)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 625, __pyx_L3_error)
        else {
          __Pyx_RaiseKeywordRequired("dataframe", __pyx_n_s_at); __PYX_ERR(0, 625, __pyx_L3_error)
        }
      }
      if (kw_args == 1) {
        const Py_ssize_t index = 2;
        PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, *__pyx_pyargnames[index]);
        if (value) { values[index] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 625, __pyx_L3_error)
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "dataframe") < 0)) __PYX_ERR(0, 625, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      __Pyx_RaiseKeywordRequired("dataframe", __pyx_n_s_at); __PYX_ERR(0, 625, __pyx_L3_error)
    }
    __pyx_v_df = values[0];
    __pyx_v_at = values[1];
    __pyx_v_symbols = values[2];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("dataframe", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 625, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("questdb.ingress.SenderTransaction.dataframe", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7questdb_7ingress_17SenderTransaction_8dataframe(((struct __pyx_obj_7questdb_7ingress_SenderTransaction *)__pyx_v_self), __pyx_v_df, __pyx_v_symbols, __pyx_v_at);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7questdb_7ingress_17SenderTransaction_8dataframe(struct __pyx_obj_7questdb_7ingress_SenderTransaction *__pyx_v_self, PyObject *__pyx_v_df, PyObject *__pyx_v_symbols, PyObject *__pyx_v_at) {
  PyObject *__pyx_r = NULL;
/* … */
  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("questdb.ingress.SenderTransaction.dataframe", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
/* … */
  __pyx_tuple__70 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_df, __pyx_n_s_symbols, __pyx_n_s_at); if (unlikely(!__pyx_tuple__70)) __PYX_ERR(0, 625, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__70);
  __Pyx_GIVEREF(__pyx_tuple__70);
/* … */
  __pyx_t_20 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 625, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_20);
  if (PyDict_SetItem(__pyx_t_20, __pyx_n_s_symbols, __pyx_n_u_auto) < 0) __PYX_ERR(0, 625, __pyx_L1_error)
  __pyx_t_18 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 625, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_18);
  if (PyDict_SetItem(__pyx_t_18, __pyx_n_s_symbols, __pyx_kp_s_Union_str_bool_List_int_List_str) < 0) __PYX_ERR(0, 625, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_18, __pyx_n_s_at, __pyx_kp_s_Union_ServerTimestamp_int_str_Ti) < 0) __PYX_ERR(0, 625, __pyx_L1_error)
  __pyx_t_19 = __Pyx_CyFunction_New(&__pyx_mdef_7questdb_7ingress_17SenderTransaction_9dataframe, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SenderTransaction_dataframe, NULL, __pyx_n_s_questdb_ingress, __pyx_d, ((PyObject *)__pyx_codeobj__71)); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 625, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_19);
  __Pyx_CyFunction_SetDefaultsKwDict(__pyx_t_19, __pyx_t_20);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_19, __pyx_t_18);
  __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_7questdb_7ingress_SenderTransaction, __pyx_n_s_dataframe, __pyx_t_19) < 0) __PYX_ERR(0, 625, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
  PyType_Modified(__pyx_ptype_7questdb_7ingress_SenderTransaction);
  __pyx_codeobj__71 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__70, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_questdb_ingress_pyx, __pyx_n_s_dataframe, 625, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__71)) __PYX_ERR(0, 625, __pyx_L1_error)
 0626:             self,
 0627:             df,  # : pd.DataFrame
 0628:             *,
 0629:             symbols: Union[str, bool, List[int], List[str]] = 'auto',
 0630:             at: Union[ServerTimestamp, int, str, TimestampNanos, datetime]):
 0631:         """
 0632:         Write a dataframe for the table in the transaction.
 0633: 
 0634:         The table name is taken from the transaction.
 0635:         """
+0636:         if at is None:
  __pyx_t_1 = (__pyx_v_at == Py_None);
  if (unlikely(__pyx_t_1)) {
/* … */
  }
+0637:             raise IngressError(
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_IngressError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 637, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
+0638:                 IngressErrorCode.InvalidTimestamp,
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_IngressErrorCode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 638, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_InvalidTimestamp); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 638, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = NULL;
    __pyx_t_6 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
        __pyx_t_6 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[3] = {__pyx_t_4, __pyx_t_5, __pyx_kp_u_at_must_be_of_type_TimestampNan};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_6, 2+__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 637, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(0, 637, __pyx_L1_error)
 0639:                 "`at` must be of type TimestampNanos, datetime, or ServerTimestamp"
 0640:             )
+0641:         _dataframe(
  __pyx_t_7 = __pyx_f_7questdb_7ingress__dataframe(__pyx_f_7questdb_7ingress_auto_flush_blank(), __pyx_v_self->_sender->_buffer->_impl, __pyx_v_self->_sender->_buffer->_b, __pyx_v_df, __pyx_t_2, Py_None, __pyx_v_symbols, __pyx_v_at); if (unlikely(__pyx_t_7 == ((__pyx_t_7questdb_7ingress_void_int)-1))) __PYX_ERR(0, 641, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 0642:             auto_flush_blank(),
 0643:             self._sender._buffer._impl,
 0644:             self._sender._buffer._b,
 0645:             df,
+0646:             self._table_name,
  __pyx_t_2 = __pyx_v_self->_table_name;
  __Pyx_INCREF(__pyx_t_2);
 0647:             None, # table_name_col,
 0648:             symbols,
 0649:             at)
+0650:         return self
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_self);
  __pyx_r = ((PyObject *)__pyx_v_self);
  goto __pyx_L0;
 0651: 
+0652:     def commit(self):
/* Python wrapper */
static PyObject *__pyx_pw_7questdb_7ingress_17SenderTransaction_11commit(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7questdb_7ingress_17SenderTransaction_10commit, "\n        Commit the transaction.\n        \n        A commit is also automatic at the end of a successful `with` block.\n\n        This will flush the buffer.\n        ");
static PyMethodDef __pyx_mdef_7questdb_7ingress_17SenderTransaction_11commit = {"commit", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7questdb_7ingress_17SenderTransaction_11commit, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7questdb_7ingress_17SenderTransaction_10commit};
static PyObject *__pyx_pw_7questdb_7ingress_17SenderTransaction_11commit(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("commit (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) {
    __Pyx_RaiseArgtupleInvalid("commit", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "commit", 0))) return NULL;
  __pyx_r = __pyx_pf_7questdb_7ingress_17SenderTransaction_10commit(((struct __pyx_obj_7questdb_7ingress_SenderTransaction *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7questdb_7ingress_17SenderTransaction_10commit(struct __pyx_obj_7questdb_7ingress_SenderTransaction *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
/* … */
  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("questdb.ingress.SenderTransaction.commit", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
/* … */
  __pyx_t_19 = __Pyx_CyFunction_New(&__pyx_mdef_7questdb_7ingress_17SenderTransaction_11commit, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SenderTransaction_commit, NULL, __pyx_n_s_questdb_ingress, __pyx_d, ((PyObject *)__pyx_codeobj__72)); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 652, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_19);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_7questdb_7ingress_SenderTransaction, __pyx_n_s_commit, __pyx_t_19) < 0) __PYX_ERR(0, 652, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
  PyType_Modified(__pyx_ptype_7questdb_7ingress_SenderTransaction);
/* … */
  __pyx_codeobj__72 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__48, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_questdb_ingress_pyx, __pyx_n_s_commit, 652, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__72)) __PYX_ERR(0, 652, __pyx_L1_error)
 0653:         """
 0654:         Commit the transaction.
 0655: 
 0656:         A commit is also automatic at the end of a successful `with` block.
 0657: 
 0658:         This will flush the buffer.
 0659:         """
+0660:         if self._complete:
  if (unlikely(__pyx_v_self->_complete)) {
/* … */
  }
+0661:             raise IngressError(
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_IngressError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 661, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
+0662:                 IngressErrorCode.InvalidApiCall,
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_IngressErrorCode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 662, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_InvalidApiCall); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 662, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = NULL;
    __pyx_t_5 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
        __pyx_t_5 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_t_4, __pyx_kp_u_Transaction_already_completed_ca};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 2+__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 661, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 661, __pyx_L1_error)
 0663:                 'Transaction already completed, can\'t commit')
+0664:         self._sender._in_txn = False
  __pyx_v_self->_sender->_in_txn = 0;
+0665:         self._complete = True
  __pyx_v_self->_complete = 1;
+0666:         if len(self._sender._buffer):
  __pyx_t_1 = ((PyObject *)__pyx_v_self->_sender->_buffer);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_6 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 666, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_7 = (__pyx_t_6 != 0);
  if (__pyx_t_7) {
/* … */
  }
+0667:             self._sender.flush(transactional=True)
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->_sender), __pyx_n_s_flush); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 667, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 667, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_transactional, Py_True) < 0) __PYX_ERR(0, 667, __pyx_L1_error)
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 667, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
 0668: 
+0669:     def rollback(self):
/* Python wrapper */
static PyObject *__pyx_pw_7questdb_7ingress_17SenderTransaction_13rollback(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7questdb_7ingress_17SenderTransaction_12rollback, "\n        Roll back the transaction.\n\n        A rollback is also automatic at the end of a failed `with` block.\n\n        This will clear the buffer.\n        ");
static PyMethodDef __pyx_mdef_7questdb_7ingress_17SenderTransaction_13rollback = {"rollback", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7questdb_7ingress_17SenderTransaction_13rollback, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7questdb_7ingress_17SenderTransaction_12rollback};
static PyObject *__pyx_pw_7questdb_7ingress_17SenderTransaction_13rollback(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("rollback (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) {
    __Pyx_RaiseArgtupleInvalid("rollback", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "rollback", 0))) return NULL;
  __pyx_r = __pyx_pf_7questdb_7ingress_17SenderTransaction_12rollback(((struct __pyx_obj_7questdb_7ingress_SenderTransaction *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7questdb_7ingress_17SenderTransaction_12rollback(struct __pyx_obj_7questdb_7ingress_SenderTransaction *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
/* … */
  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("questdb.ingress.SenderTransaction.rollback", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
/* … */
  __pyx_t_19 = __Pyx_CyFunction_New(&__pyx_mdef_7questdb_7ingress_17SenderTransaction_13rollback, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SenderTransaction_rollback, NULL, __pyx_n_s_questdb_ingress, __pyx_d, ((PyObject *)__pyx_codeobj__73)); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 669, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_19);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_7questdb_7ingress_SenderTransaction, __pyx_n_s_rollback, __pyx_t_19) < 0) __PYX_ERR(0, 669, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
  PyType_Modified(__pyx_ptype_7questdb_7ingress_SenderTransaction);
/* … */
  __pyx_codeobj__73 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__48, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_questdb_ingress_pyx, __pyx_n_s_rollback, 669, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__73)) __PYX_ERR(0, 669, __pyx_L1_error)
 0670:         """
 0671:         Roll back the transaction.
 0672: 
 0673:         A rollback is also automatic at the end of a failed `with` block.
 0674: 
 0675:         This will clear the buffer.
 0676:         """
+0677:         if self._complete:
  if (unlikely(__pyx_v_self->_complete)) {
/* … */
  }
+0678:             raise IngressError(
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_IngressError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 678, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
+0679:                 IngressErrorCode.InvalidApiCall,
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_IngressErrorCode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 679, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_InvalidApiCall); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 679, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = NULL;
    __pyx_t_5 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
        __pyx_t_5 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_t_4, __pyx_kp_u_Transaction_already_completed_ca_2};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 2+__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 678, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 678, __pyx_L1_error)
 0680:                 'Transaction already completed, can\'t rollback.')
+0681:         self._sender._buffer.clear()
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->_sender->_buffer), __pyx_n_s_clear); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 681, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_5 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 681, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+0682:         self._sender._in_txn = False
  __pyx_v_self->_sender->_in_txn = 0;
+0683:         self._complete = True
  __pyx_v_self->_complete = 1;
 0684: 
 0685: 
+0686: cdef class Buffer:
struct __pyx_vtabstruct_7questdb_7ingress_Buffer {
  PyObject *(*_cinit_impl)(struct __pyx_obj_7questdb_7ingress_Buffer *, size_t, size_t);
  PyObject *(*_to_str)(struct __pyx_obj_7questdb_7ingress_Buffer *);
  __pyx_t_7questdb_7ingress_void_int (*_set_marker)(struct __pyx_obj_7questdb_7ingress_Buffer *);
  __pyx_t_7questdb_7ingress_void_int (*_rewind_to_marker)(struct __pyx_obj_7questdb_7ingress_Buffer *);
  PyObject *(*_clear_marker)(struct __pyx_obj_7questdb_7ingress_Buffer *);
  __pyx_t_7questdb_7ingress_void_int (*_table)(struct __pyx_obj_7questdb_7ingress_Buffer *, PyObject *);
  struct qdb_pystr_buf *(*_cleared_b)(struct __pyx_obj_7questdb_7ingress_Buffer *);
  __pyx_t_7questdb_7ingress_void_int (*_symbol)(struct __pyx_obj_7questdb_7ingress_Buffer *, PyObject *, PyObject *);
  __pyx_t_7questdb_7ingress_void_int (*_column_bool)(struct __pyx_obj_7questdb_7ingress_Buffer *, struct line_sender_column_name, int);
  __pyx_t_7questdb_7ingress_void_int (*_column_i64)(struct __pyx_obj_7questdb_7ingress_Buffer *, struct line_sender_column_name, int64_t);
  __pyx_t_7questdb_7ingress_void_int (*_column_f64)(struct __pyx_obj_7questdb_7ingress_Buffer *, struct line_sender_column_name, double);
  __pyx_t_7questdb_7ingress_void_int (*_column_str)(struct __pyx_obj_7questdb_7ingress_Buffer *, struct line_sender_column_name, PyObject *);
  __pyx_t_7questdb_7ingress_void_int (*_column_ts)(struct __pyx_obj_7questdb_7ingress_Buffer *, struct line_sender_column_name, struct __pyx_obj_7questdb_7ingress_TimestampMicros *);
  __pyx_t_7questdb_7ingress_void_int (*_column_dt)(struct __pyx_obj_7questdb_7ingress_Buffer *, struct line_sender_column_name, PyDateTime_DateTime *);
  __pyx_t_7questdb_7ingress_void_int (*_column)(struct __pyx_obj_7questdb_7ingress_Buffer *, PyObject *, PyObject *);
  __pyx_t_7questdb_7ingress_void_int (*_may_trigger_row_complete)(struct __pyx_obj_7questdb_7ingress_Buffer *);
  __pyx_t_7questdb_7ingress_void_int (*_at_ts)(struct __pyx_obj_7questdb_7ingress_Buffer *, struct __pyx_obj_7questdb_7ingress_TimestampNanos *);
  __pyx_t_7questdb_7ingress_void_int (*_at_dt)(struct __pyx_obj_7questdb_7ingress_Buffer *, PyDateTime_DateTime *);
  __pyx_t_7questdb_7ingress_void_int (*_at_now)(struct __pyx_obj_7questdb_7ingress_Buffer *);
  __pyx_t_7questdb_7ingress_void_int (*_at)(struct __pyx_obj_7questdb_7ingress_Buffer *, PyObject *);
  __pyx_t_7questdb_7ingress_void_int (*_row)(struct __pyx_obj_7questdb_7ingress_Buffer *, int, PyObject *, struct __pyx_opt_args_7questdb_7ingress_6Buffer__row *__pyx_optional_args);
};
static struct __pyx_vtabstruct_7questdb_7ingress_Buffer *__pyx_vtabptr_7questdb_7ingress_Buffer;
 0687:     """
 0688:     Construct QuestDB-flavored InfluxDB Line Protocol (ILP) messages.
 0689: 
 0690:     The :func:`Buffer.row` method is used to add a row to the buffer.
 0691: 
 0692:     You can call this many times.
 0693: 
 0694:     .. code-block:: python
 0695: 
 0696:         from questdb.ingress import Buffer
 0697: 
 0698:         buf = Buffer()
 0699:         buf.row(
 0700:             'table_name1',
 0701:             symbols={'s1', 'v1', 's2', 'v2'},
 0702:             columns={'c1': True, 'c2': 0.5})
 0703: 
 0704:         buf.row(
 0705:             'table_name2',
 0706:             symbols={'questdb': '❤️'},
 0707:             columns={'like': 100000})
 0708: 
 0709:         # Append any additional rows then, once ready, call
 0710:         sender.flush(buffer)  # a `Sender` instance.
 0711: 
 0712:         # The sender auto-cleared the buffer, ready for reuse.
 0713: 
 0714:         buf.row(
 0715:             'table_name1',
 0716:             symbols={'s1', 'v1', 's2', 'v2'},
 0717:             columns={'c1': True, 'c2': 0.5})
 0718: 
 0719:         # etc.
 0720: 
 0721: 
 0722:     Buffer Constructor Arguments:
 0723:       * ``init_buf_size`` (``int``): Initial capacity of the buffer in bytes.
 0724:         Defaults to ``65536`` (64KiB).
 0725:       * ``max_name_len`` (``int``): Maximum length of a column name.
 0726:         Defaults to ``127`` which is the same default value as QuestDB.
 0727:         This should match the ``cairo.max.file.name.length`` setting of the
 0728:         QuestDB instance you're connecting to.
 0729: 
 0730:     .. code-block:: python
 0731: 
 0732:         # These two buffer constructions are equivalent.
 0733:         buf1 = Buffer()
 0734:         buf2 = Buffer(init_buf_size=65536, max_name_len=127)
 0735: 
 0736:     To avoid having to manually set these arguments every time, you can call
 0737:     the sender's ``new_buffer()`` method instead.
 0738: 
 0739:     .. code-block:: python
 0740: 
 0741:         from questdb.ingress import Sender, Buffer
 0742: 
 0743:         sender = Sender('http', 'localhost', 9009,
 0744:             init_buf_size=16384, max_name_len=64)
 0745:         buf = sender.new_buffer()
 0746:         assert buf.init_buf_size == 16384
 0747:         assert buf.max_name_len == 64
 0748: 
 0749:     """
 0750:     cdef line_sender_buffer* _impl
 0751:     cdef qdb_pystr_buf* _b
 0752:     cdef size_t _init_buf_size
 0753:     cdef size_t _max_name_len
 0754:     cdef object _row_complete_sender
 0755: 
+0756:     def __cinit__(self, init_buf_size: int=65536, max_name_len: int=127):
/* Python wrapper */
static int __pyx_pw_7questdb_7ingress_6Buffer_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_7questdb_7ingress_6Buffer_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_init_buf_size = 0;
  PyObject *__pyx_v_max_name_len = 0;
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
  #endif
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_init_buf_size,&__pyx_n_s_max_name_len,0};
  PyObject* values[2] = {0,0};
    values[0] = __Pyx_Arg_NewRef_VARARGS(__pyx_k__32);
    values[1] = __Pyx_Arg_NewRef_VARARGS(__pyx_k__33);
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_VARARGS(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_init_buf_size);
          if (value) { values[0] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 756, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_max_name_len);
          if (value) { values[1] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 756, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__cinit__") < 0)) __PYX_ERR(0, 756, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_init_buf_size = ((PyObject*)values[0]);
    __pyx_v_max_name_len = ((PyObject*)values[1]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 2, __pyx_nargs); __PYX_ERR(0, 756, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("questdb.ingress.Buffer.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_init_buf_size), (&PyInt_Type), 0, "init_buf_size", 1))) __PYX_ERR(0, 756, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_max_name_len), (&PyInt_Type), 0, "max_name_len", 1))) __PYX_ERR(0, 756, __pyx_L1_error)
  __pyx_r = __pyx_pf_7questdb_7ingress_6Buffer___cinit__(((struct __pyx_obj_7questdb_7ingress_Buffer *)__pyx_v_self), __pyx_v_init_buf_size, __pyx_v_max_name_len);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_7questdb_7ingress_6Buffer___cinit__(struct __pyx_obj_7questdb_7ingress_Buffer *__pyx_v_self, PyObject *__pyx_v_init_buf_size, PyObject *__pyx_v_max_name_len) {
  int __pyx_r;
/* … */
  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("questdb.ingress.Buffer.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
/* … */
  if (!(likely(__Pyx_Py3Int_CheckExact(__pyx_int_65536)) || __Pyx_RaiseUnexpectedTypeError("int", __pyx_int_65536))) __PYX_ERR(0, 756, __pyx_L1_error)
  __Pyx_INCREF(__pyx_int_65536);
  __pyx_k__32 = ((PyObject*)__pyx_int_65536);
  __Pyx_GIVEREF(__pyx_int_65536);
  if (!(likely(__Pyx_Py3Int_CheckExact(__pyx_int_127)) || __Pyx_RaiseUnexpectedTypeError("int", __pyx_int_127))) __PYX_ERR(0, 756, __pyx_L1_error)
  __Pyx_INCREF(__pyx_int_127);
  __pyx_k__33 = ((PyObject*)__pyx_int_127);
  __Pyx_GIVEREF(__pyx_int_127);
 0757:         """
 0758:         Create a new buffer with the an initial capacity and max name length.
 0759:         :param int init_buf_size: Initial capacity of the buffer in bytes.
 0760:         :param int max_name_len: Maximum length of a table or column name.
 0761:         """
+0762:         self._cinit_impl(init_buf_size, max_name_len)
  __pyx_t_1 = __Pyx_PyInt_As_size_t(__pyx_v_init_buf_size); if (unlikely((__pyx_t_1 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 762, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyInt_As_size_t(__pyx_v_max_name_len); if (unlikely((__pyx_t_2 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 762, __pyx_L1_error)
  #pragma GCC diagnostic ignored "-Wincompatible-pointer-types"
  __pyx_t_3 = __pyx_f_7questdb_7ingress_6Buffer__cinit_impl(__pyx_v_self, __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 762, __pyx_L1_error)
  #pragma GCC diagnostic pop
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 0763: 
+0764:     cdef inline _cinit_impl(self, size_t init_buf_size, size_t max_name_len):
static CYTHON_INLINE PyObject *__pyx_f_7questdb_7ingress_6Buffer__cinit_impl(struct __pyx_obj_7questdb_7ingress_Buffer *__pyx_v_self, size_t __pyx_v_init_buf_size, size_t __pyx_v_max_name_len) {
  PyObject *__pyx_r = NULL;
/* … */
  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
+0765:         self._impl = line_sender_buffer_with_max_name_len(max_name_len)
  __pyx_v_self->_impl = line_sender_buffer_with_max_name_len(__pyx_v_max_name_len);
+0766:         self._b = qdb_pystr_buf_new()
  __pyx_v_self->_b = qdb_pystr_buf_new();
+0767:         line_sender_buffer_reserve(self._impl, init_buf_size)
  line_sender_buffer_reserve(__pyx_v_self->_impl, __pyx_v_init_buf_size);
+0768:         self._init_buf_size = init_buf_size
  __pyx_v_self->_init_buf_size = __pyx_v_init_buf_size;
+0769:         self._max_name_len = max_name_len
  __pyx_v_self->_max_name_len = __pyx_v_max_name_len;
+0770:         self._row_complete_sender = None
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->_row_complete_sender);
  __Pyx_DECREF(__pyx_v_self->_row_complete_sender);
  __pyx_v_self->_row_complete_sender = Py_None;
 0771: 
+0772:     def __dealloc__(self):
/* Python wrapper */
static void __pyx_pw_7questdb_7ingress_6Buffer_3__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_7questdb_7ingress_6Buffer_3__dealloc__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_pf_7questdb_7ingress_6Buffer_2__dealloc__(((struct __pyx_obj_7questdb_7ingress_Buffer *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

static void __pyx_pf_7questdb_7ingress_6Buffer_2__dealloc__(struct __pyx_obj_7questdb_7ingress_Buffer *__pyx_v_self) {
/* … */
  /* function exit code */
  __Pyx_RefNannyFinishContext();
}
+0773:         self._row_complete_sender = None
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->_row_complete_sender);
  __Pyx_DECREF(__pyx_v_self->_row_complete_sender);
  __pyx_v_self->_row_complete_sender = Py_None;
+0774:         qdb_pystr_buf_free(self._b)
  qdb_pystr_buf_free(__pyx_v_self->_b);
+0775:         line_sender_buffer_free(self._impl)
  line_sender_buffer_free(__pyx_v_self->_impl);
 0776: 
+0777:     @property
/* Python wrapper */
static PyObject *__pyx_pw_7questdb_7ingress_6Buffer_13init_buf_size_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7questdb_7ingress_6Buffer_13init_buf_size_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7questdb_7ingress_6Buffer_13init_buf_size___get__(((struct __pyx_obj_7questdb_7ingress_Buffer *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7questdb_7ingress_6Buffer_13init_buf_size___get__(struct __pyx_obj_7questdb_7ingress_Buffer *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
/* … */
  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("questdb.ingress.Buffer.init_buf_size.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
 0778:     def init_buf_size(self) -> int:
 0779:         """
 0780:         The initial capacity of the buffer when first created.
 0781: 
 0782:         This may grow over time, see ``capacity()``.
 0783:         """
+0784:         return self._init_buf_size
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_FromSize_t(__pyx_v_self->_init_buf_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 784, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;
 0785: 
 0786:     @property
 0787:     def max_name_len(self) -> int:
 0788:         """Maximum length of a table or column name."""
 0789:         return self._max_name_len
 0790: 
+0791:     @property
/* Python wrapper */
static PyObject *__pyx_pw_7questdb_7ingress_6Buffer_12max_name_len_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7questdb_7ingress_6Buffer_12max_name_len_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7questdb_7ingress_6Buffer_12max_name_len___get__(((struct __pyx_obj_7questdb_7ingress_Buffer *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7questdb_7ingress_6Buffer_12max_name_len___get__(struct __pyx_obj_7questdb_7ingress_Buffer *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
/* … */
  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("questdb.ingress.Buffer.max_name_len.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
 0792:     def max_name_len(self) -> int:
 0793:         """Maximum length of a table or column name."""
+0794:         return self._max_name_len
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_FromSize_t(__pyx_v_self->_max_name_len); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 794, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;
 0795: 
+0796:     def reserve(self, additional: int):
/* Python wrapper */
static PyObject *__pyx_pw_7questdb_7ingress_6Buffer_5reserve(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7questdb_7ingress_6Buffer_4reserve, "\n        Ensure the buffer has at least `additional` bytes of future capacity.\n\n        :param int additional: Additional bytes to reserve.\n        ");
static PyMethodDef __pyx_mdef_7questdb_7ingress_6Buffer_5reserve = {"reserve", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7questdb_7ingress_6Buffer_5reserve, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7questdb_7ingress_6Buffer_4reserve};
static PyObject *__pyx_pw_7questdb_7ingress_6Buffer_5reserve(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_additional = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("reserve (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_additional,0};
  PyObject* values[1] = {0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_additional)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 796, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "reserve") < 0)) __PYX_ERR(0, 796, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_additional = ((PyObject*)values[0]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("reserve", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 796, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("questdb.ingress.Buffer.reserve", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_additional), (&PyInt_Type), 0, "additional", 1))) __PYX_ERR(0, 796, __pyx_L1_error)
  __pyx_r = __pyx_pf_7questdb_7ingress_6Buffer_4reserve(((struct __pyx_obj_7questdb_7ingress_Buffer *)__pyx_v_self), __pyx_v_additional);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7questdb_7ingress_6Buffer_4reserve(struct __pyx_obj_7questdb_7ingress_Buffer *__pyx_v_self, PyObject *__pyx_v_additional) {
  PyObject *__pyx_r = NULL;
/* … */
  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("questdb.ingress.Buffer.reserve", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
/* … */
  __pyx_tuple__76 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_additional); if (unlikely(!__pyx_tuple__76)) __PYX_ERR(0, 796, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__76);
  __Pyx_GIVEREF(__pyx_tuple__76);
/* … */
  __pyx_t_19 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 796, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_19);
  if (PyDict_SetItem(__pyx_t_19, __pyx_n_s_additional, __pyx_n_s_int) < 0) __PYX_ERR(0, 796, __pyx_L1_error)
  __pyx_t_18 = __Pyx_CyFunction_New(&__pyx_mdef_7questdb_7ingress_6Buffer_5reserve, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Buffer_reserve, NULL, __pyx_n_s_questdb_ingress, __pyx_d, ((PyObject *)__pyx_codeobj__77)); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 796, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_18);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_18, __pyx_t_19);
  __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_7questdb_7ingress_Buffer, __pyx_n_s_reserve, __pyx_t_18) < 0) __PYX_ERR(0, 796, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
  PyType_Modified(__pyx_ptype_7questdb_7ingress_Buffer);
  __pyx_codeobj__77 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__76, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_questdb_ingress_pyx, __pyx_n_s_reserve, 796, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__77)) __PYX_ERR(0, 796, __pyx_L1_error)
 0797:         """
 0798:         Ensure the buffer has at least `additional` bytes of future capacity.
 0799: 
 0800:         :param int additional: Additional bytes to reserve.
 0801:         """
+0802:         if additional < 0:
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_additional, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 802, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 802, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(__pyx_t_2)) {
/* … */
  }
+0803:             raise ValueError('additional must be non-negative.')
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__34, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 803, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 803, __pyx_L1_error)
/* … */
  __pyx_tuple__34 = PyTuple_Pack(1, __pyx_kp_u_additional_must_be_non_negative); if (unlikely(!__pyx_tuple__34)) __PYX_ERR(0, 803, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__34);
  __Pyx_GIVEREF(__pyx_tuple__34);
+0804:         line_sender_buffer_reserve(self._impl, additional)
  __pyx_t_3 = __Pyx_PyInt_As_size_t(__pyx_v_additional); if (unlikely((__pyx_t_3 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 804, __pyx_L1_error)
  line_sender_buffer_reserve(__pyx_v_self->_impl, __pyx_t_3);
 0805: 
+0806:     def capacity(self) -> int:
/* Python wrapper */
static PyObject *__pyx_pw_7questdb_7ingress_6Buffer_7capacity(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7questdb_7ingress_6Buffer_6capacity, "The current buffer capacity.");
static PyMethodDef __pyx_mdef_7questdb_7ingress_6Buffer_7capacity = {"capacity", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7questdb_7ingress_6Buffer_7capacity, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7questdb_7ingress_6Buffer_6capacity};
static PyObject *__pyx_pw_7questdb_7ingress_6Buffer_7capacity(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("capacity (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) {
    __Pyx_RaiseArgtupleInvalid("capacity", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "capacity", 0))) return NULL;
  __pyx_r = __pyx_pf_7questdb_7ingress_6Buffer_6capacity(((struct __pyx_obj_7questdb_7ingress_Buffer *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7questdb_7ingress_6Buffer_6capacity(struct __pyx_obj_7questdb_7ingress_Buffer *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
/* … */
  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("questdb.ingress.Buffer.capacity", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
/* … */
  __pyx_t_18 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 806, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_18);
  if (PyDict_SetItem(__pyx_t_18, __pyx_n_s_return, __pyx_n_s_int) < 0) __PYX_ERR(0, 806, __pyx_L1_error)
  __pyx_t_19 = __Pyx_CyFunction_New(&__pyx_mdef_7questdb_7ingress_6Buffer_7capacity, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Buffer_capacity, NULL, __pyx_n_s_questdb_ingress, __pyx_d, ((PyObject *)__pyx_codeobj__78)); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 806, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_19);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_19, __pyx_t_18);
  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_7questdb_7ingress_Buffer, __pyx_n_s_capacity, __pyx_t_19) < 0) __PYX_ERR(0, 806, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
  PyType_Modified(__pyx_ptype_7questdb_7ingress_Buffer);
/* … */
  __pyx_codeobj__78 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__48, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_questdb_ingress_pyx, __pyx_n_s_capacity, 806, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__78)) __PYX_ERR(0, 806, __pyx_L1_error)
 0807:         """The current buffer capacity."""
+0808:         return line_sender_buffer_capacity(self._impl)
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_FromSize_t(line_sender_buffer_capacity(__pyx_v_self->_impl)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 808, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(__Pyx_Py3Int_CheckExact(__pyx_t_1)) || __Pyx_RaiseUnexpectedTypeError("int", __pyx_t_1))) __PYX_ERR(0, 808, __pyx_L1_error)
  __pyx_r = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;
 0809: 
+0810:     def clear(self):
/* Python wrapper */
static PyObject *__pyx_pw_7questdb_7ingress_6Buffer_9clear(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7questdb_7ingress_6Buffer_8clear, "\n        Reset the buffer.\n\n        Note that flushing a buffer will (unless otherwise specified)\n        also automatically clear it.\n\n        This method is designed to be called only in conjunction with\n        ``sender.flush(buffer, clear=False)``.\n        ");
static PyMethodDef __pyx_mdef_7questdb_7ingress_6Buffer_9clear = {"clear", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7questdb_7ingress_6Buffer_9clear, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7questdb_7ingress_6Buffer_8clear};
static PyObject *__pyx_pw_7questdb_7ingress_6Buffer_9clear(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("clear (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) {
    __Pyx_RaiseArgtupleInvalid("clear", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "clear", 0))) return NULL;
  __pyx_r = __pyx_pf_7questdb_7ingress_6Buffer_8clear(((struct __pyx_obj_7questdb_7ingress_Buffer *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7questdb_7ingress_6Buffer_8clear(struct __pyx_obj_7questdb_7ingress_Buffer *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
/* … */
  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
/* … */
  __pyx_t_19 = __Pyx_CyFunction_New(&__pyx_mdef_7questdb_7ingress_6Buffer_9clear, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Buffer_clear, NULL, __pyx_n_s_questdb_ingress, __pyx_d, ((PyObject *)__pyx_codeobj__79)); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 810, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_19);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_7questdb_7ingress_Buffer, __pyx_n_s_clear, __pyx_t_19) < 0) __PYX_ERR(0, 810, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
  PyType_Modified(__pyx_ptype_7questdb_7ingress_Buffer);
/* … */
  __pyx_codeobj__79 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__48, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_questdb_ingress_pyx, __pyx_n_s_clear, 810, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__79)) __PYX_ERR(0, 810, __pyx_L1_error)
 0811:         """
 0812:         Reset the buffer.
 0813: 
 0814:         Note that flushing a buffer will (unless otherwise specified)
 0815:         also automatically clear it.
 0816: 
 0817:         This method is designed to be called only in conjunction with
 0818:         ``sender.flush(buffer, clear=False)``.
 0819:         """
+0820:         line_sender_buffer_clear(self._impl)
  line_sender_buffer_clear(__pyx_v_self->_impl);
+0821:         qdb_pystr_buf_clear(self._b)
  qdb_pystr_buf_clear(__pyx_v_self->_b);
 0822: 
+0823:     def __len__(self) -> int:
/* Python wrapper */
static Py_ssize_t __pyx_pw_7questdb_7ingress_6Buffer_11__len__(PyObject *__pyx_v_self); /*proto*/
PyDoc_STRVAR(__pyx_doc_7questdb_7ingress_6Buffer_10__len__, "\n        The current number of bytes currently in the buffer.\n\n        Equivalent (but cheaper) to ``len(str(sender))``.\n        ");
#if CYTHON_UPDATE_DESCRIPTOR_DOC
struct wrapperbase __pyx_wrapperbase_7questdb_7ingress_6Buffer_10__len__;
#endif
static Py_ssize_t __pyx_pw_7questdb_7ingress_6Buffer_11__len__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  Py_ssize_t __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__len__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7questdb_7ingress_6Buffer_10__len__(((struct __pyx_obj_7questdb_7ingress_Buffer *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static Py_ssize_t __pyx_pf_7questdb_7ingress_6Buffer_10__len__(struct __pyx_obj_7questdb_7ingress_Buffer *__pyx_v_self) {
  Py_ssize_t __pyx_r;
/* … */
  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}
 0824:         """
 0825:         The current number of bytes currently in the buffer.
 0826: 
 0827:         Equivalent (but cheaper) to ``len(str(sender))``.
 0828:         """
+0829:         return line_sender_buffer_size(self._impl)
  __pyx_r = line_sender_buffer_size(__pyx_v_self->_impl);
  goto __pyx_L0;
 0830: 
+0831:     def __str__(self) -> str:
/* Python wrapper */
static PyObject *__pyx_pw_7questdb_7ingress_6Buffer_13__str__(PyObject *__pyx_v_self); /*proto*/
PyDoc_STRVAR(__pyx_doc_7questdb_7ingress_6Buffer_12__str__, "Return the constructed buffer as a string. Use for debugging.");
#if CYTHON_UPDATE_DESCRIPTOR_DOC
struct wrapperbase __pyx_wrapperbase_7questdb_7ingress_6Buffer_12__str__;
#endif
static PyObject *__pyx_pw_7questdb_7ingress_6Buffer_13__str__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7questdb_7ingress_6Buffer_12__str__(((struct __pyx_obj_7questdb_7ingress_Buffer *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7questdb_7ingress_6Buffer_12__str__(struct __pyx_obj_7questdb_7ingress_Buffer *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
/* … */
  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("questdb.ingress.Buffer.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
 0832:         """Return the constructed buffer as a string. Use for debugging."""
+0833:         return self._to_str()
  __Pyx_XDECREF(__pyx_r);
  #pragma GCC diagnostic ignored "-Wincompatible-pointer-types"
  __pyx_t_1 = __pyx_f_7questdb_7ingress_6Buffer__to_str(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 833, __pyx_L1_error)
  #pragma GCC diagnostic pop
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;
 0834: 
+0835:     cdef inline object _to_str(self):
static CYTHON_INLINE PyObject *__pyx_f_7questdb_7ingress_6Buffer__to_str(struct __pyx_obj_7questdb_7ingress_Buffer *__pyx_v_self) {
  size_t __pyx_v_size;
  char const *__pyx_v_utf8;
  PyObject *__pyx_r = NULL;
/* … */
  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("questdb.ingress.Buffer._to_str", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
+0836:         cdef size_t size = 0
  __pyx_v_size = 0;
+0837:         cdef const char* utf8 = line_sender_buffer_peek(self._impl, &size)
  __pyx_v_utf8 = line_sender_buffer_peek(__pyx_v_self->_impl, (&__pyx_v_size));
+0838:         return PyUnicode_FromStringAndSize(utf8, <Py_ssize_t>size)
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyUnicode_FromStringAndSize(__pyx_v_utf8, ((Py_ssize_t)__pyx_v_size)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 838, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;
 0839: 
+0840:     cdef inline void_int _set_marker(self) except -1:
static CYTHON_INLINE __pyx_t_7questdb_7ingress_void_int __pyx_f_7questdb_7ingress_6Buffer__set_marker(struct __pyx_obj_7questdb_7ingress_Buffer *__pyx_v_self) {
  struct line_sender_error *__pyx_v_err;
  __pyx_t_7questdb_7ingress_void_int __pyx_r;
/* … */
  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("questdb.ingress.Buffer._set_marker", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
+0841:         cdef line_sender_error* err = NULL
  __pyx_v_err = NULL;
+0842:         if not line_sender_buffer_set_marker(self._impl, &err):
  __pyx_t_1 = (!line_sender_buffer_set_marker(__pyx_v_self->_impl, (&__pyx_v_err)));
  if (unlikely(__pyx_t_1)) {
/* … */
  }
+0843:             raise c_err_to_py(err)
    __pyx_t_2 = __pyx_f_7questdb_7ingress_c_err_to_py(__pyx_v_err); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 843, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(0, 843, __pyx_L1_error)
 0844: 
+0845:     cdef inline void_int _rewind_to_marker(self) except -1:
static CYTHON_INLINE __pyx_t_7questdb_7ingress_void_int __pyx_f_7questdb_7ingress_6Buffer__rewind_to_marker(struct __pyx_obj_7questdb_7ingress_Buffer *__pyx_v_self) {
  struct line_sender_error *__pyx_v_err;
  __pyx_t_7questdb_7ingress_void_int __pyx_r;
/* … */
  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("questdb.ingress.Buffer._rewind_to_marker", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
+0846:         cdef line_sender_error* err = NULL
  __pyx_v_err = NULL;
+0847:         if not line_sender_buffer_rewind_to_marker(self._impl, &err):
  __pyx_t_1 = (!line_sender_buffer_rewind_to_marker(__pyx_v_self->_impl, (&__pyx_v_err)));
  if (unlikely(__pyx_t_1)) {
/* … */
  }
+0848:             raise c_err_to_py(err)
    __pyx_t_2 = __pyx_f_7questdb_7ingress_c_err_to_py(__pyx_v_err); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 848, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(0, 848, __pyx_L1_error)
 0849: 
+0850:     cdef inline _clear_marker(self):
static CYTHON_INLINE PyObject *__pyx_f_7questdb_7ingress_6Buffer__clear_marker(struct __pyx_obj_7questdb_7ingress_Buffer *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
/* … */
  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
+0851:         line_sender_buffer_clear_marker(self._impl)
  line_sender_buffer_clear_marker(__pyx_v_self->_impl);
 0852: 
+0853:     cdef inline void_int _table(self, str table_name) except -1:
static CYTHON_INLINE __pyx_t_7questdb_7ingress_void_int __pyx_f_7questdb_7ingress_6Buffer__table(struct __pyx_obj_7questdb_7ingress_Buffer *__pyx_v_self, PyObject *__pyx_v_table_name) {
  struct line_sender_error *__pyx_v_err;
  struct line_sender_table_name __pyx_v_c_table_name;
  __pyx_t_7questdb_7ingress_void_int __pyx_r;
/* … */
  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("questdb.ingress.Buffer._table", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
+0854:         cdef line_sender_error* err = NULL
  __pyx_v_err = NULL;
 0855:         cdef line_sender_table_name c_table_name
+0856:         str_to_table_name(
  __pyx_t_2 = __pyx_f_7questdb_7ingress_str_to_table_name(__pyx_t_1, ((PyObject *)__pyx_v_table_name), (&__pyx_v_c_table_name)); if (unlikely(__pyx_t_2 == ((__pyx_t_7questdb_7ingress_void_int)-1))) __PYX_ERR(0, 856, __pyx_L1_error)
+0857:             self._cleared_b(), <PyObject*>table_name, &c_table_name)
  #pragma GCC diagnostic ignored "-Wincompatible-pointer-types"
  __pyx_t_1 = __pyx_f_7questdb_7ingress_6Buffer__cleared_b(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 857, __pyx_L1_error)
  #pragma GCC diagnostic pop
+0858:         if not line_sender_buffer_table(self._impl, c_table_name, &err):
  __pyx_t_3 = (!line_sender_buffer_table(__pyx_v_self->_impl, __pyx_v_c_table_name, (&__pyx_v_err)));
  if (unlikely(__pyx_t_3)) {
/* … */
  }
+0859:             raise c_err_to_py(err)
    __pyx_t_4 = __pyx_f_7questdb_7ingress_c_err_to_py(__pyx_v_err); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 859, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_Raise(__pyx_t_4, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __PYX_ERR(0, 859, __pyx_L1_error)
 0860: 
+0861:     cdef inline qdb_pystr_buf* _cleared_b(self):
static CYTHON_INLINE struct qdb_pystr_buf *__pyx_f_7questdb_7ingress_6Buffer__cleared_b(struct __pyx_obj_7questdb_7ingress_Buffer *__pyx_v_self) {
  struct qdb_pystr_buf *__pyx_r;
/* … */
  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}
+0862:         qdb_pystr_buf_clear(self._b)
  qdb_pystr_buf_clear(__pyx_v_self->_b);
+0863:         return self._b
  __pyx_r = __pyx_v_self->_b;
  goto __pyx_L0;
 0864: 
+0865:     cdef inline void_int _symbol(self, str name, str value) except -1:
static CYTHON_INLINE __pyx_t_7questdb_7ingress_void_int __pyx_f_7questdb_7ingress_6Buffer__symbol(struct __pyx_obj_7questdb_7ingress_Buffer *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_value) {
  struct line_sender_error *__pyx_v_err;
  struct line_sender_column_name __pyx_v_c_name;
  struct line_sender_utf8 __pyx_v_c_value;
  __pyx_t_7questdb_7ingress_void_int __pyx_r;
/* … */
  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("questdb.ingress.Buffer._symbol", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
+0866:         cdef line_sender_error* err = NULL
  __pyx_v_err = NULL;
 0867:         cdef line_sender_column_name c_name
 0868:         cdef line_sender_utf8 c_value
+0869:         str_to_column_name(self._cleared_b(), name, &c_name)
  #pragma GCC diagnostic ignored "-Wincompatible-pointer-types"
  __pyx_t_1 = __pyx_f_7questdb_7ingress_6Buffer__cleared_b(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 869, __pyx_L1_error)
  #pragma GCC diagnostic pop
  __pyx_t_2 = __pyx_f_7questdb_7ingress_str_to_column_name(__pyx_t_1, __pyx_v_name, (&__pyx_v_c_name)); if (unlikely(__pyx_t_2 == ((__pyx_t_7questdb_7ingress_void_int)-1))) __PYX_ERR(0, 869, __pyx_L1_error)
+0870:         str_to_utf8(self._b, <PyObject*>value, &c_value)
  __pyx_t_2 = __pyx_f_7questdb_7ingress_str_to_utf8(__pyx_v_self->_b, ((PyObject *)__pyx_v_value), (&__pyx_v_c_value)); if (unlikely(__pyx_t_2 == ((__pyx_t_7questdb_7ingress_void_int)-1))) __PYX_ERR(0, 870, __pyx_L1_error)
+0871:         if not line_sender_buffer_symbol(self._impl, c_name, c_value, &err):
  __pyx_t_3 = (!line_sender_buffer_symbol(__pyx_v_self->_impl, __pyx_v_c_name, __pyx_v_c_value, (&__pyx_v_err)));
  if (unlikely(__pyx_t_3)) {
/* … */
  }
+0872:             raise c_err_to_py(err)
    __pyx_t_4 = __pyx_f_7questdb_7ingress_c_err_to_py(__pyx_v_err); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 872, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_Raise(__pyx_t_4, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __PYX_ERR(0, 872, __pyx_L1_error)
 0873: 
+0874:     cdef inline void_int _column_bool(
static CYTHON_INLINE __pyx_t_7questdb_7ingress_void_int __pyx_f_7questdb_7ingress_6Buffer__column_bool(struct __pyx_obj_7questdb_7ingress_Buffer *__pyx_v_self, struct line_sender_column_name __pyx_v_c_name, int __pyx_v_value) {
  struct line_sender_error *__pyx_v_err;
  __pyx_t_7questdb_7ingress_void_int __pyx_r;
/* … */
  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("questdb.ingress.Buffer._column_bool", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
 0875:             self, line_sender_column_name c_name, bint value) except -1:
+0876:         cdef line_sender_error* err = NULL
  __pyx_v_err = NULL;
+0877:         if not line_sender_buffer_column_bool(self._impl, c_name, value, &err):
  __pyx_t_1 = (!line_sender_buffer_column_bool(__pyx_v_self->_impl, __pyx_v_c_name, __pyx_v_value, (&__pyx_v_err)));
  if (unlikely(__pyx_t_1)) {
/* … */
  }
+0878:             raise c_err_to_py(err)
    __pyx_t_2 = __pyx_f_7questdb_7ingress_c_err_to_py(__pyx_v_err); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 878, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(0, 878, __pyx_L1_error)
 0879: 
+0880:     cdef inline void_int _column_i64(
static CYTHON_INLINE __pyx_t_7questdb_7ingress_void_int __pyx_f_7questdb_7ingress_6Buffer__column_i64(struct __pyx_obj_7questdb_7ingress_Buffer *__pyx_v_self, struct line_sender_column_name __pyx_v_c_name, int64_t __pyx_v_value) {
  struct line_sender_error *__pyx_v_err;
  __pyx_t_7questdb_7ingress_void_int __pyx_r;
/* … */
  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("questdb.ingress.Buffer._column_i64", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
 0881:             self, line_sender_column_name c_name, int64_t value) except -1:
+0882:         cdef line_sender_error* err = NULL
  __pyx_v_err = NULL;
+0883:         if not line_sender_buffer_column_i64(self._impl, c_name, value, &err):
  __pyx_t_1 = (!line_sender_buffer_column_i64(__pyx_v_self->_impl, __pyx_v_c_name, __pyx_v_value, (&__pyx_v_err)));
  if (unlikely(__pyx_t_1)) {
/* … */
  }
+0884:             raise c_err_to_py(err)
    __pyx_t_2 = __pyx_f_7questdb_7ingress_c_err_to_py(__pyx_v_err); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 884, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(0, 884, __pyx_L1_error)
+0885:         return 0
  __pyx_r = 0;
  goto __pyx_L0;
 0886: 
+0887:     cdef inline void_int _column_f64(
static CYTHON_INLINE __pyx_t_7questdb_7ingress_void_int __pyx_f_7questdb_7ingress_6Buffer__column_f64(struct __pyx_obj_7questdb_7ingress_Buffer *__pyx_v_self, struct line_sender_column_name __pyx_v_c_name, double __pyx_v_value) {
  struct line_sender_error *__pyx_v_err;
  __pyx_t_7questdb_7ingress_void_int __pyx_r;
/* … */
  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("questdb.ingress.Buffer._column_f64", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
 0888:             self, line_sender_column_name c_name, double value) except -1:
+0889:         cdef line_sender_error* err = NULL
  __pyx_v_err = NULL;
+0890:         if not line_sender_buffer_column_f64(self._impl, c_name, value, &err):
  __pyx_t_1 = (!line_sender_buffer_column_f64(__pyx_v_self->_impl, __pyx_v_c_name, __pyx_v_value, (&__pyx_v_err)));
  if (unlikely(__pyx_t_1)) {
/* … */
  }
+0891:             raise c_err_to_py(err)
    __pyx_t_2 = __pyx_f_7questdb_7ingress_c_err_to_py(__pyx_v_err); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 891, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(0, 891, __pyx_L1_error)
 0892: 
+0893:     cdef inline void_int _column_str(
static CYTHON_INLINE __pyx_t_7questdb_7ingress_void_int __pyx_f_7questdb_7ingress_6Buffer__column_str(struct __pyx_obj_7questdb_7ingress_Buffer *__pyx_v_self, struct line_sender_column_name __pyx_v_c_name, PyObject *__pyx_v_value) {
  struct line_sender_error *__pyx_v_err;
  struct line_sender_utf8 __pyx_v_c_value;
  __pyx_t_7questdb_7ingress_void_int __pyx_r;
/* … */
  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("questdb.ingress.Buffer._column_str", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
 0894:             self, line_sender_column_name c_name, str value) except -1:
+0895:         cdef line_sender_error* err = NULL
  __pyx_v_err = NULL;
 0896:         cdef line_sender_utf8 c_value
+0897:         str_to_utf8(self._b, <PyObject*>value, &c_value)
  __pyx_t_1 = __pyx_f_7questdb_7ingress_str_to_utf8(__pyx_v_self->_b, ((PyObject *)__pyx_v_value), (&__pyx_v_c_value)); if (unlikely(__pyx_t_1 == ((__pyx_t_7questdb_7ingress_void_int)-1))) __PYX_ERR(0, 897, __pyx_L1_error)
+0898:         if not line_sender_buffer_column_str(self._impl, c_name, c_value, &err):
  __pyx_t_2 = (!line_sender_buffer_column_str(__pyx_v_self->_impl, __pyx_v_c_name, __pyx_v_c_value, (&__pyx_v_err)));
  if (unlikely(__pyx_t_2)) {
/* … */
  }
+0899:             raise c_err_to_py(err)
    __pyx_t_3 = __pyx_f_7questdb_7ingress_c_err_to_py(__pyx_v_err); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 899, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(0, 899, __pyx_L1_error)
 0900: 
+0901:     cdef inline void_int _column_ts(
static CYTHON_INLINE __pyx_t_7questdb_7ingress_void_int __pyx_f_7questdb_7ingress_6Buffer__column_ts(struct __pyx_obj_7questdb_7ingress_Buffer *__pyx_v_self, struct line_sender_column_name __pyx_v_c_name, struct __pyx_obj_7questdb_7ingress_TimestampMicros *__pyx_v_ts) {
  struct line_sender_error *__pyx_v_err;
  __pyx_t_7questdb_7ingress_void_int __pyx_r;
/* … */
  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("questdb.ingress.Buffer._column_ts", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
 0902:             self, line_sender_column_name c_name, TimestampMicros ts) except -1:
+0903:         cdef line_sender_error* err = NULL
  __pyx_v_err = NULL;
+0904:         if not line_sender_buffer_column_ts_micros(self._impl, c_name, ts._value, &err):
  __pyx_t_1 = (!line_sender_buffer_column_ts_micros(__pyx_v_self->_impl, __pyx_v_c_name, __pyx_v_ts->_value, (&__pyx_v_err)));
  if (unlikely(__pyx_t_1)) {
/* … */
  }
+0905:             raise c_err_to_py(err)
    __pyx_t_2 = __pyx_f_7questdb_7ingress_c_err_to_py(__pyx_v_err); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 905, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(0, 905, __pyx_L1_error)
 0906: 
+0907:     cdef inline void_int _column_dt(
static CYTHON_INLINE __pyx_t_7questdb_7ingress_void_int __pyx_f_7questdb_7ingress_6Buffer__column_dt(struct __pyx_obj_7questdb_7ingress_Buffer *__pyx_v_self, struct line_sender_column_name __pyx_v_c_name, PyDateTime_DateTime *__pyx_v_dt) {
  struct line_sender_error *__pyx_v_err;
  __pyx_t_7questdb_7ingress_void_int __pyx_r;
/* … */
  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("questdb.ingress.Buffer._column_dt", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
 0908:             self, line_sender_column_name c_name, datetime dt) except -1:
+0909:         cdef line_sender_error* err = NULL
  __pyx_v_err = NULL;
+0910:         if not line_sender_buffer_column_ts_micros(
  __pyx_t_2 = (!line_sender_buffer_column_ts_micros(__pyx_v_self->_impl, __pyx_v_c_name, __pyx_t_1, (&__pyx_v_err)));
  if (unlikely(__pyx_t_2)) {
/* … */
  }
+0911:                 self._impl, c_name, datetime_to_micros(dt), &err):
  __pyx_t_1 = __pyx_f_7questdb_7ingress_datetime_to_micros(__pyx_v_dt); if (unlikely(__pyx_t_1 == ((int64_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 911, __pyx_L1_error)
+0912:             raise c_err_to_py(err)
    __pyx_t_3 = __pyx_f_7questdb_7ingress_c_err_to_py(__pyx_v_err); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 912, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(0, 912, __pyx_L1_error)
 0913: 
+0914:     cdef inline void_int _column(self, str name, object value) except -1:
static CYTHON_INLINE __pyx_t_7questdb_7ingress_void_int __pyx_f_7questdb_7ingress_6Buffer__column(struct __pyx_obj_7questdb_7ingress_Buffer *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_value) {
  struct line_sender_column_name __pyx_v_c_name;
  PyObject *__pyx_v_valid = NULL;
  __pyx_t_7questdb_7ingress_void_int __pyx_r;
/* … */
  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("questdb.ingress.Buffer._column", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_valid);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
 0915:         cdef line_sender_column_name c_name
+0916:         str_to_column_name(self._cleared_b(), name, &c_name)
  #pragma GCC diagnostic ignored "-Wincompatible-pointer-types"
  __pyx_t_1 = __pyx_f_7questdb_7ingress_6Buffer__cleared_b(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 916, __pyx_L1_error)
  #pragma GCC diagnostic pop
  __pyx_t_2 = __pyx_f_7questdb_7ingress_str_to_column_name(__pyx_t_1, __pyx_v_name, (&__pyx_v_c_name)); if (unlikely(__pyx_t_2 == ((__pyx_t_7questdb_7ingress_void_int)-1))) __PYX_ERR(0, 916, __pyx_L1_error)
+0917:         if PyBool_Check(<PyObject*>value):
  __pyx_t_3 = PyBool_Check(((PyObject *)__pyx_v_value));
  if (__pyx_t_3) {
/* … */
    goto __pyx_L3;
  }
+0918:             self._column_bool(c_name, value)
    __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_value); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 918, __pyx_L1_error)
    #pragma GCC diagnostic ignored "-Wincompatible-pointer-types"
    __pyx_t_2 = __pyx_f_7questdb_7ingress_6Buffer__column_bool(__pyx_v_self, __pyx_v_c_name, __pyx_t_3); if (unlikely(__pyx_t_2 == ((__pyx_t_7questdb_7ingress_void_int)-1))) __PYX_ERR(0, 918, __pyx_L1_error)
    #pragma GCC diagnostic pop
+0919:         elif PyLong_CheckExact(<PyObject*>value):
  __pyx_t_3 = PyLong_CheckExact(((PyObject *)__pyx_v_value));
  if (__pyx_t_3) {
/* … */
    goto __pyx_L3;
  }
+0920:             self._column_i64(c_name, value)
    __pyx_t_4 = __Pyx_PyInt_As_int64_t(__pyx_v_value); if (unlikely((__pyx_t_4 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 920, __pyx_L1_error)
    #pragma GCC diagnostic ignored "-Wincompatible-pointer-types"
    __pyx_t_2 = __pyx_f_7questdb_7ingress_6Buffer__column_i64(__pyx_v_self, __pyx_v_c_name, __pyx_t_4); if (unlikely(__pyx_t_2 == ((__pyx_t_7questdb_7ingress_void_int)-1))) __PYX_ERR(0, 920, __pyx_L1_error)
    #pragma GCC diagnostic pop
+0921:         elif PyFloat_CheckExact(<PyObject*>value):
  __pyx_t_3 = PyFloat_CheckExact(((PyObject *)__pyx_v_value));
  if (__pyx_t_3) {
/* … */
    goto __pyx_L3;
  }
+0922:             self._column_f64(c_name, value)
    __pyx_t_5 = __pyx_PyFloat_AsDouble(__pyx_v_value); if (unlikely((__pyx_t_5 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 922, __pyx_L1_error)
    #pragma GCC diagnostic ignored "-Wincompatible-pointer-types"
    __pyx_t_2 = __pyx_f_7questdb_7ingress_6Buffer__column_f64(__pyx_v_self, __pyx_v_c_name, __pyx_t_5); if (unlikely(__pyx_t_2 == ((__pyx_t_7questdb_7ingress_void_int)-1))) __PYX_ERR(0, 922, __pyx_L1_error)
    #pragma GCC diagnostic pop
+0923:         elif PyUnicode_CheckExact(<PyObject*>value):
  __pyx_t_3 = PyUnicode_CheckExact(((PyObject *)__pyx_v_value));
  if (__pyx_t_3) {
/* … */
    goto __pyx_L3;
  }
+0924:             self._column_str(c_name, value)
    if (!(likely(PyUnicode_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None) || __Pyx_RaiseUnexpectedTypeError("unicode", __pyx_v_value))) __PYX_ERR(0, 924, __pyx_L1_error)
    #pragma GCC diagnostic ignored "-Wincompatible-pointer-types"
    __pyx_t_2 = __pyx_f_7questdb_7ingress_6Buffer__column_str(__pyx_v_self, __pyx_v_c_name, ((PyObject*)__pyx_v_value)); if (unlikely(__pyx_t_2 == ((__pyx_t_7questdb_7ingress_void_int)-1))) __PYX_ERR(0, 924, __pyx_L1_error)
    #pragma GCC diagnostic pop
+0925:         elif isinstance(value, TimestampMicros):
  __pyx_t_3 = __Pyx_TypeCheck(__pyx_v_value, __pyx_ptype_7questdb_7ingress_TimestampMicros); 
  if (__pyx_t_3) {
/* … */
    goto __pyx_L3;
  }
+0926:             self._column_ts(c_name, value)
    if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_7questdb_7ingress_TimestampMicros))))) __PYX_ERR(0, 926, __pyx_L1_error)
    #pragma GCC diagnostic ignored "-Wincompatible-pointer-types"
    __pyx_t_2 = __pyx_f_7questdb_7ingress_6Buffer__column_ts(__pyx_v_self, __pyx_v_c_name, ((struct __pyx_obj_7questdb_7ingress_TimestampMicros *)__pyx_v_value)); if (unlikely(__pyx_t_2 == ((__pyx_t_7questdb_7ingress_void_int)-1))) __PYX_ERR(0, 926, __pyx_L1_error)
    #pragma GCC diagnostic pop
+0927:         elif isinstance(value, datetime):
  __pyx_t_3 = __Pyx_TypeCheck(__pyx_v_value, __pyx_ptype_7cpython_8datetime_datetime); 
  if (likely(__pyx_t_3)) {
/* … */
    goto __pyx_L3;
  }
+0928:             self._column_dt(c_name, value)
    if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_7cpython_8datetime_datetime))))) __PYX_ERR(0, 928, __pyx_L1_error)
    #pragma GCC diagnostic ignored "-Wincompatible-pointer-types"
    __pyx_t_2 = __pyx_f_7questdb_7ingress_6Buffer__column_dt(__pyx_v_self, __pyx_v_c_name, ((PyDateTime_DateTime *)__pyx_v_value)); if (unlikely(__pyx_t_2 == ((__pyx_t_7questdb_7ingress_void_int)-1))) __PYX_ERR(0, 928, __pyx_L1_error)
    #pragma GCC diagnostic pop
 0929:         else:
+0930:             valid = ', '.join((
  /*else*/ {
/* … */
    __pyx_t_6 = PyUnicode_Join(__pyx_kp_u__4, __pyx_tuple__35); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 930, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_v_valid = ((PyObject*)__pyx_t_6);
    __pyx_t_6 = 0;
+0931:                 'bool',
  __pyx_tuple__35 = PyTuple_Pack(6, __pyx_n_u_bool, __pyx_n_u_int, __pyx_n_u_float, __pyx_n_u_str, __pyx_n_u_TimestampMicros_2, __pyx_kp_u_datetime_datetime); if (unlikely(!__pyx_tuple__35)) __PYX_ERR(0, 931, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__35);
  __Pyx_GIVEREF(__pyx_tuple__35);
 0932:                 'int',
 0933:                 'float',
 0934:                 'str',
 0935:                 'TimestampMicros',
 0936:                 'datetime.datetime'))
+0937:             raise TypeError(
    __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_10); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 937, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_Raise(__pyx_t_6, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __PYX_ERR(0, 937, __pyx_L1_error)
  }
  __pyx_L3:;
+0938:                 f'Unsupported type: {_fqn(type(value))}. Must be one of: {valid}')
    __pyx_t_6 = PyTuple_New(4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 938, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = 0;
    __pyx_t_8 = 127;
    __Pyx_INCREF(__pyx_kp_u_Unsupported_type);
    __pyx_t_7 += 18;
    __Pyx_GIVEREF(__pyx_kp_u_Unsupported_type);
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_kp_u_Unsupported_type);
    __pyx_t_9 = __pyx_f_7questdb_7ingress__fqn(((PyTypeObject*)((PyObject *)Py_TYPE(__pyx_v_value)))); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 938, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_10 = __Pyx_PyUnicode_Unicode(__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 938, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_t_8 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_10) > __pyx_t_8) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_10) : __pyx_t_8;
    __pyx_t_7 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_10);
    __Pyx_GIVEREF(__pyx_t_10);
    PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_10);
    __pyx_t_10 = 0;
    __Pyx_INCREF(__pyx_kp_u_Must_be_one_of);
    __pyx_t_7 += 18;
    __Pyx_GIVEREF(__pyx_kp_u_Must_be_one_of);
    PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_kp_u_Must_be_one_of);
    __pyx_t_10 = __Pyx_PyUnicode_Unicode(__pyx_v_valid); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 938, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_8 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_10) > __pyx_t_8) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_10) : __pyx_t_8;
    __pyx_t_7 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_10);
    __Pyx_GIVEREF(__pyx_t_10);
    PyTuple_SET_ITEM(__pyx_t_6, 3, __pyx_t_10);
    __pyx_t_10 = 0;
    __pyx_t_10 = __Pyx_PyUnicode_Join(__pyx_t_6, 4, __pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 938, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
 0939: 
+0940:     cdef inline void_int _may_trigger_row_complete(self) except -1:
static CYTHON_INLINE __pyx_t_7questdb_7ingress_void_int __pyx_f_7questdb_7ingress_6Buffer__may_trigger_row_complete(struct __pyx_obj_7questdb_7ingress_Buffer *__pyx_v_self) {
  CYTHON_UNUSED struct line_sender_error *__pyx_v_err;
  PyObject *__pyx_v_sender;
  __pyx_t_7questdb_7ingress_void_int __pyx_r;
/* … */
  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("questdb.ingress.Buffer._may_trigger_row_complete", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
+0941:         cdef line_sender_error* err = NULL
  __pyx_v_err = NULL;
+0942:         cdef PyObject* sender = NULL
  __pyx_v_sender = NULL;
+0943:         if self._row_complete_sender != None:
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_self->_row_complete_sender, Py_None, Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 943, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 943, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {
/* … */
  }
+0944:             sender = PyWeakref_GetObject(self._row_complete_sender)
    __pyx_t_1 = __pyx_v_self->_row_complete_sender;
    __Pyx_INCREF(__pyx_t_1);
    __pyx_t_3 = PyWeakref_GetObject(__pyx_t_1); if (unlikely(__pyx_t_3 == ((PyObject *)NULL))) __PYX_ERR(0, 944, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_v_sender = __pyx_t_3;
+0945:             if sender != NULL:
    __pyx_t_2 = (__pyx_v_sender != NULL);
    if (__pyx_t_2) {
/* … */
    }
+0946:                 may_flush_on_row_complete(self, <Sender><object>sender)
      __pyx_t_4 = __pyx_f_7questdb_7ingress_may_flush_on_row_complete(__pyx_v_self, ((struct __pyx_obj_7questdb_7ingress_Sender *)__pyx_v_sender)); if (unlikely(__pyx_t_4 == ((__pyx_t_7questdb_7ingress_void_int)-1))) __PYX_ERR(0, 946, __pyx_L1_error)
 0947: 
+0948:     cdef inline void_int _at_ts(self, TimestampNanos ts) except -1:
static CYTHON_INLINE __pyx_t_7questdb_7ingress_void_int __pyx_f_7questdb_7ingress_6Buffer__at_ts(struct __pyx_obj_7questdb_7ingress_Buffer *__pyx_v_self, struct __pyx_obj_7questdb_7ingress_TimestampNanos *__pyx_v_ts) {
  struct line_sender_error *__pyx_v_err;
  __pyx_t_7questdb_7ingress_void_int __pyx_r;
/* … */
  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("questdb.ingress.Buffer._at_ts", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
+0949:         cdef line_sender_error* err = NULL
  __pyx_v_err = NULL;
+0950:         if not line_sender_buffer_at_nanos(self._impl, ts._value, &err):
  __pyx_t_1 = (!line_sender_buffer_at_nanos(__pyx_v_self->_impl, __pyx_v_ts->_value, (&__pyx_v_err)));
  if (unlikely(__pyx_t_1)) {
/* … */
  }
+0951:             raise c_err_to_py(err)
    __pyx_t_2 = __pyx_f_7questdb_7ingress_c_err_to_py(__pyx_v_err); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 951, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(0, 951, __pyx_L1_error)
 0952: 
+0953:     cdef inline void_int _at_dt(self, datetime dt) except -1:
static CYTHON_INLINE __pyx_t_7questdb_7ingress_void_int __pyx_f_7questdb_7ingress_6Buffer__at_dt(struct __pyx_obj_7questdb_7ingress_Buffer *__pyx_v_self, PyDateTime_DateTime *__pyx_v_dt) {
  int64_t __pyx_v_value;
  struct line_sender_error *__pyx_v_err;
  __pyx_t_7questdb_7ingress_void_int __pyx_r;
/* … */
  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("questdb.ingress.Buffer._at_dt", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
+0954:         cdef int64_t value = datetime_to_nanos(dt)
  __pyx_t_1 = __pyx_f_7questdb_7ingress_datetime_to_nanos(__pyx_v_dt); if (unlikely(__pyx_t_1 == ((int64_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 954, __pyx_L1_error)
  __pyx_v_value = __pyx_t_1;
+0955:         cdef line_sender_error* err = NULL
  __pyx_v_err = NULL;
+0956:         if not line_sender_buffer_at_nanos(self._impl, value, &err):
  __pyx_t_2 = (!line_sender_buffer_at_nanos(__pyx_v_self->_impl, __pyx_v_value, (&__pyx_v_err)));
  if (unlikely(__pyx_t_2)) {
/* … */
  }
+0957:             raise c_err_to_py(err)
    __pyx_t_3 = __pyx_f_7questdb_7ingress_c_err_to_py(__pyx_v_err); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 957, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(0, 957, __pyx_L1_error)
 0958: 
+0959:     cdef inline void_int _at_now(self) except -1:
static CYTHON_INLINE __pyx_t_7questdb_7ingress_void_int __pyx_f_7questdb_7ingress_6Buffer__at_now(struct __pyx_obj_7questdb_7ingress_Buffer *__pyx_v_self) {
  struct line_sender_error *__pyx_v_err;
  __pyx_t_7questdb_7ingress_void_int __pyx_r;
/* … */
  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("questdb.ingress.Buffer._at_now", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
+0960:         cdef line_sender_error* err = NULL
  __pyx_v_err = NULL;
+0961:         if not line_sender_buffer_at_now(self._impl, &err):
  __pyx_t_1 = (!line_sender_buffer_at_now(__pyx_v_self->_impl, (&__pyx_v_err)));
  if (unlikely(__pyx_t_1)) {
/* … */
  }
+0962:             raise c_err_to_py(err)
    __pyx_t_2 = __pyx_f_7questdb_7ingress_c_err_to_py(__pyx_v_err); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 962, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(0, 962, __pyx_L1_error)
 0963: 
+0964:     cdef inline void_int _at(self, object ts) except -1:
static CYTHON_INLINE __pyx_t_7questdb_7ingress_void_int __pyx_f_7questdb_7ingress_6Buffer__at(struct __pyx_obj_7questdb_7ingress_Buffer *__pyx_v_self, PyObject *__pyx_v_ts) {
  __pyx_t_7questdb_7ingress_void_int __pyx_r;
/* … */
  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("questdb.ingress.Buffer._at", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
+0965:         if ts is None:
  __pyx_t_1 = (__pyx_v_ts == Py_None);
  if (__pyx_t_1) {
/* … */
    goto __pyx_L3;
  }
+0966:             self._at_now()
    #pragma GCC diagnostic ignored "-Wincompatible-pointer-types"
    __pyx_t_2 = __pyx_f_7questdb_7ingress_6Buffer__at_now(__pyx_v_self); if (unlikely(__pyx_t_2 == ((__pyx_t_7questdb_7ingress_void_int)-1))) __PYX_ERR(0, 966, __pyx_L1_error)
    #pragma GCC diagnostic pop
+0967:         elif isinstance(ts, TimestampNanos):
  __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_ts, __pyx_ptype_7questdb_7ingress_TimestampNanos); 
  if (__pyx_t_1) {
/* … */
    goto __pyx_L3;
  }
+0968:             self._at_ts(ts)
    if (!(likely(((__pyx_v_ts) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_ts, __pyx_ptype_7questdb_7ingress_TimestampNanos))))) __PYX_ERR(0, 968, __pyx_L1_error)
    #pragma GCC diagnostic ignored "-Wincompatible-pointer-types"
    __pyx_t_2 = __pyx_f_7questdb_7ingress_6Buffer__at_ts(__pyx_v_self, ((struct __pyx_obj_7questdb_7ingress_TimestampNanos *)__pyx_v_ts)); if (unlikely(__pyx_t_2 == ((__pyx_t_7questdb_7ingress_void_int)-1))) __PYX_ERR(0, 968, __pyx_L1_error)
    #pragma GCC diagnostic pop
+0969:         elif isinstance(ts, datetime):
  __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_ts, __pyx_ptype_7cpython_8datetime_datetime); 
  if (likely(__pyx_t_1)) {
/* … */
    goto __pyx_L3;
  }
+0970:             self._at_dt(ts)
    if (!(likely(((__pyx_v_ts) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_ts, __pyx_ptype_7cpython_8datetime_datetime))))) __PYX_ERR(0, 970, __pyx_L1_error)
    #pragma GCC diagnostic ignored "-Wincompatible-pointer-types"
    __pyx_t_2 = __pyx_f_7questdb_7ingress_6Buffer__at_dt(__pyx_v_self, ((PyDateTime_DateTime *)__pyx_v_ts)); if (unlikely(__pyx_t_2 == ((__pyx_t_7questdb_7ingress_void_int)-1))) __PYX_ERR(0, 970, __pyx_L1_error)
    #pragma GCC diagnostic pop
 0971:         else:
+0972:             raise TypeError(
  /*else*/ {
/* … */
    __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 972, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_Raise(__pyx_t_7, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __PYX_ERR(0, 972, __pyx_L1_error)
  }
  __pyx_L3:;
+0973:                 f'Unsupported type: {_fqn(type(ts))}. Must be one of: ' +
    __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 973, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = 0;
    __pyx_t_5 = 127;
    __Pyx_INCREF(__pyx_kp_u_Unsupported_type);
    __pyx_t_4 += 18;
    __Pyx_GIVEREF(__pyx_kp_u_Unsupported_type);
    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_kp_u_Unsupported_type);
    __pyx_t_6 = __pyx_f_7questdb_7ingress__fqn(((PyTypeObject*)((PyObject *)Py_TYPE(__pyx_v_ts)))); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 973, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = __Pyx_PyUnicode_Unicode(__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 973, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_5 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_7) > __pyx_t_5) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_7) : __pyx_t_5;
    __pyx_t_4 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_7);
    __Pyx_GIVEREF(__pyx_t_7);
    PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_7);
    __pyx_t_7 = 0;
    __Pyx_INCREF(__pyx_kp_u_Must_be_one_of);
    __pyx_t_4 += 18;
    __Pyx_GIVEREF(__pyx_kp_u_Must_be_one_of);
    PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_kp_u_Must_be_one_of);
    __pyx_t_7 = __Pyx_PyUnicode_Join(__pyx_t_3, 3, __pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 973, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyUnicode_ConcatInPlace(__pyx_t_7, __pyx_kp_u_TimestampNanos_datetime_None); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 973, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
 0974:                 'TimestampNanos, datetime, None')
 0975: 
+0976:     cdef void_int _row(
static __pyx_t_7questdb_7ingress_void_int __pyx_f_7questdb_7ingress_6Buffer__row(struct __pyx_obj_7questdb_7ingress_Buffer *__pyx_v_self, int __pyx_v_allow_auto_flush, PyObject *__pyx_v_table_name, struct __pyx_opt_args_7questdb_7ingress_6Buffer__row *__pyx_optional_args) {
/* … */
  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_AddTraceback("questdb.ingress.Buffer._row", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_name);
  __Pyx_XDECREF(__pyx_v_value);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
/* … */
struct __pyx_opt_args_7questdb_7ingress_6Buffer__row {
  int __pyx_n;
  PyObject *symbols;
  PyObject *columns;
  PyObject *at;
};
 0977:             self,
 0978:             bint allow_auto_flush,
 0979:             str table_name,
+0980:             dict symbols=None,
  PyObject *__pyx_v_symbols = ((PyObject*)Py_None);
+0981:             dict columns=None,
  PyObject *__pyx_v_columns = ((PyObject*)Py_None);
+0982:             object at=None) except -1:
  PyObject *__pyx_v_at = ((PyObject *)Py_None);
  int __pyx_v_wrote_fields;
  PyObject *__pyx_v_name = NULL;
  PyObject *__pyx_v_value = NULL;
  __pyx_t_7questdb_7ingress_void_int __pyx_r;
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_symbols = __pyx_optional_args->symbols;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_columns = __pyx_optional_args->columns;
        if (__pyx_optional_args->__pyx_n > 2) {
          __pyx_v_at = __pyx_optional_args->at;
        }
      }
    }
  }
 0983:         """
 0984:         Add a row to the buffer.
 0985:         """
+0986:         cdef bint wrote_fields = False
  __pyx_v_wrote_fields = 0;
+0987:         self._set_marker()
  #pragma GCC diagnostic ignored "-Wincompatible-pointer-types"
  __pyx_t_1 = __pyx_f_7questdb_7ingress_6Buffer__set_marker(__pyx_v_self); if (unlikely(__pyx_t_1 == ((__pyx_t_7questdb_7ingress_void_int)-1))) __PYX_ERR(0, 987, __pyx_L1_error)
  #pragma GCC diagnostic pop
+0988:         try:
  {
    /*try:*/ {
/* … */
    }
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    goto __pyx_L8_try_end;
    __pyx_L3_error:;
    __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
/* … */
    __pyx_L5_except_error:;
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_XGIVEREF(__pyx_t_4);
    __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
    goto __pyx_L1_error;
    __pyx_L8_try_end:;
  }
+0989:             self._table(table_name)
      #pragma GCC diagnostic ignored "-Wincompatible-pointer-types"
      __pyx_t_1 = __pyx_f_7questdb_7ingress_6Buffer__table(__pyx_v_self, __pyx_v_table_name); if (unlikely(__pyx_t_1 == ((__pyx_t_7questdb_7ingress_void_int)-1))) __PYX_ERR(0, 989, __pyx_L3_error)
      #pragma GCC diagnostic pop
+0990:             if symbols is not None:
      __pyx_t_5 = (__pyx_v_symbols != ((PyObject*)Py_None));
      if (__pyx_t_5) {
/* … */
      }
+0991:                 for name, value in symbols.items():
        __pyx_t_7 = 0;
        if (unlikely(__pyx_v_symbols == Py_None)) {
          PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "items");
          __PYX_ERR(0, 991, __pyx_L3_error)
        }
        __pyx_t_10 = __Pyx_dict_iterator(__pyx_v_symbols, 1, __pyx_n_s_items, (&__pyx_t_8), (&__pyx_t_9)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 991, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_10);
        __Pyx_XDECREF(__pyx_t_6);
        __pyx_t_6 = __pyx_t_10;
        __pyx_t_10 = 0;
        while (1) {
          __pyx_t_12 = __Pyx_dict_iter_next(__pyx_t_6, __pyx_t_8, &__pyx_t_7, &__pyx_t_10, &__pyx_t_11, NULL, __pyx_t_9);
          if (unlikely(__pyx_t_12 == 0)) break;
          if (unlikely(__pyx_t_12 == -1)) __PYX_ERR(0, 991, __pyx_L3_error)
          __Pyx_GOTREF(__pyx_t_10);
          __Pyx_GOTREF(__pyx_t_11);
          __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_10);
          __pyx_t_10 = 0;
          __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_11);
          __pyx_t_11 = 0;
+0992:                     if value is not None:
          __pyx_t_5 = (__pyx_v_value != Py_None);
          if (__pyx_t_5) {
/* … */
          }
        }
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+0993:                         self._symbol(name, value)
            if (!(likely(PyUnicode_CheckExact(__pyx_v_name))||((__pyx_v_name) == Py_None) || __Pyx_RaiseUnexpectedTypeError("unicode", __pyx_v_name))) __PYX_ERR(0, 993, __pyx_L3_error)
            if (!(likely(PyUnicode_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None) || __Pyx_RaiseUnexpectedTypeError("unicode", __pyx_v_value))) __PYX_ERR(0, 993, __pyx_L3_error)
            #pragma GCC diagnostic ignored "-Wincompatible-pointer-types"
            __pyx_t_1 = __pyx_f_7questdb_7ingress_6Buffer__symbol(__pyx_v_self, ((PyObject*)__pyx_v_name), ((PyObject*)__pyx_v_value)); if (unlikely(__pyx_t_1 == ((__pyx_t_7questdb_7ingress_void_int)-1))) __PYX_ERR(0, 993, __pyx_L3_error)
            #pragma GCC diagnostic pop
+0994:                         wrote_fields = True
            __pyx_v_wrote_fields = 1;
+0995:             if columns is not None:
      __pyx_t_5 = (__pyx_v_columns != ((PyObject*)Py_None));
      if (__pyx_t_5) {
/* … */
      }
+0996:                 for name, value in columns.items():
        __pyx_t_8 = 0;
        if (unlikely(__pyx_v_columns == Py_None)) {
          PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "items");
          __PYX_ERR(0, 996, __pyx_L3_error)
        }
        __pyx_t_11 = __Pyx_dict_iterator(__pyx_v_columns, 1, __pyx_n_s_items, (&__pyx_t_7), (&__pyx_t_9)); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 996, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_11);
        __Pyx_XDECREF(__pyx_t_6);
        __pyx_t_6 = __pyx_t_11;
        __pyx_t_11 = 0;
        while (1) {
          __pyx_t_12 = __Pyx_dict_iter_next(__pyx_t_6, __pyx_t_7, &__pyx_t_8, &__pyx_t_11, &__pyx_t_10, NULL, __pyx_t_9);
          if (unlikely(__pyx_t_12 == 0)) break;
          if (unlikely(__pyx_t_12 == -1)) __PYX_ERR(0, 996, __pyx_L3_error)
          __Pyx_GOTREF(__pyx_t_11);
          __Pyx_GOTREF(__pyx_t_10);
          __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_11);
          __pyx_t_11 = 0;
          __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_10);
          __pyx_t_10 = 0;
+0997:                     if value is not None:
          __pyx_t_5 = (__pyx_v_value != Py_None);
          if (__pyx_t_5) {
/* … */
          }
        }
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+0998:                         self._column(name, value)
            if (!(likely(PyUnicode_CheckExact(__pyx_v_name))||((__pyx_v_name) == Py_None) || __Pyx_RaiseUnexpectedTypeError("unicode", __pyx_v_name))) __PYX_ERR(0, 998, __pyx_L3_error)
            #pragma GCC diagnostic ignored "-Wincompatible-pointer-types"
            __pyx_t_1 = __pyx_f_7questdb_7ingress_6Buffer__column(__pyx_v_self, ((PyObject*)__pyx_v_name), __pyx_v_value); if (unlikely(__pyx_t_1 == ((__pyx_t_7questdb_7ingress_void_int)-1))) __PYX_ERR(0, 998, __pyx_L3_error)
            #pragma GCC diagnostic pop
+0999:                         wrote_fields = True
            __pyx_v_wrote_fields = 1;
+1000:             if wrote_fields:
      if (__pyx_v_wrote_fields) {
/* … */
        goto __pyx_L17;
      }
+1001:                 self._at(at if not isinstance(at, _ServerTimestamp) else None)
        __pyx_t_5 = __Pyx_TypeCheck(__pyx_v_at, __pyx_ptype_7questdb_7ingress__ServerTimestamp); 
        __pyx_t_13 = (!__pyx_t_5);
        if (__pyx_t_13) {
          __Pyx_INCREF(__pyx_v_at);
          __pyx_t_6 = __pyx_v_at;
        } else {
          __Pyx_INCREF(Py_None);
          __pyx_t_6 = Py_None;
        }
        #pragma GCC diagnostic ignored "-Wincompatible-pointer-types"
        __pyx_t_1 = __pyx_f_7questdb_7ingress_6Buffer__at(__pyx_v_self, __pyx_t_6); if (unlikely(__pyx_t_1 == ((__pyx_t_7questdb_7ingress_void_int)-1))) __PYX_ERR(0, 1001, __pyx_L3_error)
        #pragma GCC diagnostic pop
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+1002:                 self._clear_marker()
        #pragma GCC diagnostic ignored "-Wincompatible-pointer-types"
        __pyx_t_6 = __pyx_f_7questdb_7ingress_6Buffer__clear_marker(__pyx_v_self); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1002, __pyx_L3_error)
        #pragma GCC diagnostic pop
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
 1003:             else:
+1004:                 self._rewind_to_marker()
      /*else*/ {
        #pragma GCC diagnostic ignored "-Wincompatible-pointer-types"
        __pyx_t_1 = __pyx_f_7questdb_7ingress_6Buffer__rewind_to_marker(__pyx_v_self); if (unlikely(__pyx_t_1 == ((__pyx_t_7questdb_7ingress_void_int)-1))) __PYX_ERR(0, 1004, __pyx_L3_error)
        #pragma GCC diagnostic pop
      }
      __pyx_L17:;
+1005:         except:
    /*except:*/ {
      __Pyx_AddTraceback("questdb.ingress.Buffer._row", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_10, &__pyx_t_11) < 0) __PYX_ERR(0, 1005, __pyx_L5_except_error)
      __Pyx_XGOTREF(__pyx_t_6);
      __Pyx_XGOTREF(__pyx_t_10);
      __Pyx_XGOTREF(__pyx_t_11);
+1006:             self._rewind_to_marker()
      #pragma GCC diagnostic ignored "-Wincompatible-pointer-types"
      __pyx_t_1 = __pyx_f_7questdb_7ingress_6Buffer__rewind_to_marker(__pyx_v_self); if (unlikely(__pyx_t_1 == ((__pyx_t_7questdb_7ingress_void_int)-1))) __PYX_ERR(0, 1006, __pyx_L5_except_error)
      #pragma GCC diagnostic pop
+1007:             raise
      __Pyx_GIVEREF(__pyx_t_6);
      __Pyx_GIVEREF(__pyx_t_10);
      __Pyx_XGIVEREF(__pyx_t_11);
      __Pyx_ErrRestoreWithState(__pyx_t_6, __pyx_t_10, __pyx_t_11);
      __pyx_t_6 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; 
      __PYX_ERR(0, 1007, __pyx_L5_except_error)
    }
+1008:         if wrote_fields and allow_auto_flush:
  if (__pyx_v_wrote_fields) {
  } else {
    __pyx_t_13 = __pyx_v_wrote_fields;
    goto __pyx_L21_bool_binop_done;
  }
  __pyx_t_13 = __pyx_v_allow_auto_flush;
  __pyx_L21_bool_binop_done:;
  if (__pyx_t_13) {
/* … */
  }
+1009:             self._may_trigger_row_complete()
    #pragma GCC diagnostic ignored "-Wincompatible-pointer-types"
    __pyx_t_1 = __pyx_f_7questdb_7ingress_6Buffer__may_trigger_row_complete(__pyx_v_self); if (unlikely(__pyx_t_1 == ((__pyx_t_7questdb_7ingress_void_int)-1))) __PYX_ERR(0, 1009, __pyx_L1_error)
    #pragma GCC diagnostic pop
 1010: 
+1011:     def row(
/* Python wrapper */
static PyObject *__pyx_pw_7questdb_7ingress_6Buffer_15row(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7questdb_7ingress_6Buffer_14row, "\n        Add a single row (line) to the buffer.\n\n        .. code-block:: python\n\n            # All fields specified.\n            buffer.row(\n                'table_name',\n                symbols={'sym1': 'abc', 'sym2': 'def', 'sym3': None},\n                columns={\n                    'col1': True,\n                    'col2': 123,\n                    'col3': 3.14,\n                    'col4': 'xyz',\n                    'col5': TimestampMicros(123456789),\n                    'col6': datetime(2019, 1, 1, 12, 0, 0),\n                    'col7': None},\n                at=TimestampNanos(123456789))\n\n            # Only symbols specified. Designated timestamp assigned by the db.\n            buffer.row(\n                'table_name',\n                symbols={'sym1': 'abc', 'sym2': 'def'}, at=Server.Timestamp)\n\n            # Float columns and timestamp specified as `datetime.datetime`.\n            # Pay special attention to the timezone, which if unspecified is\n            # assumed to be the local timezone (and not UTC).\n            buffer.row(\n                'sensor data',\n                columns={\n                    'temperature': 24.5,\n                    'humidity': 0.5},\n                at=datetime.datetime.now(tz=datetime.timezone.utc))\n\n\n        Python strings passed as values to ``symbols`` are going to be encoded\n        as the ``SYMBOL`` type in QuestDB, whilst Python strings passed as\n        values to ``columns`` are going to be encoded as the ``STRING`` type.\n\n        Refer to the\n        `QuestDB documentation <https://questdb.io/docs/concept/symbol/>`_ to\n        understand the difference between the ``SYMBOL`` and ``STRING`` types\n        (TL;DR: symbols are interned strings).\n\n        Column values can be specified with Python types directly and map as so:\n\n        .. list-table::\n            :header-rows: 1\n\n            * - Python type\n              - Serialized as ILP type\n            * - ``bool``\n      ""        - `BOOLEAN <https://questdb.io/docs/reference/api/ilp/columnset-types#boolean>`_\n            * - ``int``\n              - `INTEGER <https://questdb.io/docs/reference/api/ilp/columnset-types#integer>`_\n            * - ``float``\n              - `FLOAT <https://questdb.io/docs/reference/api/ilp/columnset-types#float>`_\n            * - ``str``\n              - `STRING <https://questdb.io/docs/reference/api/ilp/columnset-types#string>`_\n            * - ``datetime.datetime`` and ``TimestampMicros``\n              - `TIMESTAMP <https://questdb.io/docs/reference/api/ilp/columnset-types#timestamp>`_\n            * - ``None``\n              - *Column is skipped and not serialized.*\n\n        If the destination table was already created, then the columns types\n        will be cast to the types of the existing columns whenever possible\n        (Refer to the QuestDB documentation pages linked above).\n\n        Adding a row can trigger auto-flushing behaviour.\n\n        :param table_name: The name of the table to which the row belongs.\n        :param symbols: A dictionary of symbol column names to ``str`` values.\n            As a convenience, you can also pass a ``None`` value which will\n            have the same effect as skipping the key: If the column already\n            existed, it will be recorded as ``NULL``, otherwise it will not be\n            created.\n        :param columns: A dictionary of column names to ``bool``, ``int``,\n            ``float``, ``str``, ``TimestampMicros`` or ``datetime`` values.\n            As a convenience, you can also pass a ``None`` value which will\n            have the same effect as skipping the key: If the column already\n            existed, it will be recorded as ``NULL``, otherwise it will not be\n            created.\n        :param at: The timestamp of the row. This is required!\n            If ``ServerTimestamp``, timestamp is assigned by QuestDB.\n            If ``datetime``, the timestamp is converted to nano""seconds.\n            A nanosecond unix epoch timestamp can be passed\n            explicitly as a ``TimestampNanos`` object.\n        ");
static PyMethodDef __pyx_mdef_7questdb_7ingress_6Buffer_15row = {"row", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7questdb_7ingress_6Buffer_15row, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7questdb_7ingress_6Buffer_14row};
static PyObject *__pyx_pw_7questdb_7ingress_6Buffer_15row(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_table_name = 0;
  PyObject *__pyx_v_symbols = 0;
  PyObject *__pyx_v_columns = 0;
  PyObject *__pyx_v_at = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("row (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_table_name,&__pyx_n_s_at,&__pyx_n_s_symbols,&__pyx_n_s_columns,0};
  PyObject* values[4] = {0,0,0,0};
/* … */
  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7questdb_7ingress_6Buffer_14row(struct __pyx_obj_7questdb_7ingress_Buffer *__pyx_v_self, PyObject *__pyx_v_table_name, PyObject *__pyx_v_symbols, PyObject *__pyx_v_columns, PyObject *__pyx_v_at) {
  PyObject *__pyx_r = NULL;
/* … */
  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("questdb.ingress.Buffer.row", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
/* … */
  __pyx_tuple__80 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_table_name, __pyx_n_s_symbols, __pyx_n_s_columns, __pyx_n_s_at); if (unlikely(!__pyx_tuple__80)) __PYX_ERR(0, 1011, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__80);
  __Pyx_GIVEREF(__pyx_tuple__80);
/* … */
  __pyx_t_19 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 1011, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_19);
/* … */
  __pyx_t_18 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 1011, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_18);
  if (PyDict_SetItem(__pyx_t_18, __pyx_n_s_table_name, __pyx_n_s_str) < 0) __PYX_ERR(0, 1011, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_18, __pyx_n_s_symbols, __pyx_kp_s_Optional_Dict_str_Optional_str) < 0) __PYX_ERR(0, 1011, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_18, __pyx_n_s_columns, __pyx_kp_s_Optional_Dict_str_Union_None_boo) < 0) __PYX_ERR(0, 1011, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_18, __pyx_n_s_at, __pyx_kp_s_Union_ServerTimestamp_TimestampN) < 0) __PYX_ERR(0, 1011, __pyx_L1_error)
  __pyx_t_20 = __Pyx_CyFunction_New(&__pyx_mdef_7questdb_7ingress_6Buffer_15row, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Buffer_row, NULL, __pyx_n_s_questdb_ingress, __pyx_d, ((PyObject *)__pyx_codeobj__81)); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 1011, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_20);
  __Pyx_CyFunction_SetDefaultsKwDict(__pyx_t_20, __pyx_t_19);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_20, __pyx_t_18);
  __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_7questdb_7ingress_Buffer, __pyx_n_s_row, __pyx_t_20) < 0) __PYX_ERR(0, 1011, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
  PyType_Modified(__pyx_ptype_7questdb_7ingress_Buffer);
  __pyx_codeobj__81 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__80, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_questdb_ingress_pyx, __pyx_n_s_row, 1011, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__81)) __PYX_ERR(0, 1011, __pyx_L1_error)
 1012:             self,
 1013:             table_name: str,
 1014:             *,
+1015:             symbols: Optional[Dict[str, Optional[str]]]=None,
    values[2] = __Pyx_Arg_NewRef_FASTCALL(((PyObject*)Py_None));
/* … */
  if (PyDict_SetItem(__pyx_t_19, __pyx_n_s_symbols, Py_None) < 0) __PYX_ERR(0, 1011, __pyx_L1_error)
 1016:             columns: Optional[Dict[
 1017:                 str,
 1018:                 Union[None, bool, int, float, str, TimestampMicros, datetime]]
+1019:                 ]=None,
    values[3] = __Pyx_Arg_NewRef_FASTCALL(((PyObject*)Py_None));
    if (likely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_table_name)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1011, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_at)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1011, __pyx_L3_error)
        else {
          __Pyx_RaiseKeywordRequired("row", __pyx_n_s_at); __PYX_ERR(0, 1011, __pyx_L3_error)
        }
      }
      if (kw_args > 0 && likely(kw_args <= 2)) {
        Py_ssize_t index;
        for (index = 2; index < 4 && kw_args > 0; index++) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, *__pyx_pyargnames[index]);
          if (value) { values[index] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1011, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "row") < 0)) __PYX_ERR(0, 1011, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      __Pyx_RaiseKeywordRequired("row", __pyx_n_s_at); __PYX_ERR(0, 1011, __pyx_L3_error)
    }
    __pyx_v_table_name = ((PyObject*)values[0]);
    __pyx_v_at = values[1];
    __pyx_v_symbols = ((PyObject*)values[2]);
    __pyx_v_columns = ((PyObject*)values[3]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("row", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1011, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("questdb.ingress.Buffer.row", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_table_name), (&PyUnicode_Type), 0, "table_name", 1))) __PYX_ERR(0, 1013, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_symbols), (&PyDict_Type), 1, "symbols", 1))) __PYX_ERR(0, 1015, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_columns), (&PyDict_Type), 1, "columns", 1))) __PYX_ERR(0, 1016, __pyx_L1_error)
  __pyx_r = __pyx_pf_7questdb_7ingress_6Buffer_14row(((struct __pyx_obj_7questdb_7ingress_Buffer *)__pyx_v_self), __pyx_v_table_name, __pyx_v_symbols, __pyx_v_columns, __pyx_v_at);
/* … */
  if (PyDict_SetItem(__pyx_t_19, __pyx_n_s_columns, Py_None) < 0) __PYX_ERR(0, 1011, __pyx_L1_error)
 1020:             at: Union[ServerTimestamp, TimestampNanos, datetime]):
 1021:         """
 1022:         Add a single row (line) to the buffer.
 1023: 
 1024:         .. code-block:: python
 1025: 
 1026:             # All fields specified.
 1027:             buffer.row(
 1028:                 'table_name',
 1029:                 symbols={'sym1': 'abc', 'sym2': 'def', 'sym3': None},
 1030:                 columns={
 1031:                     'col1': True,
 1032:                     'col2': 123,
 1033:                     'col3': 3.14,
 1034:                     'col4': 'xyz',
 1035:                     'col5': TimestampMicros(123456789),
 1036:                     'col6': datetime(2019, 1, 1, 12, 0, 0),
 1037:                     'col7': None},
 1038:                 at=TimestampNanos(123456789))
 1039: 
 1040:             # Only symbols specified. Designated timestamp assigned by the db.
 1041:             buffer.row(
 1042:                 'table_name',
 1043:                 symbols={'sym1': 'abc', 'sym2': 'def'}, at=Server.Timestamp)
 1044: 
 1045:             # Float columns and timestamp specified as `datetime.datetime`.
 1046:             # Pay special attention to the timezone, which if unspecified is
 1047:             # assumed to be the local timezone (and not UTC).
 1048:             buffer.row(
 1049:                 'sensor data',
 1050:                 columns={
 1051:                     'temperature': 24.5,
 1052:                     'humidity': 0.5},
 1053:                 at=datetime.datetime.now(tz=datetime.timezone.utc))
 1054: 
 1055: 
 1056:         Python strings passed as values to ``symbols`` are going to be encoded
 1057:         as the ``SYMBOL`` type in QuestDB, whilst Python strings passed as
 1058:         values to ``columns`` are going to be encoded as the ``STRING`` type.
 1059: 
 1060:         Refer to the
 1061:         `QuestDB documentation <https://questdb.io/docs/concept/symbol/>`_ to
 1062:         understand the difference between the ``SYMBOL`` and ``STRING`` types
 1063:         (TL;DR: symbols are interned strings).
 1064: 
 1065:         Column values can be specified with Python types directly and map as so:
 1066: 
 1067:         .. list-table::
 1068:             :header-rows: 1
 1069: 
 1070:             * - Python type
 1071:               - Serialized as ILP type
 1072:             * - ``bool``
 1073:               - `BOOLEAN <https://questdb.io/docs/reference/api/ilp/columnset-types#boolean>`_
 1074:             * - ``int``
 1075:               - `INTEGER <https://questdb.io/docs/reference/api/ilp/columnset-types#integer>`_
 1076:             * - ``float``
 1077:               - `FLOAT <https://questdb.io/docs/reference/api/ilp/columnset-types#float>`_
 1078:             * - ``str``
 1079:               - `STRING <https://questdb.io/docs/reference/api/ilp/columnset-types#string>`_
 1080:             * - ``datetime.datetime`` and ``TimestampMicros``
 1081:               - `TIMESTAMP <https://questdb.io/docs/reference/api/ilp/columnset-types#timestamp>`_
 1082:             * - ``None``
 1083:               - *Column is skipped and not serialized.*
 1084: 
 1085:         If the destination table was already created, then the columns types
 1086:         will be cast to the types of the existing columns whenever possible
 1087:         (Refer to the QuestDB documentation pages linked above).
 1088: 
 1089:         Adding a row can trigger auto-flushing behaviour.
 1090: 
 1091:         :param table_name: The name of the table to which the row belongs.
 1092:         :param symbols: A dictionary of symbol column names to ``str`` values.
 1093:             As a convenience, you can also pass a ``None`` value which will
 1094:             have the same effect as skipping the key: If the column already
 1095:             existed, it will be recorded as ``NULL``, otherwise it will not be
 1096:             created.
 1097:         :param columns: A dictionary of column names to ``bool``, ``int``,
 1098:             ``float``, ``str``, ``TimestampMicros`` or ``datetime`` values.
 1099:             As a convenience, you can also pass a ``None`` value which will
 1100:             have the same effect as skipping the key: If the column already
 1101:             existed, it will be recorded as ``NULL``, otherwise it will not be
 1102:             created.
 1103:         :param at: The timestamp of the row. This is required!
 1104:             If ``ServerTimestamp``, timestamp is assigned by QuestDB.
 1105:             If ``datetime``, the timestamp is converted to nanoseconds.
 1106:             A nanosecond unix epoch timestamp can be passed
 1107:             explicitly as a ``TimestampNanos`` object.
 1108:         """
+1109:         if at is None:
  __pyx_t_1 = (__pyx_v_at == Py_None);
  if (unlikely(__pyx_t_1)) {
/* … */
  }
+1110:             raise IngressError(
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_IngressError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1110, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
+1111:                 IngressErrorCode.InvalidTimestamp,
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_IngressErrorCode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1111, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_InvalidTimestamp); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1111, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = NULL;
    __pyx_t_6 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
        __pyx_t_6 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[3] = {__pyx_t_4, __pyx_t_5, __pyx_kp_u_at_must_be_of_type_TimestampNan};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_6, 2+__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1110, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(0, 1110, __pyx_L1_error)
 1112:                 "`at` must be of type TimestampNanos, datetime, or ServerTimestamp"
 1113:             )
+1114:         self._row(
  __pyx_t_8.__pyx_n = 3;
  __pyx_t_8.symbols = __pyx_v_symbols;
  __pyx_t_8.columns = __pyx_v_columns;
  __pyx_t_8.at = __pyx_v_at;
  __pyx_t_7 = ((struct __pyx_vtabstruct_7questdb_7ingress_Buffer *)__pyx_v_self->__pyx_vtab)->_row(__pyx_v_self, 1, __pyx_v_table_name, &__pyx_t_8); if (unlikely(__pyx_t_7 == ((__pyx_t_7questdb_7ingress_void_int)-1))) __PYX_ERR(0, 1114, __pyx_L1_error)
 1115:             True,  # allow_auto_flush
 1116:             table_name,
 1117:             symbols,
 1118:             columns,
 1119:             at)
+1120:         return self
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_self);
  __pyx_r = ((PyObject *)__pyx_v_self);
  goto __pyx_L0;
 1121: 
+1122:     def dataframe(
/* Python wrapper */
static PyObject *__pyx_pw_7questdb_7ingress_6Buffer_17dataframe(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7questdb_7ingress_6Buffer_16dataframe, "\n        Add a pandas DataFrame to the buffer.\n\n        Also see the :func:`Sender.dataframe` method if you're\n        not using the buffer explicitly. It supports the same parameters\n        and also supports auto-flushing.\n\n        This feature requires the ``pandas``, ``numpy`` and ``pyarrow``\n        package to be installed.\n\n        Adding a dataframe can trigger auto-flushing behaviour,\n        even between rows of the same dataframe. To avoid this, you can\n        use HTTP and transactions (see :func:`Sender.transaction`).\n\n        :param df: The pandas DataFrame to serialize to the buffer.\n        :type df: pandas.DataFrame\n\n        :param table_name: The name of the table to which the rows belong.\n\n            If ``None``, the table name is taken from the ``table_name_col``\n            parameter. If both ``table_name`` and ``table_name_col`` are\n            ``None``, the table name is taken from the DataFrame's index\n            name (``df.index.name`` attribute).\n        :type table_name: str or None\n\n        :param table_name_col: The name or index of the column in the DataFrame\n            that contains the table name.\n            \n            If ``None``, the table name is taken\n            from the ``table_name`` parameter. If both ``table_name`` and\n            ``table_name_col`` are ``None``, the table name is taken from the\n            DataFrame's index name (``df.index.name`` attribute).\n\n            If ``table_name_col`` is an integer, it is interpreted as the index\n            of the column starting from ``0``. The index of the column can be\n            negative, in which case it is interpreted as an offset from the end\n            of the DataFrame. E.g. ``-1`` is the last column.\n        :type table_name_col: str or int or None\n\n        :param symbols: The columns to be serialized as symbols.\n        \n            If ``'auto'`` (default), all columns of dtype ``'categorical'`` are\n            serialized a""s symbols. If ``True``, all ``str`` columns are\n            serialized as symbols. If ``False``, no columns are serialized as\n            symbols.\n            \n            The list of symbols can also be specified explicitly as a ``list``\n            of column names (``str``) or indices (``int``). Integer indices\n            start at ``0`` and can be negative, offset from the end of the\n            DataFrame. E.g. ``-1`` is the last column.\n\n            Only columns containing strings can be serialized as symbols.\n\n        :type symbols: str or bool or list of str or list of int\n\n        :param at: The designated timestamp of the rows.\n        \n            You can specify a single value for all rows or column name or index.\n            If ``ServerTimestamp``, timestamp is assigned by the server for all rows.\n            To pass in a timestamp explicitly as an integer use the\n            ``TimestampNanos`` wrapper type. To get the current timestamp,\n            use ``TimestampNanos.now()``.\n            When passing a ``datetime.datetime`` object, the timestamp is\n            converted to nanoseconds.\n            A ``datetime`` object is assumed to be in the local timezone unless\n            one is specified explicitly (so call\n            ``datetime.datetime.now(tz=datetime.timezone.utc)`` instead\n            of ``datetime.datetime.utcnow()`` for the current timestamp to\n            avoid bugs).\n\n            To specify a different timestamp for each row, pass in a column name\n            (``str``) or index (``int``, 0-based index, negative index\n            supported): In this case, the column needs to be of dtype\n            ``datetime64[ns]`` (assumed to be in the **UTC timezone** and not\n            local, due to differences in Pandas and Python datetime handling) or\n            ``datetime64[ns, tz]``. When a timezone is specified in the column,\n            it is converted to UTC automatically.\n\n            A timestamp column ca""n also contain ``None`` values. The server will\n            assign the current timestamp to those rows.\n\n            **Note**: All timestamps are always converted to nanoseconds and in\n            the UTC timezone. Timezone information is dropped before sending and\n            QuestDB will not store any timezone information.\n        :type at: TimestampNanos, datetime.datetime, int or str or None\n\n        **Note**: It is an error to specify both ``table_name`` and\n        ``table_name_col``.\n\n        **Note**: The \"index\" column of the DataFrame is never serialized,\n        even if it is named.\n\n        Example:\n\n        .. code-block:: python\n\n            import pandas as pd\n            import questdb.ingress as qi\n\n            buf = qi.Buffer()\n            # ...\n\n            df = pd.DataFrame({\n                'location': ['London', 'Managua', 'London'],\n                'temperature': [24.5, 35.0, 25.5],\n                'humidity': [0.5, 0.6, 0.45],\n                'ts': pd.date_range('2021-07-01', periods=3)})\n            buf.dataframe(\n                df, table_name='weather', at='ts', symbols=['location'])\n\n            # ...\n            sender.flush(buf)\n\n        **Pandas to ILP datatype mappings**\n\n        .. seealso:: https://questdb.io/docs/reference/api/ilp/columnset-types/\n\n        .. list-table:: Pandas Mappings\n            :header-rows: 1\n\n            * - Pandas ``dtype``\n              - Nulls\n              - ILP Datatype\n            * - ``'bool'``\n              - N\n              - ``BOOLEAN``\n            * - ``'boolean'``\n              - N **\316\261**\n              - ``BOOLEAN``\n            * - ``'object'`` (``bool`` objects)\n              - N **\316\261**\n              - ``BOOLEAN``\n            * - ``'uint8'``\n              - N\n              - ``INTEGER``\n            * - ``'int8'``\n              - N\n              - ``INTEGER``\n            * - ``'uint16'``\n              - N\n              - ""``INTEGER``\n            * - ``'int16'``\n              - N\n              - ``INTEGER``\n            * - ``'uint32'``\n              - N\n              - ``INTEGER``\n            * - ``'int32'``\n              - N\n              - ``INTEGER``\n            * - ``'uint64'``\n              - N\n              - ``INTEGER`` **\316\262**\n            * - ``'int64'``\n              - N\n              - ``INTEGER``\n            * - ``'UInt8'``\n              - Y\n              - ``INTEGER``\n            * - ``'Int8'``\n              - Y\n              - ``INTEGER``\n            * - ``'UInt16'``\n              - Y\n              - ``INTEGER``\n            * - ``'Int16'``\n              - Y\n              - ``INTEGER``\n            * - ``'UInt32'``\n              - Y\n              - ``INTEGER``\n            * - ``'Int32'``\n              - Y\n              - ``INTEGER``\n            * - ``'UInt64'``\n              - Y\n              - ``INTEGER`` **\316\262**\n            * - ``'Int64'``\n              - Y\n              - ``INTEGER``\n            * - ``'object'`` (``int`` objects)\n              - Y\n              - ``INTEGER`` **\316\262**\n            * - ``'float32'`` **\316\263**\n              - Y (``NaN``)\n              - ``FLOAT``\n            * - ``'float64'``\n              - Y (``NaN``)\n              - ``FLOAT``\n            * - ``'object'`` (``float`` objects)\n              - Y (``NaN``)\n              - ``FLOAT``\n            * - ``'string'`` (``str`` objects)\n              - Y\n              - ``STRING`` (default), ``SYMBOL`` via ``symbols`` arg. **\316\264**\n            * - ``'string[pyarrow]'``\n              - Y\n              - ``STRING`` (default), ``SYMBOL`` via ``symbols`` arg. **\316\264**\n            * - ``'category'`` (``str`` objects) **\316\265**\n              - Y\n              - ``SYMBOL`` (default), ``STRING`` via ``symbols`` arg. **\316\264**\n            * - ``'object'`` (``str`` objects)\n              - Y\n              - ``STRING`` (""default), ``SYMBOL`` via ``symbols`` arg. **\316\264**\n            * - ``'datetime64[ns]'``\n              - Y\n              - ``TIMESTAMP`` **\316\266**\n            * - ``'datetime64[ns, tz]'``\n              - Y\n              - ``TIMESTAMP`` **\316\266**\n\n        .. note::\n\n            * **\316\261**: Note some pandas dtypes allow nulls (e.g. ``'boolean'``),\n              where the QuestDB database does not.\n\n            * **\316\262**: The valid range for integer values is -2^63 to 2^63-1.\n              Any ``'uint64'``, ``'UInt64'`` or python ``int`` object values\n              outside this range will raise an error during serialization.\n\n            * **\316\263**: Upcast to 64-bit float during serialization.\n\n            * **\316\264**: Columns containing strings can also be used to specify the\n              table name. See ``table_name_col``.\n\n            * **\316\265**: We only support categories containing strings. If the\n              category contains non-string values, an error will be raised.\n\n            * **\316\266**: The '.dataframe()' method only supports datetimes with\n              nanosecond precision. The designated timestamp column (see ``at``\n              parameter) maintains the nanosecond precision, whilst values\n              stored as columns have their precision truncated to microseconds.\n              All dates are sent as UTC and any additional timezone information\n              is dropped. If no timezone is specified, we follow\n              the pandas convention of assuming the timezone is UTC.\n              Datetimes before 1970-01-01 00:00:00 UTC are not supported.\n              If a datetime value is specified as ``None`` (``NaT``), it is\n              interpreted as the current QuestDB server time set on receipt of\n              message.\n\n        **Error Handling and Recovery**\n\n        In case an exception is raised during dataframe serialization, the\n        buffer is left in its previous ""state.\n        The buffer remains in a valid state and can be used for further calls\n        even after an error.\n\n        For clarification, as an example, if an invalid ``None``\n        value appears at the 3rd row for a ``bool`` column, neither the 3rd nor\n        the preceding rows are added to the buffer.\n\n        **Note**: This differs from the :func:`Sender.dataframe` method, which\n        modifies this guarantee due to its ``auto_flush`` logic.\n\n        **Performance Considerations**\n\n        The Python GIL is released during serialization if it is not needed.\n        If any column requires the GIL, the entire serialization is done whilst\n        holding the GIL.\n\n        Column types that require the GIL are:\n\n        * Columns of ``str``, ``float`` or ``int`` or ``float`` Python objects.\n        * The ``'string[python]'`` dtype.\n        ");
static PyMethodDef __pyx_mdef_7questdb_7ingress_6Buffer_17dataframe = {"dataframe", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7questdb_7ingress_6Buffer_17dataframe, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7questdb_7ingress_6Buffer_16dataframe};
static PyObject *__pyx_pw_7questdb_7ingress_6Buffer_17dataframe(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_df = 0;
  PyObject *__pyx_v_table_name = 0;
  PyObject *__pyx_v_table_name_col = 0;
  PyObject *__pyx_v_symbols = 0;
  PyObject *__pyx_v_at = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("dataframe (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_df,&__pyx_n_s_at,&__pyx_n_s_table_name,&__pyx_n_s_table_name_col,&__pyx_n_s_symbols,0};
  PyObject* values[5] = {0,0,0,0,0};
/* … */
  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7questdb_7ingress_6Buffer_16dataframe(struct __pyx_obj_7questdb_7ingress_Buffer *__pyx_v_self, PyObject *__pyx_v_df, PyObject *__pyx_v_table_name, PyObject *__pyx_v_table_name_col, PyObject *__pyx_v_symbols, PyObject *__pyx_v_at) {
  PyObject *__pyx_r = NULL;
/* … */
  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("questdb.ingress.Buffer.dataframe", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
/* … */
  __pyx_tuple__82 = PyTuple_Pack(6, __pyx_n_s_self, __pyx_n_s_df, __pyx_n_s_table_name, __pyx_n_s_table_name_col, __pyx_n_s_symbols, __pyx_n_s_at); if (unlikely(!__pyx_tuple__82)) __PYX_ERR(0, 1122, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__82);
  __Pyx_GIVEREF(__pyx_tuple__82);
/* … */
  __pyx_t_20 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 1122, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_20);
/* … */
  __pyx_t_18 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 1122, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_18);
  if (PyDict_SetItem(__pyx_t_18, __pyx_n_s_table_name, __pyx_kp_s_Optional_str) < 0) __PYX_ERR(0, 1122, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_18, __pyx_n_s_table_name_col, __pyx_kp_s_Union_None_int_str) < 0) __PYX_ERR(0, 1122, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_18, __pyx_n_s_symbols, __pyx_kp_s_Union_str_bool_List_int_List_str) < 0) __PYX_ERR(0, 1122, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_18, __pyx_n_s_at, __pyx_kp_s_Union_ServerTimestamp_int_str_Ti) < 0) __PYX_ERR(0, 1122, __pyx_L1_error)
  __pyx_t_19 = __Pyx_CyFunction_New(&__pyx_mdef_7questdb_7ingress_6Buffer_17dataframe, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Buffer_dataframe, NULL, __pyx_n_s_questdb_ingress, __pyx_d, ((PyObject *)__pyx_codeobj__83)); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 1122, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_19);
  __Pyx_CyFunction_SetDefaultsKwDict(__pyx_t_19, __pyx_t_20);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_19, __pyx_t_18);
  __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_7questdb_7ingress_Buffer, __pyx_n_s_dataframe, __pyx_t_19) < 0) __PYX_ERR(0, 1122, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
  PyType_Modified(__pyx_ptype_7questdb_7ingress_Buffer);
  __pyx_codeobj__83 = (PyObject*)__Pyx_PyCode_New(2, 0, 4, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__82, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_questdb_ingress_pyx, __pyx_n_s_dataframe, 1122, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__83)) __PYX_ERR(0, 1122, __pyx_L1_error)
 1123:             self,
 1124:             df,  # : pd.DataFrame
 1125:             *,
+1126:             table_name: Optional[str] = None,
    values[2] = __Pyx_Arg_NewRef_FASTCALL(((PyObject*)Py_None));
/* … */
  if (PyDict_SetItem(__pyx_t_20, __pyx_n_s_table_name, Py_None) < 0) __PYX_ERR(0, 1122, __pyx_L1_error)
+1127:             table_name_col: Union[None, int, str] = None,
    values[3] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
    values[4] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)__pyx_n_u_auto));
    if (likely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_df)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1122, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_at)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1122, __pyx_L3_error)
        else {
          __Pyx_RaiseKeywordRequired("dataframe", __pyx_n_s_at); __PYX_ERR(0, 1122, __pyx_L3_error)
        }
      }
      if (kw_args > 0 && likely(kw_args <= 3)) {
        Py_ssize_t index;
        for (index = 2; index < 5 && kw_args > 0; index++) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, *__pyx_pyargnames[index]);
          if (value) { values[index] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1122, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "dataframe") < 0)) __PYX_ERR(0, 1122, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      __Pyx_RaiseKeywordRequired("dataframe", __pyx_n_s_at); __PYX_ERR(0, 1122, __pyx_L3_error)
    }
    __pyx_v_df = values[0];
    __pyx_v_at = values[1];
    __pyx_v_table_name = ((PyObject*)values[2]);
    __pyx_v_table_name_col = values[3];
    __pyx_v_symbols = values[4];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("dataframe", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1122, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("questdb.ingress.Buffer.dataframe", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_table_name), (&PyUnicode_Type), 1, "table_name", 1))) __PYX_ERR(0, 1126, __pyx_L1_error)
  __pyx_r = __pyx_pf_7questdb_7ingress_6Buffer_16dataframe(((struct __pyx_obj_7questdb_7ingress_Buffer *)__pyx_v_self), __pyx_v_df, __pyx_v_table_name, __pyx_v_table_name_col, __pyx_v_symbols, __pyx_v_at);
/* … */
  if (PyDict_SetItem(__pyx_t_20, __pyx_n_s_table_name_col, Py_None) < 0) __PYX_ERR(0, 1122, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_20, __pyx_n_s_symbols, __pyx_n_u_auto) < 0) __PYX_ERR(0, 1122, __pyx_L1_error)
 1128:             symbols: Union[str, bool, List[int], List[str]] = 'auto',
 1129:             at: Union[ServerTimestamp, int, str, TimestampNanos, datetime]):
 1130:         """
 1131:         Add a pandas DataFrame to the buffer.
 1132: 
 1133:         Also see the :func:`Sender.dataframe` method if you're
 1134:         not using the buffer explicitly. It supports the same parameters
 1135:         and also supports auto-flushing.
 1136: 
 1137:         This feature requires the ``pandas``, ``numpy`` and ``pyarrow``
 1138:         package to be installed.
 1139: 
 1140:         Adding a dataframe can trigger auto-flushing behaviour,
 1141:         even between rows of the same dataframe. To avoid this, you can
 1142:         use HTTP and transactions (see :func:`Sender.transaction`).
 1143: 
 1144:         :param df: The pandas DataFrame to serialize to the buffer.
 1145:         :type df: pandas.DataFrame
 1146: 
 1147:         :param table_name: The name of the table to which the rows belong.
 1148: 
 1149:             If ``None``, the table name is taken from the ``table_name_col``
 1150:             parameter. If both ``table_name`` and ``table_name_col`` are
 1151:             ``None``, the table name is taken from the DataFrame's index
 1152:             name (``df.index.name`` attribute).
 1153:         :type table_name: str or None
 1154: 
 1155:         :param table_name_col: The name or index of the column in the DataFrame
 1156:             that contains the table name.
 1157: 
 1158:             If ``None``, the table name is taken
 1159:             from the ``table_name`` parameter. If both ``table_name`` and
 1160:             ``table_name_col`` are ``None``, the table name is taken from the
 1161:             DataFrame's index name (``df.index.name`` attribute).
 1162: 
 1163:             If ``table_name_col`` is an integer, it is interpreted as the index
 1164:             of the column starting from ``0``. The index of the column can be
 1165:             negative, in which case it is interpreted as an offset from the end
 1166:             of the DataFrame. E.g. ``-1`` is the last column.
 1167:         :type table_name_col: str or int or None
 1168: 
 1169:         :param symbols: The columns to be serialized as symbols.
 1170: 
 1171:             If ``'auto'`` (default), all columns of dtype ``'categorical'`` are
 1172:             serialized as symbols. If ``True``, all ``str`` columns are
 1173:             serialized as symbols. If ``False``, no columns are serialized as
 1174:             symbols.
 1175: 
 1176:             The list of symbols can also be specified explicitly as a ``list``
 1177:             of column names (``str``) or indices (``int``). Integer indices
 1178:             start at ``0`` and can be negative, offset from the end of the
 1179:             DataFrame. E.g. ``-1`` is the last column.
 1180: 
 1181:             Only columns containing strings can be serialized as symbols.
 1182: 
 1183:         :type symbols: str or bool or list of str or list of int
 1184: 
 1185:         :param at: The designated timestamp of the rows.
 1186: 
 1187:             You can specify a single value for all rows or column name or index.
 1188:             If ``ServerTimestamp``, timestamp is assigned by the server for all rows.
 1189:             To pass in a timestamp explicitly as an integer use the
 1190:             ``TimestampNanos`` wrapper type. To get the current timestamp,
 1191:             use ``TimestampNanos.now()``.
 1192:             When passing a ``datetime.datetime`` object, the timestamp is
 1193:             converted to nanoseconds.
 1194:             A ``datetime`` object is assumed to be in the local timezone unless
 1195:             one is specified explicitly (so call
 1196:             ``datetime.datetime.now(tz=datetime.timezone.utc)`` instead
 1197:             of ``datetime.datetime.utcnow()`` for the current timestamp to
 1198:             avoid bugs).
 1199: 
 1200:             To specify a different timestamp for each row, pass in a column name
 1201:             (``str``) or index (``int``, 0-based index, negative index
 1202:             supported): In this case, the column needs to be of dtype
 1203:             ``datetime64[ns]`` (assumed to be in the **UTC timezone** and not
 1204:             local, due to differences in Pandas and Python datetime handling) or
 1205:             ``datetime64[ns, tz]``. When a timezone is specified in the column,
 1206:             it is converted to UTC automatically.
 1207: 
 1208:             A timestamp column can also contain ``None`` values. The server will
 1209:             assign the current timestamp to those rows.
 1210: 
 1211:             **Note**: All timestamps are always converted to nanoseconds and in
 1212:             the UTC timezone. Timezone information is dropped before sending and
 1213:             QuestDB will not store any timezone information.
 1214:         :type at: TimestampNanos, datetime.datetime, int or str or None
 1215: 
 1216:         **Note**: It is an error to specify both ``table_name`` and
 1217:         ``table_name_col``.
 1218: 
 1219:         **Note**: The "index" column of the DataFrame is never serialized,
 1220:         even if it is named.
 1221: 
 1222:         Example:
 1223: 
 1224:         .. code-block:: python
 1225: 
 1226:             import pandas as pd
 1227:             import questdb.ingress as qi
 1228: 
 1229:             buf = qi.Buffer()
 1230:             # ...
 1231: 
 1232:             df = pd.DataFrame({
 1233:                 'location': ['London', 'Managua', 'London'],
 1234:                 'temperature': [24.5, 35.0, 25.5],
 1235:                 'humidity': [0.5, 0.6, 0.45],
 1236:                 'ts': pd.date_range('2021-07-01', periods=3)})
 1237:             buf.dataframe(
 1238:                 df, table_name='weather', at='ts', symbols=['location'])
 1239: 
 1240:             # ...
 1241:             sender.flush(buf)
 1242: 
 1243:         **Pandas to ILP datatype mappings**
 1244: 
 1245:         .. seealso:: https://questdb.io/docs/reference/api/ilp/columnset-types/
 1246: 
 1247:         .. list-table:: Pandas Mappings
 1248:             :header-rows: 1
 1249: 
 1250:             * - Pandas ``dtype``
 1251:               - Nulls
 1252:               - ILP Datatype
 1253:             * - ``'bool'``
 1254:               - N
 1255:               - ``BOOLEAN``
 1256:             * - ``'boolean'``
 1257:               - N **α**
 1258:               - ``BOOLEAN``
 1259:             * - ``'object'`` (``bool`` objects)
 1260:               - N **α**
 1261:               - ``BOOLEAN``
 1262:             * - ``'uint8'``
 1263:               - N
 1264:               - ``INTEGER``
 1265:             * - ``'int8'``
 1266:               - N
 1267:               - ``INTEGER``
 1268:             * - ``'uint16'``
 1269:               - N
 1270:               - ``INTEGER``
 1271:             * - ``'int16'``
 1272:               - N
 1273:               - ``INTEGER``
 1274:             * - ``'uint32'``
 1275:               - N
 1276:               - ``INTEGER``
 1277:             * - ``'int32'``
 1278:               - N
 1279:               - ``INTEGER``
 1280:             * - ``'uint64'``
 1281:               - N
 1282:               - ``INTEGER`` **β**
 1283:             * - ``'int64'``
 1284:               - N
 1285:               - ``INTEGER``
 1286:             * - ``'UInt8'``
 1287:               - Y
 1288:               - ``INTEGER``
 1289:             * - ``'Int8'``
 1290:               - Y
 1291:               - ``INTEGER``
 1292:             * - ``'UInt16'``
 1293:               - Y
 1294:               - ``INTEGER``
 1295:             * - ``'Int16'``
 1296:               - Y
 1297:               - ``INTEGER``
 1298:             * - ``'UInt32'``
 1299:               - Y
 1300:               - ``INTEGER``
 1301:             * - ``'Int32'``
 1302:               - Y
 1303:               - ``INTEGER``
 1304:             * - ``'UInt64'``
 1305:               - Y
 1306:               - ``INTEGER`` **β**
 1307:             * - ``'Int64'``
 1308:               - Y
 1309:               - ``INTEGER``
 1310:             * - ``'object'`` (``int`` objects)
 1311:               - Y
 1312:               - ``INTEGER`` **β**
 1313:             * - ``'float32'`` **γ**
 1314:               - Y (``NaN``)
 1315:               - ``FLOAT``
 1316:             * - ``'float64'``
 1317:               - Y (``NaN``)
 1318:               - ``FLOAT``
 1319:             * - ``'object'`` (``float`` objects)
 1320:               - Y (``NaN``)
 1321:               - ``FLOAT``
 1322:             * - ``'string'`` (``str`` objects)
 1323:               - Y
 1324:               - ``STRING`` (default), ``SYMBOL`` via ``symbols`` arg. **δ**
 1325:             * - ``'string[pyarrow]'``
 1326:               - Y
 1327:               - ``STRING`` (default), ``SYMBOL`` via ``symbols`` arg. **δ**
 1328:             * - ``'category'`` (``str`` objects) **ε**
 1329:               - Y
 1330:               - ``SYMBOL`` (default), ``STRING`` via ``symbols`` arg. **δ**
 1331:             * - ``'object'`` (``str`` objects)
 1332:               - Y
 1333:               - ``STRING`` (default), ``SYMBOL`` via ``symbols`` arg. **δ**
 1334:             * - ``'datetime64[ns]'``
 1335:               - Y
 1336:               - ``TIMESTAMP`` **ζ**
 1337:             * - ``'datetime64[ns, tz]'``
 1338:               - Y
 1339:               - ``TIMESTAMP`` **ζ**
 1340: 
 1341:         .. note::
 1342: 
 1343:             * **α**: Note some pandas dtypes allow nulls (e.g. ``'boolean'``),
 1344:               where the QuestDB database does not.
 1345: 
 1346:             * **β**: The valid range for integer values is -2^63 to 2^63-1.
 1347:               Any ``'uint64'``, ``'UInt64'`` or python ``int`` object values
 1348:               outside this range will raise an error during serialization.
 1349: 
 1350:             * **γ**: Upcast to 64-bit float during serialization.
 1351: 
 1352:             * **δ**: Columns containing strings can also be used to specify the
 1353:               table name. See ``table_name_col``.
 1354: 
 1355:             * **ε**: We only support categories containing strings. If the
 1356:               category contains non-string values, an error will be raised.
 1357: 
 1358:             * **ζ**: The '.dataframe()' method only supports datetimes with
 1359:               nanosecond precision. The designated timestamp column (see ``at``
 1360:               parameter) maintains the nanosecond precision, whilst values
 1361:               stored as columns have their precision truncated to microseconds.
 1362:               All dates are sent as UTC and any additional timezone information
 1363:               is dropped. If no timezone is specified, we follow
 1364:               the pandas convention of assuming the timezone is UTC.
 1365:               Datetimes before 1970-01-01 00:00:00 UTC are not supported.
 1366:               If a datetime value is specified as ``None`` (``NaT``), it is
 1367:               interpreted as the current QuestDB server time set on receipt of
 1368:               message.
 1369: 
 1370:         **Error Handling and Recovery**
 1371: 
 1372:         In case an exception is raised during dataframe serialization, the
 1373:         buffer is left in its previous state.
 1374:         The buffer remains in a valid state and can be used for further calls
 1375:         even after an error.
 1376: 
 1377:         For clarification, as an example, if an invalid ``None``
 1378:         value appears at the 3rd row for a ``bool`` column, neither the 3rd nor
 1379:         the preceding rows are added to the buffer.
 1380: 
 1381:         **Note**: This differs from the :func:`Sender.dataframe` method, which
 1382:         modifies this guarantee due to its ``auto_flush`` logic.
 1383: 
 1384:         **Performance Considerations**
 1385: 
 1386:         The Python GIL is released during serialization if it is not needed.
 1387:         If any column requires the GIL, the entire serialization is done whilst
 1388:         holding the GIL.
 1389: 
 1390:         Column types that require the GIL are:
 1391: 
 1392:         * Columns of ``str``, ``float`` or ``int`` or ``float`` Python objects.
 1393:         * The ``'string[python]'`` dtype.
 1394:         """
+1395:         if at is None:
  __pyx_t_1 = (__pyx_v_at == Py_None);
  if (unlikely(__pyx_t_1)) {
/* … */
  }
+1396:             raise IngressError(
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_IngressError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1396, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
+1397:                 IngressErrorCode.InvalidTimestamp,
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_IngressErrorCode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1397, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_InvalidTimestamp); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1397, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = NULL;
    __pyx_t_6 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
        __pyx_t_6 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[3] = {__pyx_t_4, __pyx_t_5, __pyx_kp_u_at_must_be_of_type_TimestampNan};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_6, 2+__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1396, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(0, 1396, __pyx_L1_error)
 1398:                 "`at` must be of type TimestampNanos, datetime, or ServerTimestamp"
 1399:             )
+1400:         _dataframe(
  __pyx_t_7 = __pyx_f_7questdb_7ingress__dataframe(__pyx_f_7questdb_7ingress_auto_flush_blank(), __pyx_v_self->_impl, __pyx_v_self->_b, __pyx_v_df, __pyx_v_table_name, __pyx_v_table_name_col, __pyx_v_symbols, __pyx_v_at); if (unlikely(__pyx_t_7 == ((__pyx_t_7questdb_7ingress_void_int)-1))) __PYX_ERR(0, 1400, __pyx_L1_error)
 1401:             auto_flush_blank(),
 1402:             self._impl,
 1403:             self._b,
 1404:             df,
 1405:             table_name,
 1406:             table_name_col,
 1407:             symbols,
 1408:             at)
+1409:         return self
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_self);
  __pyx_r = ((PyObject *)__pyx_v_self);
  goto __pyx_L0;
 1410: 
 1411: 
 1412: _FLUSH_FMT = ('{} - See https://py-questdb-client.readthedocs.io/en/'
+1413:     'v' + VERSION +
  __Pyx_GetModuleGlobalName(__pyx_t_19, __pyx_n_s_VERSION); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 1413, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_19);
  __pyx_t_18 = PyNumber_Add(__pyx_kp_u_See_https_py_questdb_client_rea, __pyx_t_19); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 1413, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_18);
  __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
  __pyx_t_19 = PyNumber_Add(__pyx_t_18, __pyx_kp_u_troubleshooting_html_inspecting); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 1413, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_19);
  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_FLUSH_FMT, __pyx_t_19) < 0) __PYX_ERR(0, 1412, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
 1414:     '/troubleshooting.html#inspecting-and-debugging-errors#flush-failed')
 1415: 
 1416: 
+1417: cdef uint64_t _timedelta_to_millis(object timedelta):
static uint64_t __pyx_f_7questdb_7ingress__timedelta_to_millis(PyObject *__pyx_v_timedelta) {
  int64_t __pyx_v_millis;
  uint64_t __pyx_r;
/* … */
  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("questdb.ingress._timedelta_to_millis", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
 1418:     """
 1419:     Convert a timedelta to milliseconds.
 1420:     """
 1421:     cdef int64_t millis = (
+1422:         (timedelta.microseconds // 1000) +
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_timedelta, __pyx_n_s_microseconds); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1422, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_FloorDivideObjC(__pyx_t_1, __pyx_int_1000, 0x3E8, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1422, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
/* … */
  __pyx_t_3 = PyNumber_Add(__pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1422, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_6 = __Pyx_PyInt_As_int64_t(__pyx_t_3); if (unlikely((__pyx_t_6 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1422, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_millis = __pyx_t_6;
+1423:         (int(timedelta.total_seconds()) * 1000))
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_timedelta, __pyx_n_s_total_seconds); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1423, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1423, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1423, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyInt_MultiplyObjC(__pyx_t_3, __pyx_int_1000, 0x3E8, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1423, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+1424:     if millis < 0:
  __pyx_t_7 = (__pyx_v_millis < 0);
  if (unlikely(__pyx_t_7)) {
/* … */
  }
+1425:         raise ValueError(
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1425, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(0, 1425, __pyx_L1_error)
+1426:             f'Negative timedelta not allowed: {timedelta!r}.')
    __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1426, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_8 = 0;
    __pyx_t_9 = 127;
    __Pyx_INCREF(__pyx_kp_u_Negative_timedelta_not_allowed);
    __pyx_t_8 += 32;
    __Pyx_GIVEREF(__pyx_kp_u_Negative_timedelta_not_allowed);
    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_kp_u_Negative_timedelta_not_allowed);
    __pyx_t_1 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_v_timedelta), __pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1426, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_9 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) > __pyx_t_9) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) : __pyx_t_9;
    __pyx_t_8 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1);
    __pyx_t_1 = 0;
    __Pyx_INCREF(__pyx_kp_u__5);
    __pyx_t_8 += 1;
    __Pyx_GIVEREF(__pyx_kp_u__5);
    PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_kp_u__5);
    __pyx_t_1 = __Pyx_PyUnicode_Join(__pyx_t_3, 3, __pyx_t_8, __pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1426, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+1427:     return millis
  __pyx_r = __pyx_v_millis;
  goto __pyx_L0;
 1428: 
 1429: 
+1430: cdef int64_t auto_flush_rows_default(line_sender_protocol protocol):
static int64_t __pyx_f_7questdb_7ingress_auto_flush_rows_default(enum line_sender_protocol __pyx_v_protocol) {
  int64_t __pyx_r;
/* … */
  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}
+1431:     if protocol == line_sender_protocol_http:
  __pyx_t_1 = (__pyx_v_protocol == line_sender_protocol_http);
  if (__pyx_t_1) {
/* … */
  }
+1432:         return 75000
    __pyx_r = 0x124F8;
    goto __pyx_L0;
 1433:     else:
+1434:         return 600
  /*else*/ {
    __pyx_r = 0x258;
    goto __pyx_L0;
  }
 1435: 
 1436: 
+1437: cdef void_int _parse_auto_flush(
static __pyx_t_7questdb_7ingress_void_int __pyx_f_7questdb_7ingress__parse_auto_flush(enum line_sender_protocol __pyx_v_protocol, PyObject *__pyx_v_auto_flush, PyObject *__pyx_v_auto_flush_rows, PyObject *__pyx_v_auto_flush_bytes, PyObject *__pyx_v_auto_flush_interval, struct __pyx_t_7questdb_7ingress_auto_flush_mode_t *__pyx_v_c_auto_flush) {
  __pyx_t_7questdb_7ingress_void_int __pyx_r;
  __Pyx_INCREF(__pyx_v_auto_flush);
  __Pyx_INCREF(__pyx_v_auto_flush_rows);
  __Pyx_INCREF(__pyx_v_auto_flush_bytes);
  __Pyx_INCREF(__pyx_v_auto_flush_interval);
/* … */
  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("questdb.ingress._parse_auto_flush", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_auto_flush);
  __Pyx_XDECREF(__pyx_v_auto_flush_rows);
  __Pyx_XDECREF(__pyx_v_auto_flush_bytes);
  __Pyx_XDECREF(__pyx_v_auto_flush_interval);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
 1438:     line_sender_protocol protocol,
 1439:     object auto_flush,
 1440:     object auto_flush_rows,
 1441:     object auto_flush_bytes,
 1442:     object auto_flush_interval,
 1443:     auto_flush_mode_t* c_auto_flush
 1444: ) except -1:
 1445:     # Set defaults.
+1446:     if auto_flush_rows is None:
  __pyx_t_1 = (__pyx_v_auto_flush_rows == Py_None);
  if (__pyx_t_1) {
/* … */
  }
+1447:         auto_flush_rows = auto_flush_rows_default(protocol)
    __pyx_t_2 = __pyx_f_7questdb_7ingress_auto_flush_rows_default(__pyx_v_protocol); if (unlikely(__pyx_t_2 == ((int64_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 1447, __pyx_L1_error)
    __pyx_t_3 = __Pyx_PyInt_From_int64_t(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1447, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF_SET(__pyx_v_auto_flush_rows, __pyx_t_3);
    __pyx_t_3 = 0;
 1448: 
+1449:     if auto_flush_bytes is None:
  __pyx_t_1 = (__pyx_v_auto_flush_bytes == Py_None);
  if (__pyx_t_1) {
/* … */
  }
+1450:         auto_flush_bytes = False
    __Pyx_INCREF(Py_False);
    __Pyx_DECREF_SET(__pyx_v_auto_flush_bytes, Py_False);
 1451: 
+1452:     if auto_flush_interval is None:
  __pyx_t_1 = (__pyx_v_auto_flush_interval == Py_None);
  if (__pyx_t_1) {
/* … */
  }
+1453:         auto_flush_interval = 1000
    __Pyx_INCREF(__pyx_int_1000);
    __Pyx_DECREF_SET(__pyx_v_auto_flush_interval, __pyx_int_1000);
 1454: 
+1455:     if isinstance(auto_flush, str):
  __pyx_t_1 = PyUnicode_Check(__pyx_v_auto_flush); 
  if (__pyx_t_1) {
/* … */
  }
+1456:         if auto_flush == 'off':
    __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_auto_flush, __pyx_n_u_off, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 1456, __pyx_L1_error)
    if (__pyx_t_1) {
/* … */
      goto __pyx_L7;
    }
+1457:             auto_flush = False
      __Pyx_INCREF(Py_False);
      __Pyx_DECREF_SET(__pyx_v_auto_flush, Py_False);
+1458:         elif auto_flush == 'on':
    __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_auto_flush, __pyx_n_u_on, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 1458, __pyx_L1_error)
    if (likely(__pyx_t_1)) {
/* … */
      goto __pyx_L7;
    }
+1459:             auto_flush = True
      __Pyx_INCREF(Py_True);
      __Pyx_DECREF_SET(__pyx_v_auto_flush, Py_True);
 1460:         else:
+1461:             raise IngressError(
    /*else*/ {
      __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_IngressError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1461, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
+1462:                 IngressErrorCode.ConfigError,
      __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_IngressErrorCode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1462, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_ConfigError); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1462, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+1463:                 '"auto_flush" must be None, bool, "on" or "off", ' +
      __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_kp_u_auto_flush_must_be_None_bool_on, __pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1463, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_7 = NULL;
      __pyx_t_8 = 0;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_4))) {
        __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_4);
        if (likely(__pyx_t_7)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_7);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_4, function);
          __pyx_t_8 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[3] = {__pyx_t_7, __pyx_t_6, __pyx_t_5};
        __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_8, 2+__pyx_t_8);
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1461, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      }
      __Pyx_Raise(__pyx_t_3, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __PYX_ERR(0, 1461, __pyx_L1_error)
    }
    __pyx_L7:;
+1464:                 f'not {auto_flush!r}')
      __pyx_t_5 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_v_auto_flush), __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1464, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_7 = __Pyx_PyUnicode_Concat(__pyx_kp_u_not, __pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1464, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
 1465: 
 1466:     # Normalise auto_flush parameters to ints or False.
+1467:     if isinstance(auto_flush_rows, str):
  __pyx_t_1 = PyUnicode_Check(__pyx_v_auto_flush_rows); 
  if (__pyx_t_1) {
/* … */
    goto __pyx_L8;
  }
+1468:         if auto_flush_rows == 'on':
    __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_auto_flush_rows, __pyx_n_u_on, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 1468, __pyx_L1_error)
    if (unlikely(__pyx_t_1)) {
/* … */
    }
+1469:             raise IngressError(
      __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_IngressError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1469, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
+1470:                 IngressErrorCode.ConfigError,
      __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_IngressErrorCode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1470, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_ConfigError); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1470, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_5 = NULL;
      __pyx_t_8 = 0;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_4))) {
        __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
        if (likely(__pyx_t_5)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_5);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_4, function);
          __pyx_t_8 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[3] = {__pyx_t_5, __pyx_t_6, __pyx_kp_u_auto_flush_rows_cannot_be_on};
        __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_8, 2+__pyx_t_8);
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1469, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      }
      __Pyx_Raise(__pyx_t_3, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __PYX_ERR(0, 1469, __pyx_L1_error)
 1471:                 '"auto_flush_rows" cannot be "on"')
+1472:         elif auto_flush_rows == 'off':
    __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_auto_flush_rows, __pyx_n_u_off, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 1472, __pyx_L1_error)
    if (__pyx_t_1) {
/* … */
      goto __pyx_L9;
    }
+1473:             auto_flush_rows = False
      __Pyx_INCREF(Py_False);
      __Pyx_DECREF_SET(__pyx_v_auto_flush_rows, Py_False);
 1474:         else:
+1475:             auto_flush_rows = int(auto_flush_rows)
    /*else*/ {
      __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_auto_flush_rows); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1475, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF_SET(__pyx_v_auto_flush_rows, __pyx_t_3);
      __pyx_t_3 = 0;
    }
    __pyx_L9:;
+1476:     elif auto_flush_rows is False or isinstance(auto_flush_rows, int):
  __pyx_t_9 = (__pyx_v_auto_flush_rows == Py_False);
  if (!__pyx_t_9) {
  } else {
    __pyx_t_1 = __pyx_t_9;
    goto __pyx_L10_bool_binop_done;
  }
  __pyx_t_9 = PyInt_Check(__pyx_v_auto_flush_rows); 
  __pyx_t_1 = __pyx_t_9;
  __pyx_L10_bool_binop_done:;
  if (likely(__pyx_t_1)) {
    goto __pyx_L8;
  }
 1477:         pass
 1478:     else:
+1479:         raise TypeError(
  /*else*/ {
/* … */
    __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1479, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_Raise(__pyx_t_4, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __PYX_ERR(0, 1479, __pyx_L1_error)
  }
  __pyx_L8:;
+1480:             '"auto_flush_rows" must be an int, False or "off", ' +
    __pyx_t_3 = __Pyx_PyUnicode_Concat(__pyx_kp_u_auto_flush_rows_must_be_an_int, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1480, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+1481:             f'not {auto_flush_rows!r}')
    __pyx_t_3 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_v_auto_flush_rows), __pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1481, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyUnicode_Concat(__pyx_kp_u_not, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1481, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 1482: 
+1483:     if isinstance(auto_flush_bytes, str):
  __pyx_t_1 = PyUnicode_Check(__pyx_v_auto_flush_bytes); 
  if (__pyx_t_1) {
/* … */
    goto __pyx_L12;
  }
+1484:         if auto_flush_bytes == 'on':
    __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_auto_flush_bytes, __pyx_n_u_on, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 1484, __pyx_L1_error)
    if (unlikely(__pyx_t_1)) {
/* … */
    }
+1485:             raise IngressError(
      __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_IngressError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1485, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
+1486:                 IngressErrorCode.ConfigError,
      __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_IngressErrorCode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1486, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_ConfigError); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1486, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_6 = NULL;
      __pyx_t_8 = 0;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_6)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_6);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
          __pyx_t_8 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[3] = {__pyx_t_6, __pyx_t_5, __pyx_kp_u_auto_flush_bytes_cannot_be_on};
        __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_8, 2+__pyx_t_8);
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1485, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      }
      __Pyx_Raise(__pyx_t_4, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __PYX_ERR(0, 1485, __pyx_L1_error)
 1487:                 '"auto_flush_bytes" cannot be "on"')
+1488:         elif auto_flush_bytes == 'off':
    __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_auto_flush_bytes, __pyx_n_u_off, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 1488, __pyx_L1_error)
    if (__pyx_t_1) {
/* … */
      goto __pyx_L13;
    }
+1489:             auto_flush_bytes = False
      __Pyx_INCREF(Py_False);
      __Pyx_DECREF_SET(__pyx_v_auto_flush_bytes, Py_False);
 1490:         else:
+1491:             auto_flush_bytes = int(auto_flush_bytes)
    /*else*/ {
      __pyx_t_4 = __Pyx_PyNumber_Int(__pyx_v_auto_flush_bytes); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1491, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF_SET(__pyx_v_auto_flush_bytes, __pyx_t_4);
      __pyx_t_4 = 0;
    }
    __pyx_L13:;
+1492:     elif auto_flush_bytes is False or isinstance(auto_flush_bytes, int):
  __pyx_t_9 = (__pyx_v_auto_flush_bytes == Py_False);
  if (!__pyx_t_9) {
  } else {
    __pyx_t_1 = __pyx_t_9;
    goto __pyx_L14_bool_binop_done;
  }
  __pyx_t_9 = PyInt_Check(__pyx_v_auto_flush_bytes); 
  __pyx_t_1 = __pyx_t_9;
  __pyx_L14_bool_binop_done:;
  if (likely(__pyx_t_1)) {
    goto __pyx_L12;
  }
 1493:         pass
 1494:     else:
+1495:         raise TypeError(
  /*else*/ {
/* … */
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1495, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(0, 1495, __pyx_L1_error)
  }
  __pyx_L12:;
+1496:             '"auto_flush_bytes" must be an int, False or "off", ' +
    __pyx_t_4 = __Pyx_PyUnicode_Concat(__pyx_kp_u_auto_flush_bytes_must_be_an_int, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1496, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+1497:             f'not {auto_flush_bytes!r}')
    __pyx_t_4 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_v_auto_flush_bytes), __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1497, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_3 = __Pyx_PyUnicode_Concat(__pyx_kp_u_not, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1497, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
 1498: 
+1499:     if isinstance(auto_flush_interval, str):
  __pyx_t_1 = PyUnicode_Check(__pyx_v_auto_flush_interval); 
  if (__pyx_t_1) {
/* … */
    goto __pyx_L16;
  }
+1500:         if auto_flush_interval == 'on':
    __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_auto_flush_interval, __pyx_n_u_on, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 1500, __pyx_L1_error)
    if (unlikely(__pyx_t_1)) {
/* … */
    }
+1501:             raise IngressError(
      __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_IngressError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1501, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
+1502:                 IngressErrorCode.ConfigError,
      __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_IngressErrorCode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1502, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_ConfigError); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1502, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_5 = NULL;
      __pyx_t_8 = 0;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_4))) {
        __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
        if (likely(__pyx_t_5)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_5);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_4, function);
          __pyx_t_8 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[3] = {__pyx_t_5, __pyx_t_6, __pyx_kp_u_auto_flush_interval_cannot_be_o};
        __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_8, 2+__pyx_t_8);
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1501, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      }
      __Pyx_Raise(__pyx_t_3, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __PYX_ERR(0, 1501, __pyx_L1_error)
 1503:                 '"auto_flush_interval" cannot be "on"')
+1504:         elif auto_flush_interval == 'off':
    __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_auto_flush_interval, __pyx_n_u_off, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 1504, __pyx_L1_error)
    if (__pyx_t_1) {
/* … */
      goto __pyx_L17;
    }
+1505:             auto_flush_interval = False
      __Pyx_INCREF(Py_False);
      __Pyx_DECREF_SET(__pyx_v_auto_flush_interval, Py_False);
 1506:         else:
+1507:             auto_flush_interval = int(auto_flush_interval)
    /*else*/ {
      __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_auto_flush_interval); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1507, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF_SET(__pyx_v_auto_flush_interval, __pyx_t_3);
      __pyx_t_3 = 0;
    }
    __pyx_L17:;
+1508:     elif auto_flush_interval is False or isinstance(auto_flush_interval, int):
  __pyx_t_9 = (__pyx_v_auto_flush_interval == Py_False);
  if (!__pyx_t_9) {
  } else {
    __pyx_t_1 = __pyx_t_9;
    goto __pyx_L18_bool_binop_done;
  }
  __pyx_t_9 = PyInt_Check(__pyx_v_auto_flush_interval); 
  __pyx_t_1 = __pyx_t_9;
  __pyx_L18_bool_binop_done:;
  if (__pyx_t_1) {
    goto __pyx_L16;
  }
 1509:         pass
+1510:     elif isinstance(auto_flush_interval, timedelta):
  __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_auto_flush_interval, __pyx_ptype_7cpython_8datetime_timedelta); 
  if (likely(__pyx_t_1)) {
/* … */
    goto __pyx_L16;
  }
+1511:         auto_flush_interval = _timedelta_to_millis(auto_flush_interval)
    __pyx_t_10 = __pyx_f_7questdb_7ingress__timedelta_to_millis(__pyx_v_auto_flush_interval); if (unlikely(__pyx_t_10 == ((uint64_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 1511, __pyx_L1_error)
    __pyx_t_3 = __Pyx_PyInt_From_uint64_t(__pyx_t_10); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1511, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF_SET(__pyx_v_auto_flush_interval, __pyx_t_3);
    __pyx_t_3 = 0;
 1512:     else:
+1513:         raise TypeError(
  /*else*/ {
/* … */
    __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1513, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_Raise(__pyx_t_4, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __PYX_ERR(0, 1513, __pyx_L1_error)
  }
  __pyx_L16:;
+1514:             '"auto_flush_interval" must be an int, timedelta, False or "off", ' +
    __pyx_t_3 = __Pyx_PyUnicode_Concat(__pyx_kp_u_auto_flush_interval_must_be_an, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1514, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+1515:             f'not {auto_flush_interval!r}')
    __pyx_t_3 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_v_auto_flush_interval), __pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1515, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyUnicode_Concat(__pyx_kp_u_not, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1515, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 1516: 
 1517:     # Coerce auto_flush to bool if None.
+1518:     if auto_flush is None:
  __pyx_t_1 = (__pyx_v_auto_flush == Py_None);
  if (__pyx_t_1) {
/* … */
    goto __pyx_L20;
  }
 1519:         auto_flush = (
+1520:             (auto_flush_rows is not False) or
    __pyx_t_1 = (__pyx_v_auto_flush_rows != Py_False);
    if (!__pyx_t_1) {
    } else {
      __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1520, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = __pyx_t_3;
      __pyx_t_3 = 0;
      goto __pyx_L21_bool_binop_done;
    }
+1521:             (auto_flush_bytes is not False) or
    __pyx_t_1 = (__pyx_v_auto_flush_bytes != Py_False);
    if (!__pyx_t_1) {
    } else {
      __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1521, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = __pyx_t_3;
      __pyx_t_3 = 0;
      goto __pyx_L21_bool_binop_done;
    }
+1522:             (auto_flush_interval is not False))
    __pyx_t_1 = (__pyx_v_auto_flush_interval != Py_False);
    __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1522, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __pyx_t_3;
    __pyx_t_3 = 0;
    __pyx_L21_bool_binop_done:;
    __Pyx_DECREF_SET(__pyx_v_auto_flush, __pyx_t_4);
    __pyx_t_4 = 0;
+1523:     elif not isinstance(auto_flush, bool):
  __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_auto_flush, __pyx_ptype_7cpython_4bool_bool); 
  __pyx_t_9 = (!__pyx_t_1);
  if (unlikely(__pyx_t_9)) {
/* … */
  }
  __pyx_L20:;
+1524:         raise ValueError(
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1524, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(0, 1524, __pyx_L1_error)
+1525:             '"auto_flush" must be None, bool, "on" or "off", ' +
    __pyx_t_4 = __Pyx_PyUnicode_Concat(__pyx_kp_u_auto_flush_must_be_None_bool_on, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1525, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+1526:             f'not {auto_flush!r}')
    __pyx_t_4 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_v_auto_flush), __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1526, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_3 = __Pyx_PyUnicode_Concat(__pyx_kp_u_not, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1526, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
 1527: 
 1528:     # Validate auto_flush parameters.
+1529:     if auto_flush and \
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_auto_flush); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 1529, __pyx_L1_error)
  if (__pyx_t_1) {
  } else {
    __pyx_t_9 = __pyx_t_1;
    goto __pyx_L25_bool_binop_done;
  }
/* … */
  if (unlikely(__pyx_t_9)) {
/* … */
  }
+1530:             (auto_flush_rows is False) and \
  __pyx_t_1 = (__pyx_v_auto_flush_rows == Py_False);
  if (__pyx_t_1) {
  } else {
    __pyx_t_9 = __pyx_t_1;
    goto __pyx_L25_bool_binop_done;
  }
+1531:             (auto_flush_bytes is False) and \
  __pyx_t_1 = (__pyx_v_auto_flush_bytes == Py_False);
  if (__pyx_t_1) {
  } else {
    __pyx_t_9 = __pyx_t_1;
    goto __pyx_L25_bool_binop_done;
  }
+1532:             (auto_flush_interval is False):
  __pyx_t_1 = (__pyx_v_auto_flush_interval == Py_False);
  __pyx_t_9 = __pyx_t_1;
  __pyx_L25_bool_binop_done:;
+1533:         raise ValueError(
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__36, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1533, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(0, 1533, __pyx_L1_error)
/* … */
  __pyx_tuple__36 = PyTuple_Pack(1, __pyx_kp_u_auto_flush_is_enabled_but_no_ot); if (unlikely(!__pyx_tuple__36)) __PYX_ERR(0, 1533, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__36);
  __Pyx_GIVEREF(__pyx_tuple__36);
 1534:             '"auto_flush" is enabled but no other auto-flush '
 1535:             'parameters are enabled. Please set at least one of '
 1536:             '"auto_flush_rows", "auto_flush_bytes" or '
 1537:             '"auto_flush_interval".')
 1538: 
+1539:     if auto_flush_rows is not False and auto_flush_rows < 1:
  __pyx_t_1 = (__pyx_v_auto_flush_rows != Py_False);
  if (__pyx_t_1) {
  } else {
    __pyx_t_9 = __pyx_t_1;
    goto __pyx_L30_bool_binop_done;
  }
  __pyx_t_3 = PyObject_RichCompare(__pyx_v_auto_flush_rows, __pyx_int_1, Py_LT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1539, __pyx_L1_error)
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 1539, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_9 = __pyx_t_1;
  __pyx_L30_bool_binop_done:;
  if (unlikely(__pyx_t_9)) {
/* … */
  }
+1540:         raise ValueError(
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1540, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(0, 1540, __pyx_L1_error)
+1541:             '"auto_flush_rows" must be >= 1, '
    __pyx_t_4 = __Pyx_PyUnicode_Concat(__pyx_kp_u_auto_flush_rows_must_be_1_not, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1541, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+1542:             f'not {auto_flush_rows}')
    __pyx_t_3 = __Pyx_PyObject_FormatSimple(__pyx_v_auto_flush_rows, __pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1542, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
 1543: 
+1544:     if auto_flush_bytes is not False and auto_flush_bytes < 1:
  __pyx_t_1 = (__pyx_v_auto_flush_bytes != Py_False);
  if (__pyx_t_1) {
  } else {
    __pyx_t_9 = __pyx_t_1;
    goto __pyx_L33_bool_binop_done;
  }
  __pyx_t_3 = PyObject_RichCompare(__pyx_v_auto_flush_bytes, __pyx_int_1, Py_LT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1544, __pyx_L1_error)
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 1544, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_9 = __pyx_t_1;
  __pyx_L33_bool_binop_done:;
  if (unlikely(__pyx_t_9)) {
/* … */
  }
+1545:         raise ValueError(
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1545, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(0, 1545, __pyx_L1_error)
+1546:             '"auto_flush_bytes" must be >= 1, '
    __pyx_t_4 = __Pyx_PyUnicode_Concat(__pyx_kp_u_auto_flush_bytes_must_be_1_not, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1546, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+1547:             f'not {auto_flush_bytes}')
    __pyx_t_3 = __Pyx_PyObject_FormatSimple(__pyx_v_auto_flush_bytes, __pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1547, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
 1548: 
+1549:     if auto_flush_interval is not False and auto_flush_interval < 1:
  __pyx_t_1 = (__pyx_v_auto_flush_interval != Py_False);
  if (__pyx_t_1) {
  } else {
    __pyx_t_9 = __pyx_t_1;
    goto __pyx_L36_bool_binop_done;
  }
  __pyx_t_3 = PyObject_RichCompare(__pyx_v_auto_flush_interval, __pyx_int_1, Py_LT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1549, __pyx_L1_error)
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 1549, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_9 = __pyx_t_1;
  __pyx_L36_bool_binop_done:;
  if (unlikely(__pyx_t_9)) {
/* … */
  }
+1550:         raise ValueError(
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1550, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(0, 1550, __pyx_L1_error)
+1551:             '"auto_flush_interval" must be >= 1, '
    __pyx_t_4 = __Pyx_PyUnicode_Concat(__pyx_kp_u_auto_flush_interval_must_be_1_n, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1551, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+1552:             f'not {auto_flush_interval}')
    __pyx_t_3 = __Pyx_PyObject_FormatSimple(__pyx_v_auto_flush_interval, __pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1552, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
 1553: 
 1554:     # Parse individual auto_flush parameters to C struct.
+1555:     c_auto_flush.enabled = auto_flush
  __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_auto_flush); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1555, __pyx_L1_error)
  __pyx_v_c_auto_flush->enabled = __pyx_t_9;
 1556: 
+1557:     if auto_flush_rows is False:
  __pyx_t_9 = (__pyx_v_auto_flush_rows == Py_False);
  if (__pyx_t_9) {
/* … */
    goto __pyx_L38;
  }
+1558:         c_auto_flush.row_count = -1
    __pyx_v_c_auto_flush->row_count = -1L;
 1559:     else:
+1560:         c_auto_flush.row_count = auto_flush_rows
  /*else*/ {
    __pyx_t_2 = __Pyx_PyInt_As_int64_t(__pyx_v_auto_flush_rows); if (unlikely((__pyx_t_2 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1560, __pyx_L1_error)
    __pyx_v_c_auto_flush->row_count = __pyx_t_2;
  }
  __pyx_L38:;
 1561: 
+1562:     if auto_flush_bytes is False:
  __pyx_t_9 = (__pyx_v_auto_flush_bytes == Py_False);
  if (__pyx_t_9) {
/* … */
    goto __pyx_L39;
  }
+1563:         c_auto_flush.byte_count = -1
    __pyx_v_c_auto_flush->byte_count = -1L;
 1564:     else:
+1565:         c_auto_flush.byte_count = auto_flush_bytes
  /*else*/ {
    __pyx_t_2 = __Pyx_PyInt_As_int64_t(__pyx_v_auto_flush_bytes); if (unlikely((__pyx_t_2 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1565, __pyx_L1_error)
    __pyx_v_c_auto_flush->byte_count = __pyx_t_2;
  }
  __pyx_L39:;
 1566: 
+1567:     if auto_flush_interval is False:
  __pyx_t_9 = (__pyx_v_auto_flush_interval == Py_False);
  if (__pyx_t_9) {
/* … */
    goto __pyx_L40;
  }
+1568:         c_auto_flush.interval = -1
    __pyx_v_c_auto_flush->interval = -1L;
 1569:     else:
+1570:         c_auto_flush.interval = auto_flush_interval
  /*else*/ {
    __pyx_t_2 = __Pyx_PyInt_As_int64_t(__pyx_v_auto_flush_interval); if (unlikely((__pyx_t_2 == ((int64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1570, __pyx_L1_error)
    __pyx_v_c_auto_flush->interval = __pyx_t_2;
  }
  __pyx_L40:;
 1571: 
 1572: 
+1573: class TaggedEnum(Enum):
  __Pyx_GetModuleGlobalName(__pyx_t_19, __pyx_n_s_Enum); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 1573, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_19);
  __pyx_t_18 = PyTuple_New(1); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 1573, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_18);
  __Pyx_GIVEREF(__pyx_t_19);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_18, 0, __pyx_t_19)) __PYX_ERR(0, 1573, __pyx_L1_error);
  __pyx_t_19 = 0;
  __pyx_t_19 = __Pyx_PEP560_update_bases(__pyx_t_18); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 1573, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_19);
  __pyx_t_20 = __Pyx_CalculateMetaclass(NULL, __pyx_t_19); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 1573, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_20);
  __pyx_t_15 = __Pyx_Py3MetaclassPrepare(__pyx_t_20, __pyx_t_19, __pyx_n_s_TaggedEnum, __pyx_n_s_TaggedEnum, (PyObject *) NULL, __pyx_n_s_questdb_ingress, __pyx_kp_s_Base_class_for_tagged_enums); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1573, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_15);
  if (__pyx_t_19 != __pyx_t_18) {
    if (unlikely((PyDict_SetItemString(__pyx_t_15, "__orig_bases__", __pyx_t_18) < 0))) __PYX_ERR(0, 1573, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
/* … */
  __pyx_t_3 = __Pyx_Py3ClassCreate(__pyx_t_20, __pyx_n_s_TaggedEnum, __pyx_t_19, __pyx_t_15, NULL, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1573, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_TaggedEnum, __pyx_t_3) < 0) __PYX_ERR(0, 1573, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
  __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
  __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
 1574:     """
 1575:     Base class for tagged enums.
 1576:     """
 1577: 
+1578:     @property
/* Python wrapper */
static PyObject *__pyx_pw_7questdb_7ingress_10TaggedEnum_1tag(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7questdb_7ingress_10TaggedEnum_tag, "\n        Short name.\n        ");
static PyMethodDef __pyx_mdef_7questdb_7ingress_10TaggedEnum_1tag = {"tag", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7questdb_7ingress_10TaggedEnum_1tag, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7questdb_7ingress_10TaggedEnum_tag};
static PyObject *__pyx_pw_7questdb_7ingress_10TaggedEnum_1tag(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("tag (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,0};
  PyObject* values[1] = {0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1578, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "tag") < 0)) __PYX_ERR(0, 1578, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("tag", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1578, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("questdb.ingress.TaggedEnum.tag", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7questdb_7ingress_10TaggedEnum_tag(__pyx_self, __pyx_v_self);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7questdb_7ingress_10TaggedEnum_tag(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
/* … */
  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("questdb.ingress.TaggedEnum.tag", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
/* … */
  __pyx_t_18 = __Pyx_CyFunction_New(&__pyx_mdef_7questdb_7ingress_10TaggedEnum_1tag, 0, __pyx_n_s_TaggedEnum_tag, NULL, __pyx_n_s_questdb_ingress, __pyx_d, ((PyObject *)__pyx_codeobj__86)); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 1578, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_18);
  __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_property, __pyx_t_18); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1578, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_15, __pyx_n_s_tag, __pyx_t_3) < 0) __PYX_ERR(0, 1578, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
/* … */
  __pyx_codeobj__86 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__48, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_questdb_ingress_pyx, __pyx_n_s_tag, 1578, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__86)) __PYX_ERR(0, 1578, __pyx_L1_error)
 1579:     def tag(self):
 1580:         """
 1581:         Short name.
 1582:         """
+1583:         return self.value[0]
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1583, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1583, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;
 1584: 
+1585:     @property
/* Python wrapper */
static PyObject *__pyx_pw_7questdb_7ingress_10TaggedEnum_3c_value(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_7questdb_7ingress_10TaggedEnum_3c_value = {"c_value", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7questdb_7ingress_10TaggedEnum_3c_value, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7questdb_7ingress_10TaggedEnum_3c_value(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("c_value (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,0};
  PyObject* values[1] = {0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1585, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "c_value") < 0)) __PYX_ERR(0, 1585, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("c_value", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1585, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("questdb.ingress.TaggedEnum.c_value", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7questdb_7ingress_10TaggedEnum_2c_value(__pyx_self, __pyx_v_self);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7questdb_7ingress_10TaggedEnum_2c_value(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
/* … */
  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("questdb.ingress.TaggedEnum.c_value", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
/* … */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_7questdb_7ingress_10TaggedEnum_3c_value, 0, __pyx_n_s_TaggedEnum_c_value, NULL, __pyx_n_s_questdb_ingress, __pyx_d, ((PyObject *)__pyx_codeobj__87)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1585, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_18 = __Pyx_PyObject_CallOneArg(__pyx_builtin_property, __pyx_t_3); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 1585, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_18);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_15, __pyx_n_s_c_value, __pyx_t_18) < 0) __PYX_ERR(0, 1585, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
/* … */
  __pyx_codeobj__87 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__48, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_questdb_ingress_pyx, __pyx_n_s_c_value, 1585, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__87)) __PYX_ERR(0, 1585, __pyx_L1_error)
 1586:     def c_value(self):
+1587:         return self.value[1]
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1587, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1587, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;
 1588: 
+1589:     @classmethod
/* Python wrapper */
static PyObject *__pyx_pw_7questdb_7ingress_10TaggedEnum_5parse(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7questdb_7ingress_10TaggedEnum_4parse, "\n        Parse from the tag name.\n        ");
static PyMethodDef __pyx_mdef_7questdb_7ingress_10TaggedEnum_5parse = {"parse", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7questdb_7ingress_10TaggedEnum_5parse, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7questdb_7ingress_10TaggedEnum_4parse};
static PyObject *__pyx_pw_7questdb_7ingress_10TaggedEnum_5parse(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_tag = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("parse (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cls,&__pyx_n_s_tag,0};
  PyObject* values[2] = {0,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_cls)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1589, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_tag)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1589, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("parse", 1, 2, 2, 1); __PYX_ERR(0, 1589, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "parse") < 0)) __PYX_ERR(0, 1589, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
    }
    __pyx_v_cls = values[0];
    __pyx_v_tag = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("parse", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 1589, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("questdb.ingress.TaggedEnum.parse", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7questdb_7ingress_10TaggedEnum_4parse(__pyx_self, __pyx_v_cls, __pyx_v_tag);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7questdb_7ingress_10TaggedEnum_4parse(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_tag) {
  PyObject *__pyx_v_entry = NULL;
  PyObject *__pyx_r = NULL;
/* … */
  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("questdb.ingress.TaggedEnum.parse", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_entry);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
/* … */
  __pyx_tuple__88 = PyTuple_Pack(3, __pyx_n_s_cls, __pyx_n_s_tag, __pyx_n_s_entry); if (unlikely(!__pyx_tuple__88)) __PYX_ERR(0, 1589, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__88);
  __Pyx_GIVEREF(__pyx_tuple__88);
/* … */
  __pyx_t_18 = __Pyx_CyFunction_New(&__pyx_mdef_7questdb_7ingress_10TaggedEnum_5parse, __Pyx_CYFUNCTION_CLASSMETHOD, __pyx_n_s_TaggedEnum_parse, NULL, __pyx_n_s_questdb_ingress, __pyx_d, ((PyObject *)__pyx_codeobj__89)); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 1589, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_18);
  __pyx_t_3 = __Pyx_Method_ClassMethod(__pyx_t_18); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1589, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_15, __pyx_n_s_parse, __pyx_t_3) < 0) __PYX_ERR(0, 1589, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_codeobj__89 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__88, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_questdb_ingress_pyx, __pyx_n_s_parse, 1589, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__89)) __PYX_ERR(0, 1589, __pyx_L1_error)
 1590:     def parse(cls, tag):
 1591:         """
 1592:         Parse from the tag name.
 1593:         """
+1594:         if tag is None:
  __pyx_t_1 = (__pyx_v_tag == Py_None);
  if (__pyx_t_1) {
/* … */
  }
+1595:             return None
    __Pyx_XDECREF(__pyx_r);
    __pyx_r = Py_None; __Pyx_INCREF(Py_None);
    goto __pyx_L0;
+1596:         elif isinstance(tag, str):
  __pyx_t_1 = PyUnicode_Check(__pyx_v_tag); 
  if (__pyx_t_1) {
/* … */
    goto __pyx_L3;
  }
+1597:             for entry in cls:
    if (likely(PyList_CheckExact(__pyx_v_cls)) || PyTuple_CheckExact(__pyx_v_cls)) {
      __pyx_t_2 = __pyx_v_cls; __Pyx_INCREF(__pyx_t_2);
      __pyx_t_3 = 0;
      __pyx_t_4 = NULL;
    } else {
      __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_cls); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1597, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_4 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1597, __pyx_L1_error)
    }
    for (;;) {
      if (likely(!__pyx_t_4)) {
        if (likely(PyList_CheckExact(__pyx_t_2))) {
          {
            Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_2);
            #if !CYTHON_ASSUME_SAFE_MACROS
            if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1597, __pyx_L1_error)
            #endif
            if (__pyx_t_3 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_5 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely((0 < 0))) __PYX_ERR(0, 1597, __pyx_L1_error)
          #else
          __pyx_t_5 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1597, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          #endif
        } else {
          {
            Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_2);
            #if !CYTHON_ASSUME_SAFE_MACROS
            if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1597, __pyx_L1_error)
            #endif
            if (__pyx_t_3 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely((0 < 0))) __PYX_ERR(0, 1597, __pyx_L1_error)
          #else
          __pyx_t_5 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1597, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          #endif
        }
      } else {
        __pyx_t_5 = __pyx_t_4(__pyx_t_2);
        if (unlikely(!__pyx_t_5)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 1597, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_5);
      }
      __Pyx_XDECREF_SET(__pyx_v_entry, __pyx_t_5);
      __pyx_t_5 = 0;
/* … */
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+1598:                 if entry.tag == tag:
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_entry, __pyx_n_s_tag); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1598, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_6 = PyObject_RichCompare(__pyx_t_5, __pyx_v_tag, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1598, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 1598, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (__pyx_t_1) {
/* … */
      }
+1599:                     return entry
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_v_entry);
        __pyx_r = __pyx_v_entry;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        goto __pyx_L0;
+1600:         elif isinstance(tag, cls):
  __pyx_t_1 = PyObject_IsInstance(__pyx_v_tag, __pyx_v_cls); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1600, __pyx_L1_error)
  if (likely(__pyx_t_1)) {
/* … */
  }
+1601:             return tag
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_tag);
    __pyx_r = __pyx_v_tag;
    goto __pyx_L0;
 1602:         else:
+1603:             raise ValueError(f'Invalid value for {cls.__name__}: {tag!r}')
  /*else*/ {
    __pyx_t_2 = PyTuple_New(4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1603, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = 0;
    __pyx_t_7 = 127;
    __Pyx_INCREF(__pyx_kp_u_Invalid_value_for);
    __pyx_t_3 += 18;
    __Pyx_GIVEREF(__pyx_kp_u_Invalid_value_for);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_u_Invalid_value_for);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_cls, __pyx_n_s_name_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1603, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_5 = __Pyx_PyObject_FormatSimple(__pyx_t_6, __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1603, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_7 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) > __pyx_t_7) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) : __pyx_t_7;
    __pyx_t_3 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_5);
    __pyx_t_5 = 0;
    __Pyx_INCREF(__pyx_kp_u__21);
    __pyx_t_3 += 2;
    __Pyx_GIVEREF(__pyx_kp_u__21);
    PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_kp_u__21);
    __pyx_t_5 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_v_tag), __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1603, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_7 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) > __pyx_t_7) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) : __pyx_t_7;
    __pyx_t_3 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_t_5);
    __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_2, 4, __pyx_t_3, __pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1603, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1603, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(0, 1603, __pyx_L1_error)
  }
  __pyx_L3:;
 1604: 
 1605: 
+1606: class Protocol(TaggedEnum):
  __Pyx_GetModuleGlobalName(__pyx_t_19, __pyx_n_s_TaggedEnum); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 1606, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_19);
  __pyx_t_20 = PyTuple_New(1); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 1606, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_20);
  __Pyx_GIVEREF(__pyx_t_19);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_20, 0, __pyx_t_19)) __PYX_ERR(0, 1606, __pyx_L1_error);
  __pyx_t_19 = 0;
  __pyx_t_19 = __Pyx_PEP560_update_bases(__pyx_t_20); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 1606, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_19);
  __pyx_t_15 = __Pyx_CalculateMetaclass(NULL, __pyx_t_19); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1606, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_15);
  __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_15, __pyx_t_19, __pyx_n_s_Protocol, __pyx_n_s_Protocol, (PyObject *) NULL, __pyx_n_s_questdb_ingress, __pyx_kp_s_Protocol_to_use_for_sending_dat); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1606, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (__pyx_t_19 != __pyx_t_20) {
    if (unlikely((PyDict_SetItemString(__pyx_t_3, "__orig_bases__", __pyx_t_20) < 0))) __PYX_ERR(0, 1606, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
/* … */
  __pyx_t_18 = __Pyx_Py3ClassCreate(__pyx_t_15, __pyx_n_s_Protocol, __pyx_t_19, __pyx_t_3, NULL, 0, 0); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 1606, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_18);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Protocol, __pyx_t_18) < 0) __PYX_ERR(0, 1606, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
  __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
 1607:     """
 1608:     Protocol to use for sending data to QuestDB.
 1609: 
 1610:     See :ref:`sender_which_protocol` for more information.
 1611:     """
+1612:     Tcp = ('tcp', 0)
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_Tcp, __pyx_tuple__90) < 0) __PYX_ERR(0, 1612, __pyx_L1_error)
/* … */
  __pyx_tuple__90 = PyTuple_Pack(2, __pyx_n_u_tcp, __pyx_int_0); if (unlikely(!__pyx_tuple__90)) __PYX_ERR(0, 1612, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__90);
  __Pyx_GIVEREF(__pyx_tuple__90);
+1613:     Tcps = ('tcps', 1)
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_Tcps, __pyx_tuple__91) < 0) __PYX_ERR(0, 1613, __pyx_L1_error)
/* … */
  __pyx_tuple__91 = PyTuple_Pack(2, __pyx_n_u_tcps, __pyx_int_1); if (unlikely(!__pyx_tuple__91)) __PYX_ERR(0, 1613, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__91);
  __Pyx_GIVEREF(__pyx_tuple__91);
+1614:     Http = ('http', 2)
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_Http, __pyx_tuple__92) < 0) __PYX_ERR(0, 1614, __pyx_L1_error)
/* … */
  __pyx_tuple__92 = PyTuple_Pack(2, __pyx_n_u_http, __pyx_int_2); if (unlikely(!__pyx_tuple__92)) __PYX_ERR(0, 1614, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__92);
  __Pyx_GIVEREF(__pyx_tuple__92);
+1615:     Https = ('https', 3)
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_Https, __pyx_tuple__93) < 0) __PYX_ERR(0, 1615, __pyx_L1_error)
/* … */
  __pyx_tuple__93 = PyTuple_Pack(2, __pyx_n_u_https, __pyx_int_3); if (unlikely(!__pyx_tuple__93)) __PYX_ERR(0, 1615, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__93);
  __Pyx_GIVEREF(__pyx_tuple__93);
 1616: 
+1617:     @property
/* Python wrapper */
static PyObject *__pyx_pw_7questdb_7ingress_8Protocol_1tls_enabled(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_7questdb_7ingress_8Protocol_1tls_enabled = {"tls_enabled", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7questdb_7ingress_8Protocol_1tls_enabled, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7questdb_7ingress_8Protocol_1tls_enabled(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("tls_enabled (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,0};
  PyObject* values[1] = {0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1617, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "tls_enabled") < 0)) __PYX_ERR(0, 1617, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("tls_enabled", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1617, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("questdb.ingress.Protocol.tls_enabled", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7questdb_7ingress_8Protocol_tls_enabled(__pyx_self, __pyx_v_self);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7questdb_7ingress_8Protocol_tls_enabled(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
/* … */
  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("questdb.ingress.Protocol.tls_enabled", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
/* … */
  __pyx_t_20 = __Pyx_CyFunction_New(&__pyx_mdef_7questdb_7ingress_8Protocol_1tls_enabled, 0, __pyx_n_s_Protocol_tls_enabled, NULL, __pyx_n_s_questdb_ingress, __pyx_d, ((PyObject *)__pyx_codeobj__94)); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 1617, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_20);
  __pyx_t_18 = __Pyx_PyObject_CallOneArg(__pyx_builtin_property, __pyx_t_20); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 1617, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_18);
  __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_tls_enabled, __pyx_t_18) < 0) __PYX_ERR(0, 1617, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
/* … */
  __pyx_codeobj__94 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__48, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_questdb_ingress_pyx, __pyx_n_s_tls_enabled, 1617, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__94)) __PYX_ERR(0, 1617, __pyx_L1_error)
 1618:     def tls_enabled(self):
+1619:         return self in (Protocol.Tcps, Protocol.Https)
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self);
  __pyx_t_1 = __pyx_v_self;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_Protocol); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1619, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_Tcps); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1619, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1619, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 1619, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (!__pyx_t_5) {
  } else {
    __pyx_t_2 = __pyx_t_5;
    goto __pyx_L3_bool_binop_done;
  }
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_Protocol); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1619, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_Https); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1619, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1619, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 1619, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_2 = __pyx_t_5;
  __pyx_L3_bool_binop_done:;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1619, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;
 1620: 
 1621: 
+1622: class TlsCa(TaggedEnum):
  __Pyx_GetModuleGlobalName(__pyx_t_19, __pyx_n_s_TaggedEnum); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 1622, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_19);
  __pyx_t_15 = PyTuple_New(1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1622, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_15);
  __Pyx_GIVEREF(__pyx_t_19);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_19)) __PYX_ERR(0, 1622, __pyx_L1_error);
  __pyx_t_19 = 0;
  __pyx_t_19 = __Pyx_PEP560_update_bases(__pyx_t_15); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 1622, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_19);
  __pyx_t_3 = __Pyx_CalculateMetaclass(NULL, __pyx_t_19); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1622, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_18 = __Pyx_Py3MetaclassPrepare(__pyx_t_3, __pyx_t_19, __pyx_n_s_TlsCa, __pyx_n_s_TlsCa, (PyObject *) NULL, __pyx_n_s_questdb_ingress, __pyx_kp_s_Verification_mechanism_for_the); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 1622, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_18);
  if (__pyx_t_19 != __pyx_t_15) {
    if (unlikely((PyDict_SetItemString(__pyx_t_18, "__orig_bases__", __pyx_t_15) < 0))) __PYX_ERR(0, 1622, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
/* … */
  __pyx_t_15 = __Pyx_Py3ClassCreate(__pyx_t_3, __pyx_n_s_TlsCa, __pyx_t_19, __pyx_t_18, NULL, 0, 0); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1622, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_15);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_TlsCa, __pyx_t_15) < 0) __PYX_ERR(0, 1622, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
 1623:     """
 1624:     Verification mechanism for the server's certificate.
 1625: 
 1626:     Here ``webpki`` refers to the
 1627:     `WebPKI library <https://github.com/rustls/webpki-roots>`_ and
 1628:     ``os`` refers to the operating system's certificate store.
 1629: 
 1630:     See :ref:`sender_conf_tls` for more information.
 1631:     """
+1632:     WebpkiRoots = ('webpki_roots', line_sender_ca_webpki_roots)
  __pyx_t_15 = __Pyx_PyInt_From_enum__line_sender_ca(line_sender_ca_webpki_roots); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1632, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_15);
  __pyx_t_20 = PyTuple_New(2); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 1632, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_20);
  __Pyx_INCREF(__pyx_n_u_webpki_roots);
  __Pyx_GIVEREF(__pyx_n_u_webpki_roots);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_20, 0, __pyx_n_u_webpki_roots)) __PYX_ERR(0, 1632, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_15);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_20, 1, __pyx_t_15)) __PYX_ERR(0, 1632, __pyx_L1_error);
  __pyx_t_15 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_18, __pyx_n_s_WebpkiRoots, __pyx_t_20) < 0) __PYX_ERR(0, 1632, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
+1633:     OsRoots = ('os_roots', line_sender_ca_os_roots)
  __pyx_t_20 = __Pyx_PyInt_From_enum__line_sender_ca(line_sender_ca_os_roots); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 1633, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_20);
  __pyx_t_15 = PyTuple_New(2); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1633, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_15);
  __Pyx_INCREF(__pyx_n_u_os_roots);
  __Pyx_GIVEREF(__pyx_n_u_os_roots);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_n_u_os_roots)) __PYX_ERR(0, 1633, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_20);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_15, 1, __pyx_t_20)) __PYX_ERR(0, 1633, __pyx_L1_error);
  __pyx_t_20 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_18, __pyx_n_s_OsRoots, __pyx_t_15) < 0) __PYX_ERR(0, 1633, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
+1634:     WebpkiAndOsRoots = ('webpki_and_os_roots', line_sender_ca_webpki_and_os_roots)
  __pyx_t_15 = __Pyx_PyInt_From_enum__line_sender_ca(line_sender_ca_webpki_and_os_roots); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1634, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_15);
  __pyx_t_20 = PyTuple_New(2); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 1634, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_20);
  __Pyx_INCREF(__pyx_n_u_webpki_and_os_roots);
  __Pyx_GIVEREF(__pyx_n_u_webpki_and_os_roots);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_20, 0, __pyx_n_u_webpki_and_os_roots)) __PYX_ERR(0, 1634, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_15);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_20, 1, __pyx_t_15)) __PYX_ERR(0, 1634, __pyx_L1_error);
  __pyx_t_15 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_18, __pyx_n_s_WebpkiAndOsRoots, __pyx_t_20) < 0) __PYX_ERR(0, 1634, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
+1635:     PemFile = ('pem_file', line_sender_ca_pem_file)
  __pyx_t_20 = __Pyx_PyInt_From_enum__line_sender_ca(line_sender_ca_pem_file); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 1635, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_20);
  __pyx_t_15 = PyTuple_New(2); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1635, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_15);
  __Pyx_INCREF(__pyx_n_u_pem_file);
  __Pyx_GIVEREF(__pyx_n_u_pem_file);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_n_u_pem_file)) __PYX_ERR(0, 1635, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_20);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_15, 1, __pyx_t_20)) __PYX_ERR(0, 1635, __pyx_L1_error);
  __pyx_t_20 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_18, __pyx_n_s_PemFile, __pyx_t_15) < 0) __PYX_ERR(0, 1635, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
 1636: 
 1637: 
+1638: cdef object c_parse_conf_err_to_py(questdb_conf_str_parse_err* err):
static PyObject *__pyx_f_7questdb_7ingress_c_parse_conf_err_to_py(struct questdb_conf_str_parse_err *__pyx_v_err) {
  PyObject *__pyx_v_msg = 0;
  PyObject *__pyx_v_py_err = 0;
  PyObject *__pyx_r = NULL;
/* … */
  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("questdb.ingress.c_parse_conf_err_to_py", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_msg);
  __Pyx_XDECREF(__pyx_v_py_err);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
+1639:     cdef str msg = PyUnicode_FromStringAndSize(
  __pyx_t_1 = PyUnicode_FromStringAndSize(__pyx_v_err->msg, ((Py_ssize_t)__pyx_v_err->msg_len)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1639, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_msg = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
 1640:         err.msg, <Py_ssize_t>err.msg_len)
+1641:     cdef object py_err = IngressError(IngressErrorCode.ConfigError, msg)
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_IngressError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1641, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_IngressErrorCode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1641, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_ConfigError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1641, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_5 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_5 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_t_4, __pyx_v_msg};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 2+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1641, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_v_py_err = __pyx_t_1;
  __pyx_t_1 = 0;
+1642:     questdb_conf_str_parse_err_free(err)
  questdb_conf_str_parse_err_free(__pyx_v_err);
+1643:     return py_err
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_py_err);
  __pyx_r = __pyx_v_py_err;
  goto __pyx_L0;
 1644: 
 1645: 
+1646: cdef object parse_conf_str(
static PyObject *__pyx_f_7questdb_7ingress_parse_conf_str(struct qdb_pystr_buf *__pyx_v_b, PyObject *__pyx_v_conf_str) {
  size_t __pyx_v_c_len1;
  char const *__pyx_v_c_buf1;
  size_t __pyx_v_c_len2;
  char const *__pyx_v_c_buf2;
  PyObject *__pyx_v_service = 0;
  struct questdb_conf_str_iter *__pyx_v_c_iter;
  PyObject *__pyx_v_key = 0;
  PyObject *__pyx_v_value = 0;
  PyObject *__pyx_v_params = 0;
  struct line_sender_utf8 __pyx_v_c_conf_str_utf8;
  struct questdb_conf_str_parse_err *__pyx_v_err;
  struct questdb_conf_str *__pyx_v_c_conf_str;
  PyObject *__pyx_v_type_mappings = NULL;
  PyObject *__pyx_8genexpr1__pyx_v_k = NULL;
  PyObject *__pyx_8genexpr1__pyx_v_v = NULL;
  PyObject *__pyx_r = NULL;
/* … */
  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_AddTraceback("questdb.ingress.parse_conf_str", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_service);
  __Pyx_XDECREF(__pyx_v_key);
  __Pyx_XDECREF(__pyx_v_value);
  __Pyx_XDECREF(__pyx_v_params);
  __Pyx_XDECREF(__pyx_v_type_mappings);
  __Pyx_XDECREF(__pyx_8genexpr1__pyx_v_k);
  __Pyx_XDECREF(__pyx_8genexpr1__pyx_v_v);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
 1647:         qdb_pystr_buf* b,
 1648:         str conf_str):
 1649:     """
 1650:     Parse a config string to a tuple of (Protocol, dict[str, str]).
 1651:     """
 1652:     cdef size_t c_len1
 1653:     cdef const char* c_buf1
 1654:     cdef size_t c_len2
 1655:     cdef const char* c_buf2
 1656:     cdef str service
 1657:     cdef questdb_conf_str_iter* c_iter
 1658:     cdef str key
 1659:     cdef str value
+1660:     cdef dict params = {}
  __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1660, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_params = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
 1661:     cdef line_sender_utf8 c_conf_str_utf8
 1662:     cdef questdb_conf_str_parse_err* err
 1663:     cdef questdb_conf_str* c_conf_str
+1664:     str_to_utf8(b, <PyObject*>conf_str, &c_conf_str_utf8)
  __pyx_t_2 = __pyx_f_7questdb_7ingress_str_to_utf8(__pyx_v_b, ((PyObject *)__pyx_v_conf_str), (&__pyx_v_c_conf_str_utf8)); if (unlikely(__pyx_t_2 == ((__pyx_t_7questdb_7ingress_void_int)-1))) __PYX_ERR(0, 1664, __pyx_L1_error)
+1665:     c_conf_str = questdb_conf_str_parse(
  __pyx_v_c_conf_str = questdb_conf_str_parse(__pyx_v_c_conf_str_utf8.buf, __pyx_v_c_conf_str_utf8.len, (&__pyx_v_err));
 1666:         c_conf_str_utf8.buf,
 1667:         c_conf_str_utf8.len,
 1668:         &err)
+1669:     if c_conf_str == NULL:
  __pyx_t_3 = (__pyx_v_c_conf_str == NULL);
  if (unlikely(__pyx_t_3)) {
/* … */
  }
+1670:         raise c_parse_conf_err_to_py(err)
    __pyx_t_1 = __pyx_f_7questdb_7ingress_c_parse_conf_err_to_py(__pyx_v_err); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1670, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 1670, __pyx_L1_error)
 1671: 
+1672:     c_buf1 = questdb_conf_str_service(c_conf_str, &c_len1)
  __pyx_v_c_buf1 = questdb_conf_str_service(__pyx_v_c_conf_str, (&__pyx_v_c_len1));
+1673:     service = PyUnicode_FromStringAndSize(c_buf1, <Py_ssize_t>c_len1)
  __pyx_t_1 = PyUnicode_FromStringAndSize(__pyx_v_c_buf1, ((Py_ssize_t)__pyx_v_c_len1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1673, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_service = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
 1674: 
+1675:     c_iter = questdb_conf_str_iter_pairs(c_conf_str)
  __pyx_v_c_iter = questdb_conf_str_iter_pairs(__pyx_v_c_conf_str);
+1676:     while questdb_conf_str_iter_next(c_iter, &c_buf1, &c_len1, &c_buf2, &c_len2):
  while (1) {
    __pyx_t_3 = questdb_conf_str_iter_next(__pyx_v_c_iter, (&__pyx_v_c_buf1), (&__pyx_v_c_len1), (&__pyx_v_c_buf2), (&__pyx_v_c_len2));
    if (!__pyx_t_3) break;
+1677:         key = PyUnicode_FromStringAndSize(c_buf1, <Py_ssize_t>c_len1)
    __pyx_t_1 = PyUnicode_FromStringAndSize(__pyx_v_c_buf1, ((Py_ssize_t)__pyx_v_c_len1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1677, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_XDECREF_SET(__pyx_v_key, ((PyObject*)__pyx_t_1));
    __pyx_t_1 = 0;
+1678:         value = PyUnicode_FromStringAndSize(c_buf2, <Py_ssize_t>c_len2)
    __pyx_t_1 = PyUnicode_FromStringAndSize(__pyx_v_c_buf2, ((Py_ssize_t)__pyx_v_c_len2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1678, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_XDECREF_SET(__pyx_v_value, ((PyObject*)__pyx_t_1));
    __pyx_t_1 = 0;
+1679:         params[key] = value
    if (unlikely((PyDict_SetItem(__pyx_v_params, __pyx_v_key, __pyx_v_value) < 0))) __PYX_ERR(0, 1679, __pyx_L1_error)
  }
 1680: 
+1681:     questdb_conf_str_iter_free(c_iter)
  questdb_conf_str_iter_free(__pyx_v_c_iter);
+1682:     questdb_conf_str_free(c_conf_str)
  questdb_conf_str_free(__pyx_v_c_conf_str);
 1683: 
 1684:     # We now need to parse the various values in the dict from their
 1685:     # string values to their Python types, as expected by the overrides
 1686:     # API of Sender.from_conf and Sender.from_env.
 1687:     # Note that some of these values, such as `tls_ca` or `auto_flush`
 1688:     # are kept as strings and are parsed by Sender._set_sender_fields.
 1689:     type_mappings = {
+1690:         'bind_interface': str,
  __pyx_t_1 = __Pyx_PyDict_NewPresized(20); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1690, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_bind_interface, ((PyObject *)(&PyUnicode_Type))) < 0) __PYX_ERR(0, 1690, __pyx_L1_error)
+1691:         'username': str,
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_username, ((PyObject *)(&PyUnicode_Type))) < 0) __PYX_ERR(0, 1690, __pyx_L1_error)
+1692:         'password': str,
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_password, ((PyObject *)(&PyUnicode_Type))) < 0) __PYX_ERR(0, 1690, __pyx_L1_error)
+1693:         'token': str,
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_token, ((PyObject *)(&PyUnicode_Type))) < 0) __PYX_ERR(0, 1690, __pyx_L1_error)
+1694:         'token_x': str,
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_token_x, ((PyObject *)(&PyUnicode_Type))) < 0) __PYX_ERR(0, 1690, __pyx_L1_error)
+1695:         'token_y': str,
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_token_y, ((PyObject *)(&PyUnicode_Type))) < 0) __PYX_ERR(0, 1690, __pyx_L1_error)
+1696:         'auth_timeout': int,
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_auth_timeout, ((PyObject *)(&PyInt_Type))) < 0) __PYX_ERR(0, 1690, __pyx_L1_error)
+1697:         'tls_verify': str,
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_tls_verify, ((PyObject *)(&PyUnicode_Type))) < 0) __PYX_ERR(0, 1690, __pyx_L1_error)
+1698:         'tls_ca': str,
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_tls_ca, ((PyObject *)(&PyUnicode_Type))) < 0) __PYX_ERR(0, 1690, __pyx_L1_error)
+1699:         'tls_roots': str,
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_tls_roots, ((PyObject *)(&PyUnicode_Type))) < 0) __PYX_ERR(0, 1690, __pyx_L1_error)
+1700:         'max_buf_size': int,
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_max_buf_size, ((PyObject *)(&PyInt_Type))) < 0) __PYX_ERR(0, 1690, __pyx_L1_error)
+1701:         'retry_timeout': int,
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_retry_timeout, ((PyObject *)(&PyInt_Type))) < 0) __PYX_ERR(0, 1690, __pyx_L1_error)
+1702:         'request_min_throughput': int,
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_request_min_throughput, ((PyObject *)(&PyInt_Type))) < 0) __PYX_ERR(0, 1690, __pyx_L1_error)
+1703:         'request_timeout': int,
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_request_timeout, ((PyObject *)(&PyInt_Type))) < 0) __PYX_ERR(0, 1690, __pyx_L1_error)
+1704:         'auto_flush': str,
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_auto_flush, ((PyObject *)(&PyUnicode_Type))) < 0) __PYX_ERR(0, 1690, __pyx_L1_error)
+1705:         'auto_flush_rows': str,
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_auto_flush_rows, ((PyObject *)(&PyUnicode_Type))) < 0) __PYX_ERR(0, 1690, __pyx_L1_error)
+1706:         'auto_flush_bytes': str,
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_auto_flush_bytes, ((PyObject *)(&PyUnicode_Type))) < 0) __PYX_ERR(0, 1690, __pyx_L1_error)
+1707:         'auto_flush_interval': str,
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_auto_flush_interval, ((PyObject *)(&PyUnicode_Type))) < 0) __PYX_ERR(0, 1690, __pyx_L1_error)
+1708:         'init_buf_size': int,
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_init_buf_size, ((PyObject *)(&PyInt_Type))) < 0) __PYX_ERR(0, 1690, __pyx_L1_error)
+1709:         'max_name_len': int,
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_max_name_len, ((PyObject *)(&PyInt_Type))) < 0) __PYX_ERR(0, 1690, __pyx_L1_error)
  __pyx_v_type_mappings = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
 1710:     }
+1711:     params = {
  { /* enter inner scope */
    __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1711, __pyx_L8_error)
    __Pyx_GOTREF(__pyx_t_1);
+1712:         k: type_mappings.get(k, str)(v)
      __pyx_t_8 = __Pyx_PyDict_GetItemDefault(__pyx_v_type_mappings, __pyx_8genexpr1__pyx_v_k, ((PyObject *)(&PyUnicode_Type))); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1712, __pyx_L8_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_11 = NULL;
      __pyx_t_10 = 0;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_8))) {
        __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_8);
        if (likely(__pyx_t_11)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
          __Pyx_INCREF(__pyx_t_11);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_8, function);
          __pyx_t_10 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_11, __pyx_8genexpr1__pyx_v_v};
        __pyx_t_9 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_10, 1+__pyx_t_10);
        __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
        if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1712, __pyx_L8_error)
        __Pyx_GOTREF(__pyx_t_9);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      }
      if (unlikely(PyDict_SetItem(__pyx_t_1, (PyObject*)__pyx_8genexpr1__pyx_v_k, (PyObject*)__pyx_t_9))) __PYX_ERR(0, 1712, __pyx_L8_error)
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_8genexpr1__pyx_v_k); __pyx_8genexpr1__pyx_v_k = 0;
    __Pyx_XDECREF(__pyx_8genexpr1__pyx_v_v); __pyx_8genexpr1__pyx_v_v = 0;
    goto __pyx_L11_exit_scope;
    __pyx_L8_error:;
    __Pyx_XDECREF(__pyx_8genexpr1__pyx_v_k); __pyx_8genexpr1__pyx_v_k = 0;
    __Pyx_XDECREF(__pyx_8genexpr1__pyx_v_v); __pyx_8genexpr1__pyx_v_v = 0;
    goto __pyx_L1_error;
    __pyx_L11_exit_scope:;
  } /* exit inner scope */
  __Pyx_DECREF_SET(__pyx_v_params, ((PyObject*)__pyx_t_1));
  __pyx_t_1 = 0;
+1713:         for k, v in params.items()
    __pyx_t_5 = 0;
    __pyx_t_8 = __Pyx_dict_iterator(__pyx_v_params, 1, __pyx_n_s_items, (&__pyx_t_6), (&__pyx_t_7)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1713, __pyx_L8_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_XDECREF(__pyx_t_4);
    __pyx_t_4 = __pyx_t_8;
    __pyx_t_8 = 0;
    while (1) {
      __pyx_t_10 = __Pyx_dict_iter_next(__pyx_t_4, __pyx_t_6, &__pyx_t_5, &__pyx_t_8, &__pyx_t_9, NULL, __pyx_t_7);
      if (unlikely(__pyx_t_10 == 0)) break;
      if (unlikely(__pyx_t_10 == -1)) __PYX_ERR(0, 1713, __pyx_L8_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_XDECREF_SET(__pyx_8genexpr1__pyx_v_k, __pyx_t_8);
      __pyx_t_8 = 0;
      __Pyx_XDECREF_SET(__pyx_8genexpr1__pyx_v_v, __pyx_t_9);
      __pyx_t_9 = 0;
 1714:     }
+1715:     return (Protocol.parse(service), params)
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_Protocol); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1715, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_parse); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1715, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = NULL;
  __pyx_t_7 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_9))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_9);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_9, function);
      __pyx_t_7 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_service};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_9, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1715, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  }
  __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1715, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_GIVEREF(__pyx_t_1);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_1)) __PYX_ERR(0, 1715, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_params);
  __Pyx_GIVEREF(__pyx_v_params);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_v_params)) __PYX_ERR(0, 1715, __pyx_L1_error);
  __pyx_t_1 = 0;
  __pyx_r = __pyx_t_9;
  __pyx_t_9 = 0;
  goto __pyx_L0;
 1716: 
 1717: 
+1718: cdef class Sender:
struct __pyx_vtabstruct_7questdb_7ingress_Sender {
  __pyx_t_7questdb_7ingress_void_int (*_set_sender_fields)(struct __pyx_obj_7questdb_7ingress_Sender *, struct qdb_pystr_buf *, PyObject *, PyObject *, PyObject *, PyObject *, PyObject *, PyObject *, PyObject *, PyObject *, PyObject *, PyObject *, PyObject *, PyObject *, PyObject *, PyObject *, PyObject *, PyObject *, PyObject *, PyObject *, PyObject *, PyObject *, PyObject *);
  PyObject *(*flush)(struct __pyx_obj_7questdb_7ingress_Sender *, int __pyx_skip_dispatch, struct __pyx_opt_args_7questdb_7ingress_6Sender_flush *__pyx_optional_args);
  PyObject *(*_close)(struct __pyx_obj_7questdb_7ingress_Sender *);
  PyObject *(*close)(struct __pyx_obj_7questdb_7ingress_Sender *, int __pyx_skip_dispatch, struct __pyx_opt_args_7questdb_7ingress_6Sender_close *__pyx_optional_args);
};
static struct __pyx_vtabstruct_7questdb_7ingress_Sender *__pyx_vtabptr_7questdb_7ingress_Sender;

 1719:     """
 1720:     Ingest data into QuestDB.
 1721: 
 1722:     See the :ref:`sender` documentation for more information.
 1723:     """
 1724: 
 1725:     # We need the Buffer held by a Sender can hold a weakref to its Sender.
 1726:     # This avoids a circular reference that requires the GC to clean up.
 1727:     cdef object __weakref__
 1728: 
 1729:     cdef line_sender_protocol _c_protocol
 1730:     cdef line_sender_opts* _opts
 1731:     cdef line_sender* _impl
 1732:     cdef Buffer _buffer
 1733:     cdef auto_flush_mode_t _auto_flush_mode
 1734:     cdef int64_t* _last_flush_ms
 1735:     cdef size_t _init_buf_size
 1736:     cdef size_t _max_name_len
 1737:     cdef bint _in_txn
 1738: 
+1739:     cdef void_int _set_sender_fields(
static __pyx_t_7questdb_7ingress_void_int __pyx_f_7questdb_7ingress_6Sender__set_sender_fields(struct __pyx_obj_7questdb_7ingress_Sender *__pyx_v_self, struct qdb_pystr_buf *__pyx_v_b, PyObject *__pyx_v_protocol, PyObject *__pyx_v_bind_interface, PyObject *__pyx_v_username, PyObject *__pyx_v_password, PyObject *__pyx_v_token, PyObject *__pyx_v_token_x, PyObject *__pyx_v_token_y, PyObject *__pyx_v_auth_timeout, PyObject *__pyx_v_tls_verify, PyObject *__pyx_v_tls_ca, PyObject *__pyx_v_tls_roots, PyObject *__pyx_v_max_buf_size, PyObject *__pyx_v_retry_timeout, PyObject *__pyx_v_request_min_throughput, PyObject *__pyx_v_request_timeout, PyObject *__pyx_v_auto_flush, PyObject *__pyx_v_auto_flush_rows, PyObject *__pyx_v_auto_flush_bytes, PyObject *__pyx_v_auto_flush_interval, PyObject *__pyx_v_init_buf_size, PyObject *__pyx_v_max_name_len) {
  struct line_sender_error *__pyx_v_err;
  PyObject *__pyx_v_user_agent = 0;
  struct line_sender_utf8 __pyx_v_c_user_agent;
  struct line_sender_utf8 __pyx_v_c_bind_interface;
  struct line_sender_utf8 __pyx_v_c_username;
  struct line_sender_utf8 __pyx_v_c_password;
  struct line_sender_utf8 __pyx_v_c_token;
  struct line_sender_utf8 __pyx_v_c_token_x;
  struct line_sender_utf8 __pyx_v_c_token_y;
  uint64_t __pyx_v_c_auth_timeout;
  int __pyx_v_c_tls_verify;
  enum line_sender_ca __pyx_v_c_tls_ca;
  struct line_sender_utf8 __pyx_v_c_tls_roots;
  uint64_t __pyx_v_c_max_buf_size;
  uint64_t __pyx_v_c_retry_timeout;
  uint64_t __pyx_v_c_request_min_throughput;
  uint64_t __pyx_v_c_request_timeout;
  __pyx_t_7questdb_7ingress_void_int __pyx_r;
  __Pyx_INCREF(__pyx_v_tls_roots);
/* … */
  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("questdb.ingress.Sender._set_sender_fields", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_user_agent);
  __Pyx_XDECREF(__pyx_v_tls_roots);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
 1740:             self,
 1741:             qdb_pystr_buf* b,
 1742:             object protocol,
 1743:             str bind_interface,
 1744:             str username,
 1745:             str password,
 1746:             str token,
 1747:             str token_x,
 1748:             str token_y,
 1749:             object auth_timeout,
 1750:             object tls_verify,
 1751:             object tls_ca,
 1752:             object tls_roots,
 1753:             object max_buf_size,
 1754:             object retry_timeout,
 1755:             object request_min_throughput,
 1756:             object request_timeout,
 1757:             object auto_flush,
 1758:             object auto_flush_rows,
 1759:             object auto_flush_bytes,
 1760:             object auto_flush_interval,
 1761:             object init_buf_size,
 1762:             object max_name_len) except -1:
 1763:         """
 1764:         Set optional parameters for the sender.
 1765:         """
+1766:         cdef line_sender_error* err = NULL
  __pyx_v_err = NULL;
+1767:         cdef str user_agent = 'questdb/python/' + VERSION
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_VERSION); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1767, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyNumber_Add(__pyx_kp_u_questdb_python, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1767, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (!(likely(PyUnicode_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None) || __Pyx_RaiseUnexpectedTypeError("unicode", __pyx_t_2))) __PYX_ERR(0, 1767, __pyx_L1_error)
  __pyx_v_user_agent = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;
 1768:         cdef line_sender_utf8 c_user_agent
 1769:         cdef line_sender_utf8 c_bind_interface
 1770:         cdef line_sender_utf8 c_username
 1771:         cdef line_sender_utf8 c_password
 1772:         cdef line_sender_utf8 c_token
 1773:         cdef line_sender_utf8 c_token_x
 1774:         cdef line_sender_utf8 c_token_y
 1775:         cdef uint64_t c_auth_timeout
 1776:         cdef bint c_tls_verify
 1777:         cdef line_sender_ca c_tls_ca
 1778:         cdef line_sender_utf8 c_tls_roots
 1779:         cdef uint64_t c_max_buf_size
 1780:         cdef uint64_t c_retry_timeout
 1781:         cdef uint64_t c_request_min_throughput
 1782:         cdef uint64_t c_request_timeout
 1783: 
+1784:         self._c_protocol = protocol.c_value
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_protocol, __pyx_n_s_c_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1784, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = ((enum line_sender_protocol)__Pyx_PyInt_As_enum__line_sender_protocol(__pyx_t_2)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1784, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_self->_c_protocol = __pyx_t_3;
 1785: 
 1786:         # It's OK to override this setting.
+1787:         str_to_utf8(b, <PyObject*>user_agent, &c_user_agent)
  __pyx_t_4 = __pyx_f_7questdb_7ingress_str_to_utf8(__pyx_v_b, ((PyObject *)__pyx_v_user_agent), (&__pyx_v_c_user_agent)); if (unlikely(__pyx_t_4 == ((__pyx_t_7questdb_7ingress_void_int)-1))) __PYX_ERR(0, 1787, __pyx_L1_error)
+1788:         if not line_sender_opts_user_agent(self._opts, c_user_agent, &err):
  __pyx_t_5 = (!line_sender_opts_user_agent(__pyx_v_self->_opts, __pyx_v_c_user_agent, (&__pyx_v_err)));
  if (unlikely(__pyx_t_5)) {
/* … */
  }
+1789:             raise c_err_to_py(err)
    __pyx_t_2 = __pyx_f_7questdb_7ingress_c_err_to_py(__pyx_v_err); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1789, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(0, 1789, __pyx_L1_error)
 1790: 
+1791:         if bind_interface is not None:
  __pyx_t_5 = (__pyx_v_bind_interface != ((PyObject*)Py_None));
  if (__pyx_t_5) {
/* … */
  }
+1792:             str_to_utf8(b, <PyObject*>bind_interface, &c_bind_interface)
    __pyx_t_4 = __pyx_f_7questdb_7ingress_str_to_utf8(__pyx_v_b, ((PyObject *)__pyx_v_bind_interface), (&__pyx_v_c_bind_interface)); if (unlikely(__pyx_t_4 == ((__pyx_t_7questdb_7ingress_void_int)-1))) __PYX_ERR(0, 1792, __pyx_L1_error)
+1793:             if not line_sender_opts_bind_interface(self._opts, c_bind_interface, &err):
    __pyx_t_5 = (!line_sender_opts_bind_interface(__pyx_v_self->_opts, __pyx_v_c_bind_interface, (&__pyx_v_err)));
    if (unlikely(__pyx_t_5)) {
/* … */
    }
+1794:                 raise c_err_to_py(err)
      __pyx_t_2 = __pyx_f_7questdb_7ingress_c_err_to_py(__pyx_v_err); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1794, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_Raise(__pyx_t_2, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __PYX_ERR(0, 1794, __pyx_L1_error)
 1795: 
+1796:         if username is not None:
  __pyx_t_5 = (__pyx_v_username != ((PyObject*)Py_None));
  if (__pyx_t_5) {
/* … */
  }
+1797:             str_to_utf8(b, <PyObject*>username, &c_username)
    __pyx_t_4 = __pyx_f_7questdb_7ingress_str_to_utf8(__pyx_v_b, ((PyObject *)__pyx_v_username), (&__pyx_v_c_username)); if (unlikely(__pyx_t_4 == ((__pyx_t_7questdb_7ingress_void_int)-1))) __PYX_ERR(0, 1797, __pyx_L1_error)
+1798:             if not line_sender_opts_username(self._opts, c_username, &err):
    __pyx_t_5 = (!line_sender_opts_username(__pyx_v_self->_opts, __pyx_v_c_username, (&__pyx_v_err)));
    if (unlikely(__pyx_t_5)) {
/* … */
    }
+1799:                 raise c_err_to_py(err)
      __pyx_t_2 = __pyx_f_7questdb_7ingress_c_err_to_py(__pyx_v_err); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1799, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_Raise(__pyx_t_2, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __PYX_ERR(0, 1799, __pyx_L1_error)
 1800: 
+1801:         if password is not None:
  __pyx_t_5 = (__pyx_v_password != ((PyObject*)Py_None));
  if (__pyx_t_5) {
/* … */
  }
+1802:             str_to_utf8(b, <PyObject*>password, &c_password)
    __pyx_t_4 = __pyx_f_7questdb_7ingress_str_to_utf8(__pyx_v_b, ((PyObject *)__pyx_v_password), (&__pyx_v_c_password)); if (unlikely(__pyx_t_4 == ((__pyx_t_7questdb_7ingress_void_int)-1))) __PYX_ERR(0, 1802, __pyx_L1_error)
+1803:             if not line_sender_opts_password(self._opts, c_password, &err):
    __pyx_t_5 = (!line_sender_opts_password(__pyx_v_self->_opts, __pyx_v_c_password, (&__pyx_v_err)));
    if (unlikely(__pyx_t_5)) {
/* … */
    }
+1804:                 raise c_err_to_py(err)
      __pyx_t_2 = __pyx_f_7questdb_7ingress_c_err_to_py(__pyx_v_err); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1804, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_Raise(__pyx_t_2, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __PYX_ERR(0, 1804, __pyx_L1_error)
 1805: 
+1806:         if token is not None:
  __pyx_t_5 = (__pyx_v_token != ((PyObject*)Py_None));
  if (__pyx_t_5) {
/* … */
  }
+1807:             str_to_utf8(b, <PyObject*>token, &c_token)
    __pyx_t_4 = __pyx_f_7questdb_7ingress_str_to_utf8(__pyx_v_b, ((PyObject *)__pyx_v_token), (&__pyx_v_c_token)); if (unlikely(__pyx_t_4 == ((__pyx_t_7questdb_7ingress_void_int)-1))) __PYX_ERR(0, 1807, __pyx_L1_error)
+1808:             if not line_sender_opts_token(self._opts, c_token, &err):
    __pyx_t_5 = (!line_sender_opts_token(__pyx_v_self->_opts, __pyx_v_c_token, (&__pyx_v_err)));
    if (unlikely(__pyx_t_5)) {
/* … */
    }
+1809:                 raise c_err_to_py(err)
      __pyx_t_2 = __pyx_f_7questdb_7ingress_c_err_to_py(__pyx_v_err); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1809, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_Raise(__pyx_t_2, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __PYX_ERR(0, 1809, __pyx_L1_error)
 1810: 
+1811:         if token_x is not None:
  __pyx_t_5 = (__pyx_v_token_x != ((PyObject*)Py_None));
  if (__pyx_t_5) {
/* … */
  }
+1812:             str_to_utf8(b, <PyObject*>token_x, &c_token_x)
    __pyx_t_4 = __pyx_f_7questdb_7ingress_str_to_utf8(__pyx_v_b, ((PyObject *)__pyx_v_token_x), (&__pyx_v_c_token_x)); if (unlikely(__pyx_t_4 == ((__pyx_t_7questdb_7ingress_void_int)-1))) __PYX_ERR(0, 1812, __pyx_L1_error)
+1813:             if not line_sender_opts_token_x(self._opts, c_token_x, &err):
    __pyx_t_5 = (!line_sender_opts_token_x(__pyx_v_self->_opts, __pyx_v_c_token_x, (&__pyx_v_err)));
    if (unlikely(__pyx_t_5)) {
/* … */
    }
+1814:                 raise c_err_to_py(err)
      __pyx_t_2 = __pyx_f_7questdb_7ingress_c_err_to_py(__pyx_v_err); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1814, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_Raise(__pyx_t_2, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __PYX_ERR(0, 1814, __pyx_L1_error)
 1815: 
+1816:         if token_y is not None:
  __pyx_t_5 = (__pyx_v_token_y != ((PyObject*)Py_None));
  if (__pyx_t_5) {
/* … */
  }
+1817:             str_to_utf8(b, <PyObject*>token_y, &c_token_y)
    __pyx_t_4 = __pyx_f_7questdb_7ingress_str_to_utf8(__pyx_v_b, ((PyObject *)__pyx_v_token_y), (&__pyx_v_c_token_y)); if (unlikely(__pyx_t_4 == ((__pyx_t_7questdb_7ingress_void_int)-1))) __PYX_ERR(0, 1817, __pyx_L1_error)
+1818:             if not line_sender_opts_token_y(self._opts, c_token_y, &err):
    __pyx_t_5 = (!line_sender_opts_token_y(__pyx_v_self->_opts, __pyx_v_c_token_y, (&__pyx_v_err)));
    if (unlikely(__pyx_t_5)) {
/* … */
    }
+1819:                 raise c_err_to_py(err)
      __pyx_t_2 = __pyx_f_7questdb_7ingress_c_err_to_py(__pyx_v_err); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1819, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_Raise(__pyx_t_2, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __PYX_ERR(0, 1819, __pyx_L1_error)
 1820: 
+1821:         if auth_timeout is not None:
  __pyx_t_5 = (__pyx_v_auth_timeout != Py_None);
  if (__pyx_t_5) {
/* … */
  }
+1822:             if isinstance(auth_timeout, int):
    __pyx_t_5 = PyInt_Check(__pyx_v_auth_timeout); 
    if (__pyx_t_5) {
/* … */
      goto __pyx_L17;
    }
+1823:                 c_auth_timeout = auth_timeout
      __pyx_t_6 = __Pyx_PyInt_As_uint64_t(__pyx_v_auth_timeout); if (unlikely((__pyx_t_6 == ((uint64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1823, __pyx_L1_error)
      __pyx_v_c_auth_timeout = __pyx_t_6;
+1824:             elif isinstance(auth_timeout, timedelta):
    __pyx_t_5 = __Pyx_TypeCheck(__pyx_v_auth_timeout, __pyx_ptype_7cpython_8datetime_timedelta); 
    if (likely(__pyx_t_5)) {
/* … */
      goto __pyx_L17;
    }
+1825:                 c_auth_timeout = _timedelta_to_millis(auth_timeout)
      __pyx_t_6 = __pyx_f_7questdb_7ingress__timedelta_to_millis(__pyx_v_auth_timeout); if (unlikely(__pyx_t_6 == ((uint64_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 1825, __pyx_L1_error)
      __pyx_v_c_auth_timeout = __pyx_t_6;
 1826:             else:
+1827:                 raise TypeError(
    /*else*/ {
/* … */
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1827, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_Raise(__pyx_t_1, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __PYX_ERR(0, 1827, __pyx_L1_error)
    }
    __pyx_L17:;
+1828:                     '"auth_timeout" must be an int or a timedelta, '
      __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_auth_timeout_must_be_an_int_or, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1828, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+1829:                     f'not {_fqn(type(auth_timeout))}')
      __pyx_t_2 = __pyx_f_7questdb_7ingress__fqn(((PyTypeObject*)((PyObject *)Py_TYPE(__pyx_v_auth_timeout)))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1829, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_1 = __Pyx_PyUnicode_Unicode(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1829, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+1830:             if not line_sender_opts_auth_timeout(self._opts, c_auth_timeout, &err):
    __pyx_t_5 = (!line_sender_opts_auth_timeout(__pyx_v_self->_opts, __pyx_v_c_auth_timeout, (&__pyx_v_err)));
    if (unlikely(__pyx_t_5)) {
/* … */
    }
+1831:                 raise c_err_to_py(err)
      __pyx_t_1 = __pyx_f_7questdb_7ingress_c_err_to_py(__pyx_v_err); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1831, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_Raise(__pyx_t_1, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __PYX_ERR(0, 1831, __pyx_L1_error)
 1832: 
+1833:         if tls_verify is not None:
  __pyx_t_5 = (__pyx_v_tls_verify != Py_None);
  if (__pyx_t_5) {
/* … */
  }
+1834:             if (tls_verify is True) or (tls_verify == 'on'):
    __pyx_t_7 = (__pyx_v_tls_verify == Py_True);
    if (!__pyx_t_7) {
    } else {
      __pyx_t_5 = __pyx_t_7;
      goto __pyx_L21_bool_binop_done;
    }
    __pyx_t_7 = (__Pyx_PyUnicode_Equals(__pyx_v_tls_verify, __pyx_n_u_on, Py_EQ)); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 1834, __pyx_L1_error)
    __pyx_t_5 = __pyx_t_7;
    __pyx_L21_bool_binop_done:;
    if (__pyx_t_5) {
/* … */
      goto __pyx_L20;
    }
+1835:                 c_tls_verify = True
      __pyx_v_c_tls_verify = 1;
+1836:             elif (tls_verify is False) or (tls_verify == 'unsafe_off'):
    __pyx_t_7 = (__pyx_v_tls_verify == Py_False);
    if (!__pyx_t_7) {
    } else {
      __pyx_t_5 = __pyx_t_7;
      goto __pyx_L23_bool_binop_done;
    }
    __pyx_t_7 = (__Pyx_PyUnicode_Equals(__pyx_v_tls_verify, __pyx_n_u_unsafe_off, Py_EQ)); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 1836, __pyx_L1_error)
    __pyx_t_5 = __pyx_t_7;
    __pyx_L23_bool_binop_done:;
    if (likely(__pyx_t_5)) {
/* … */
      goto __pyx_L20;
    }
+1837:                 c_tls_verify = False
      __pyx_v_c_tls_verify = 0;
 1838:             else:
+1839:                 raise ValueError(
    /*else*/ {
/* … */
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1839, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_Raise(__pyx_t_1, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __PYX_ERR(0, 1839, __pyx_L1_error)
    }
    __pyx_L20:;
+1840:                     '"tls_verify" must be a bool, "on" or "unsafe_off", '
      __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_tls_verify_must_be_a_bool_on_or, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1840, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+1841:                     f'not {tls_verify!r}')
      __pyx_t_1 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_v_tls_verify), __pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1841, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
+1842:             if not line_sender_opts_tls_verify(self._opts, c_tls_verify, &err):
    __pyx_t_5 = (!line_sender_opts_tls_verify(__pyx_v_self->_opts, __pyx_v_c_tls_verify, (&__pyx_v_err)));
    if (unlikely(__pyx_t_5)) {
/* … */
    }
+1843:                 raise c_err_to_py(err)
      __pyx_t_1 = __pyx_f_7questdb_7ingress_c_err_to_py(__pyx_v_err); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1843, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_Raise(__pyx_t_1, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __PYX_ERR(0, 1843, __pyx_L1_error)
 1844: 
+1845:         if tls_roots is not None:
  __pyx_t_5 = (__pyx_v_tls_roots != Py_None);
  if (__pyx_t_5) {
/* … */
  }
+1846:             tls_roots = str(tls_roots)
    __pyx_t_1 = __Pyx_PyObject_Str(__pyx_v_tls_roots); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1846, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF_SET(__pyx_v_tls_roots, __pyx_t_1);
    __pyx_t_1 = 0;
+1847:             str_to_utf8(b, <PyObject*>tls_roots, &c_tls_roots)
    __pyx_t_4 = __pyx_f_7questdb_7ingress_str_to_utf8(__pyx_v_b, ((PyObject *)__pyx_v_tls_roots), (&__pyx_v_c_tls_roots)); if (unlikely(__pyx_t_4 == ((__pyx_t_7questdb_7ingress_void_int)-1))) __PYX_ERR(0, 1847, __pyx_L1_error)
+1848:             if not line_sender_opts_tls_roots(self._opts, c_tls_roots, &err):
    __pyx_t_5 = (!line_sender_opts_tls_roots(__pyx_v_self->_opts, __pyx_v_c_tls_roots, (&__pyx_v_err)));
    if (unlikely(__pyx_t_5)) {
/* … */
    }
+1849:                 raise c_err_to_py(err)
      __pyx_t_1 = __pyx_f_7questdb_7ingress_c_err_to_py(__pyx_v_err); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1849, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_Raise(__pyx_t_1, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __PYX_ERR(0, 1849, __pyx_L1_error)
 1850: 
+1851:         if tls_ca is not None:
  __pyx_t_5 = (__pyx_v_tls_ca != Py_None);
  if (__pyx_t_5) {
/* … */
    goto __pyx_L28;
  }
+1852:             c_tls_ca = TlsCa.parse(tls_ca).c_value
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_TlsCa); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1852, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_parse); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1852, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = NULL;
    __pyx_t_9 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_8))) {
      __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_8);
      if (likely(__pyx_t_2)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
        __Pyx_INCREF(__pyx_t_2);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_8, function);
        __pyx_t_9 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_tls_ca};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_9, 1+__pyx_t_9);
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1852, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    }
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_c_value); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1852, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_10 = ((enum line_sender_ca)__Pyx_PyInt_As_enum__line_sender_ca(__pyx_t_8)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1852, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_v_c_tls_ca = __pyx_t_10;
+1853:             if not line_sender_opts_tls_ca(self._opts, c_tls_ca, &err):
    __pyx_t_5 = (!line_sender_opts_tls_ca(__pyx_v_self->_opts, __pyx_v_c_tls_ca, (&__pyx_v_err)));
    if (unlikely(__pyx_t_5)) {
/* … */
    }
+1854:                 raise c_err_to_py(err)
      __pyx_t_8 = __pyx_f_7questdb_7ingress_c_err_to_py(__pyx_v_err); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1854, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_Raise(__pyx_t_8, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __PYX_ERR(0, 1854, __pyx_L1_error)
+1855:         elif protocol.tls_enabled and tls_roots is None:
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_protocol, __pyx_n_s_tls_enabled); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1855, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 1855, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (__pyx_t_7) {
  } else {
    __pyx_t_5 = __pyx_t_7;
    goto __pyx_L30_bool_binop_done;
  }
  __pyx_t_7 = (__pyx_v_tls_roots == Py_None);
  __pyx_t_5 = __pyx_t_7;
  __pyx_L30_bool_binop_done:;
  if (__pyx_t_5) {
/* … */
  }
  __pyx_L28:;
 1856:             # Set different default for Python than the the Rust default.
 1857:             # We don't set it if `tls_roots` is set, as it would override it.
+1858:             c_tls_ca = line_sender_ca_webpki_and_os_roots
    __pyx_v_c_tls_ca = line_sender_ca_webpki_and_os_roots;
+1859:             if not line_sender_opts_tls_ca(self._opts, c_tls_ca, &err):
    __pyx_t_5 = (!line_sender_opts_tls_ca(__pyx_v_self->_opts, __pyx_v_c_tls_ca, (&__pyx_v_err)));
    if (unlikely(__pyx_t_5)) {
/* … */
    }
+1860:                 raise c_err_to_py(err)
      __pyx_t_8 = __pyx_f_7questdb_7ingress_c_err_to_py(__pyx_v_err); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1860, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_Raise(__pyx_t_8, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __PYX_ERR(0, 1860, __pyx_L1_error)
 1861: 
+1862:         if max_buf_size is not None:
  __pyx_t_5 = (__pyx_v_max_buf_size != Py_None);
  if (__pyx_t_5) {
/* … */
  }
+1863:             c_max_buf_size = max_buf_size
    __pyx_t_6 = __Pyx_PyInt_As_uint64_t(__pyx_v_max_buf_size); if (unlikely((__pyx_t_6 == ((uint64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1863, __pyx_L1_error)
    __pyx_v_c_max_buf_size = __pyx_t_6;
+1864:             if not line_sender_opts_max_buf_size(self._opts, c_max_buf_size, &err):
    __pyx_t_5 = (!line_sender_opts_max_buf_size(__pyx_v_self->_opts, __pyx_v_c_max_buf_size, (&__pyx_v_err)));
    if (unlikely(__pyx_t_5)) {
/* … */
    }
+1865:                 raise c_err_to_py(err)
      __pyx_t_8 = __pyx_f_7questdb_7ingress_c_err_to_py(__pyx_v_err); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1865, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_Raise(__pyx_t_8, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __PYX_ERR(0, 1865, __pyx_L1_error)
 1866: 
+1867:         if retry_timeout is not None:
  __pyx_t_5 = (__pyx_v_retry_timeout != Py_None);
  if (__pyx_t_5) {
/* … */
  }
+1868:             if isinstance(retry_timeout, int):
    __pyx_t_5 = PyInt_Check(__pyx_v_retry_timeout); 
    if (__pyx_t_5) {
/* … */
      goto __pyx_L36;
    }
+1869:                 c_retry_timeout = retry_timeout
      __pyx_t_6 = __Pyx_PyInt_As_uint64_t(__pyx_v_retry_timeout); if (unlikely((__pyx_t_6 == ((uint64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1869, __pyx_L1_error)
      __pyx_v_c_retry_timeout = __pyx_t_6;
+1870:                 if not line_sender_opts_retry_timeout(self._opts, c_retry_timeout, &err):
      __pyx_t_5 = (!line_sender_opts_retry_timeout(__pyx_v_self->_opts, __pyx_v_c_retry_timeout, (&__pyx_v_err)));
      if (unlikely(__pyx_t_5)) {
/* … */
      }
+1871:                     raise c_err_to_py(err)
        __pyx_t_8 = __pyx_f_7questdb_7ingress_c_err_to_py(__pyx_v_err); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1871, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_Raise(__pyx_t_8, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __PYX_ERR(0, 1871, __pyx_L1_error)
+1872:             elif isinstance(retry_timeout, timedelta):
    __pyx_t_5 = __Pyx_TypeCheck(__pyx_v_retry_timeout, __pyx_ptype_7cpython_8datetime_timedelta); 
    if (likely(__pyx_t_5)) {
/* … */
      goto __pyx_L36;
    }
+1873:                 c_retry_timeout = _timedelta_to_millis(retry_timeout)
      __pyx_t_6 = __pyx_f_7questdb_7ingress__timedelta_to_millis(__pyx_v_retry_timeout); if (unlikely(__pyx_t_6 == ((uint64_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 1873, __pyx_L1_error)
      __pyx_v_c_retry_timeout = __pyx_t_6;
+1874:                 if not line_sender_opts_retry_timeout(self._opts, c_retry_timeout, &err):
      __pyx_t_5 = (!line_sender_opts_retry_timeout(__pyx_v_self->_opts, __pyx_v_c_retry_timeout, (&__pyx_v_err)));
      if (unlikely(__pyx_t_5)) {
/* … */
      }
+1875:                     raise c_err_to_py(err)
        __pyx_t_8 = __pyx_f_7questdb_7ingress_c_err_to_py(__pyx_v_err); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1875, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_Raise(__pyx_t_8, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __PYX_ERR(0, 1875, __pyx_L1_error)
 1876:             else:
+1877:                 raise TypeError(
    /*else*/ {
/* … */
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1877, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_Raise(__pyx_t_1, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __PYX_ERR(0, 1877, __pyx_L1_error)
    }
    __pyx_L36:;
+1878:                     '"retry_timeout" must be an int or a timedelta, '
      __pyx_t_8 = __Pyx_PyUnicode_Concat(__pyx_kp_u_retry_timeout_must_be_an_int_or, __pyx_t_1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1878, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+1879:                     f'not {_fqn(type(retry_timeout))}')
      __pyx_t_8 = __pyx_f_7questdb_7ingress__fqn(((PyTypeObject*)((PyObject *)Py_TYPE(__pyx_v_retry_timeout)))); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1879, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_1 = __Pyx_PyUnicode_Unicode(__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1879, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
 1880: 
+1881:         if request_min_throughput is not None:
  __pyx_t_5 = (__pyx_v_request_min_throughput != Py_None);
  if (__pyx_t_5) {
/* … */
  }
+1882:             c_request_min_throughput = request_min_throughput
    __pyx_t_6 = __Pyx_PyInt_As_uint64_t(__pyx_v_request_min_throughput); if (unlikely((__pyx_t_6 == ((uint64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1882, __pyx_L1_error)
    __pyx_v_c_request_min_throughput = __pyx_t_6;
+1883:             if not line_sender_opts_request_min_throughput(self._opts, c_request_min_throughput, &err):
    __pyx_t_5 = (!line_sender_opts_request_min_throughput(__pyx_v_self->_opts, __pyx_v_c_request_min_throughput, (&__pyx_v_err)));
    if (unlikely(__pyx_t_5)) {
/* … */
    }
+1884:                 raise c_err_to_py(err)
      __pyx_t_1 = __pyx_f_7questdb_7ingress_c_err_to_py(__pyx_v_err); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1884, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_Raise(__pyx_t_1, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __PYX_ERR(0, 1884, __pyx_L1_error)
 1885: 
+1886:         if request_timeout is not None:
  __pyx_t_5 = (__pyx_v_request_timeout != Py_None);
  if (__pyx_t_5) {
/* … */
  }
+1887:             if isinstance(request_timeout, int):
    __pyx_t_5 = PyInt_Check(__pyx_v_request_timeout); 
    if (__pyx_t_5) {
/* … */
      goto __pyx_L42;
    }
+1888:                 c_request_timeout = request_timeout
      __pyx_t_6 = __Pyx_PyInt_As_uint64_t(__pyx_v_request_timeout); if (unlikely((__pyx_t_6 == ((uint64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1888, __pyx_L1_error)
      __pyx_v_c_request_timeout = __pyx_t_6;
+1889:                 if not line_sender_opts_request_timeout(self._opts, c_request_timeout, &err):
      __pyx_t_5 = (!line_sender_opts_request_timeout(__pyx_v_self->_opts, __pyx_v_c_request_timeout, (&__pyx_v_err)));
      if (unlikely(__pyx_t_5)) {
/* … */
      }
+1890:                     raise c_err_to_py(err)
        __pyx_t_1 = __pyx_f_7questdb_7ingress_c_err_to_py(__pyx_v_err); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1890, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_Raise(__pyx_t_1, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __PYX_ERR(0, 1890, __pyx_L1_error)
+1891:             elif isinstance(request_timeout, timedelta):
    __pyx_t_5 = __Pyx_TypeCheck(__pyx_v_request_timeout, __pyx_ptype_7cpython_8datetime_timedelta); 
    if (likely(__pyx_t_5)) {
/* … */
      goto __pyx_L42;
    }
+1892:                 c_request_timeout = _timedelta_to_millis(request_timeout)
      __pyx_t_6 = __pyx_f_7questdb_7ingress__timedelta_to_millis(__pyx_v_request_timeout); if (unlikely(__pyx_t_6 == ((uint64_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 1892, __pyx_L1_error)
      __pyx_v_c_request_timeout = __pyx_t_6;
+1893:                 if not line_sender_opts_request_timeout(self._opts, c_request_timeout, &err):
      __pyx_t_5 = (!line_sender_opts_request_timeout(__pyx_v_self->_opts, __pyx_v_c_request_timeout, (&__pyx_v_err)));
      if (unlikely(__pyx_t_5)) {
/* … */
      }
+1894:                     raise c_err_to_py(err)
        __pyx_t_1 = __pyx_f_7questdb_7ingress_c_err_to_py(__pyx_v_err); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1894, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_Raise(__pyx_t_1, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __PYX_ERR(0, 1894, __pyx_L1_error)
 1895:             else:
+1896:                 raise TypeError(
    /*else*/ {
/* … */
      __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1896, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_Raise(__pyx_t_8, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __PYX_ERR(0, 1896, __pyx_L1_error)
    }
    __pyx_L42:;
+1897:                     '"request_timeout" must be an int or a timedelta, '
      __pyx_t_1 = __Pyx_PyUnicode_Concat(__pyx_kp_u_request_timeout_must_be_an_int, __pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1897, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+1898:                     f'not {_fqn(type(request_timeout))}')
      __pyx_t_1 = __pyx_f_7questdb_7ingress__fqn(((PyTypeObject*)((PyObject *)Py_TYPE(__pyx_v_request_timeout)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1898, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_8 = __Pyx_PyUnicode_Unicode(__pyx_t_1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1898, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 1899: 
+1900:         _parse_auto_flush(
  __pyx_t_4 = __pyx_f_7questdb_7ingress__parse_auto_flush(__pyx_v_self->_c_protocol, __pyx_v_auto_flush, __pyx_v_auto_flush_rows, __pyx_v_auto_flush_bytes, __pyx_v_auto_flush_interval, (&__pyx_v_self->_auto_flush_mode)); if (unlikely(__pyx_t_4 == ((__pyx_t_7questdb_7ingress_void_int)-1))) __PYX_ERR(0, 1900, __pyx_L1_error)
 1901:             self._c_protocol,
 1902:             auto_flush,
 1903:             auto_flush_rows,
 1904:             auto_flush_bytes,
 1905:             auto_flush_interval,
 1906:             &self._auto_flush_mode)
 1907: 
+1908:         self._init_buf_size = init_buf_size or 65536
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_init_buf_size); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 1908, __pyx_L1_error)
  if (!__pyx_t_5) {
  } else {
    __pyx_t_12 = __Pyx_PyInt_As_size_t(__pyx_v_init_buf_size); if (unlikely((__pyx_t_12 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 1908, __pyx_L1_error)
    __pyx_t_11 = __pyx_t_12;
    goto __pyx_L45_bool_binop_done;
  }
  __pyx_t_11 = 0x10000;
  __pyx_L45_bool_binop_done:;
  __pyx_v_self->_init_buf_size = __pyx_t_11;
+1909:         self._max_name_len = max_name_len or 127
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_max_name_len); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 1909, __pyx_L1_error)
  if (!__pyx_t_5) {
  } else {
    __pyx_t_12 = __Pyx_PyInt_As_size_t(__pyx_v_max_name_len); if (unlikely((__pyx_t_12 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 1909, __pyx_L1_error)
    __pyx_t_11 = __pyx_t_12;
    goto __pyx_L47_bool_binop_done;
  }
  __pyx_t_11 = 0x7F;
  __pyx_L47_bool_binop_done:;
  __pyx_v_self->_max_name_len = __pyx_t_11;
+1910:         self._buffer = Buffer(
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7questdb_7ingress_Buffer), __pyx_empty_tuple, __pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1910, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF((PyObject *)__pyx_v_self->_buffer);
  __Pyx_DECREF((PyObject *)__pyx_v_self->_buffer);
  __pyx_v_self->_buffer = ((struct __pyx_obj_7questdb_7ingress_Buffer *)__pyx_t_1);
  __pyx_t_1 = 0;
+1911:             init_buf_size=self._init_buf_size,
  __pyx_t_8 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1911, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_1 = __Pyx_PyInt_FromSize_t(__pyx_v_self->_init_buf_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1911, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_init_buf_size, __pyx_t_1) < 0) __PYX_ERR(0, 1911, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+1912:             max_name_len=self._max_name_len)
  __pyx_t_1 = __Pyx_PyInt_FromSize_t(__pyx_v_self->_max_name_len); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1912, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_max_name_len, __pyx_t_1) < 0) __PYX_ERR(0, 1911, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+1913:         self._last_flush_ms = <int64_t*>calloc(1, sizeof(int64_t))
  __pyx_v_self->_last_flush_ms = ((int64_t *)calloc(1, (sizeof(int64_t))));
 1914: 
+1915:     def __cinit__(self):
/* Python wrapper */
static int __pyx_pw_7questdb_7ingress_6Sender_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_7questdb_7ingress_6Sender_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
  #endif
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) {
    __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, __pyx_nargs); return -1;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_VARARGS(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 0))) return -1;
  __pyx_r = __pyx_pf_7questdb_7ingress_6Sender___cinit__(((struct __pyx_obj_7questdb_7ingress_Sender *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_7questdb_7ingress_6Sender___cinit__(struct __pyx_obj_7questdb_7ingress_Sender *__pyx_v_self) {
  int __pyx_r;
/* … */
  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
+1916:         self._c_protocol = line_sender_protocol_tcp
  __pyx_v_self->_c_protocol = line_sender_protocol_tcp;
+1917:         self._opts = NULL
  __pyx_v_self->_opts = NULL;
+1918:         self._impl = NULL
  __pyx_v_self->_impl = NULL;
+1919:         self._buffer = None
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF((PyObject *)__pyx_v_self->_buffer);
  __Pyx_DECREF((PyObject *)__pyx_v_self->_buffer);
  __pyx_v_self->_buffer = ((struct __pyx_obj_7questdb_7ingress_Buffer *)Py_None);
+1920:         self._auto_flush_mode.enabled = False
  __pyx_v_self->_auto_flush_mode.enabled = 0;
+1921:         self._last_flush_ms = NULL
  __pyx_v_self->_last_flush_ms = NULL;
+1922:         self._init_buf_size = 0
  __pyx_v_self->_init_buf_size = 0;
+1923:         self._max_name_len = 0
  __pyx_v_self->_max_name_len = 0;
+1924:         self._in_txn = False
  __pyx_v_self->_in_txn = 0;
 1925: 
+1926:     def __init__(
/* Python wrapper */
static int __pyx_pw_7questdb_7ingress_6Sender_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_7questdb_7ingress_6Sender_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_protocol = 0;
  PyObject *__pyx_v_host = 0;
  PyObject *__pyx_v_port = 0;
  PyObject *__pyx_v_bind_interface = 0;
  PyObject *__pyx_v_username = 0;
  PyObject *__pyx_v_password = 0;
  PyObject *__pyx_v_token = 0;
  PyObject *__pyx_v_token_x = 0;
  PyObject *__pyx_v_token_y = 0;
  PyObject *__pyx_v_auth_timeout = 0;
  PyObject *__pyx_v_tls_verify = 0;
  PyObject *__pyx_v_tls_ca = 0;
  PyObject *__pyx_v_tls_roots = 0;
  PyObject *__pyx_v_max_buf_size = 0;
  PyObject *__pyx_v_retry_timeout = 0;
  PyObject *__pyx_v_request_min_throughput = 0;
  PyObject *__pyx_v_request_timeout = 0;
  PyObject *__pyx_v_auto_flush = 0;
  PyObject *__pyx_v_auto_flush_rows = 0;
  PyObject *__pyx_v_auto_flush_bytes = 0;
  PyObject *__pyx_v_auto_flush_interval = 0;
  PyObject *__pyx_v_init_buf_size = 0;
  PyObject *__pyx_v_max_name_len = 0;
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
  #endif
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_protocol,&__pyx_n_s_host,&__pyx_n_s_port,&__pyx_n_s_bind_interface,&__pyx_n_s_username,&__pyx_n_s_password,&__pyx_n_s_token,&__pyx_n_s_token_x,&__pyx_n_s_token_y,&__pyx_n_s_auth_timeout,&__pyx_n_s_tls_verify,&__pyx_n_s_tls_ca,&__pyx_n_s_tls_roots,&__pyx_n_s_max_buf_size,&__pyx_n_s_retry_timeout,&__pyx_n_s_request_min_throughput,&__pyx_n_s_request_timeout,&__pyx_n_s_auto_flush,&__pyx_n_s_auto_flush_rows,&__pyx_n_s_auto_flush_bytes,&__pyx_n_s_auto_flush_interval,&__pyx_n_s_init_buf_size,&__pyx_n_s_max_name_len,0};
  PyObject* values[23] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
/* … */
  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_7questdb_7ingress_6Sender_2__init__(struct __pyx_obj_7questdb_7ingress_Sender *__pyx_v_self, PyObject *__pyx_v_protocol, PyObject *__pyx_v_host, PyObject *__pyx_v_port, PyObject *__pyx_v_bind_interface, PyObject *__pyx_v_username, PyObject *__pyx_v_password, PyObject *__pyx_v_token, PyObject *__pyx_v_token_x, PyObject *__pyx_v_token_y, PyObject *__pyx_v_auth_timeout, PyObject *__pyx_v_tls_verify, PyObject *__pyx_v_tls_ca, PyObject *__pyx_v_tls_roots, PyObject *__pyx_v_max_buf_size, PyObject *__pyx_v_retry_timeout, PyObject *__pyx_v_request_min_throughput, PyObject *__pyx_v_request_timeout, PyObject *__pyx_v_auto_flush, PyObject *__pyx_v_auto_flush_rows, PyObject *__pyx_v_auto_flush_bytes, PyObject *__pyx_v_auto_flush_interval, PyObject *__pyx_v_init_buf_size, PyObject *__pyx_v_max_name_len) {
  struct line_sender_utf8 __pyx_v_c_host;
  PyObject *__pyx_v_port_str = 0;
  enum line_sender_protocol __pyx_v_c_protocol;
  struct line_sender_utf8 __pyx_v_c_port;
  struct qdb_pystr_buf *__pyx_v_b;
  int __pyx_r;
  __Pyx_INCREF(__pyx_v_protocol);
/* … */
  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("questdb.ingress.Sender.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_port_str);
  __Pyx_XDECREF(__pyx_v_protocol);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
 1927:             self,
 1928:             object protocol,
 1929:             str host,
 1930:             object port,
 1931:             *,
+1932:             str bind_interface=None,
    values[3] = __Pyx_Arg_NewRef_VARARGS(((PyObject*)Py_None));
+1933:             str username=None,
    values[4] = __Pyx_Arg_NewRef_VARARGS(((PyObject*)Py_None));
+1934:             str password=None,
    values[5] = __Pyx_Arg_NewRef_VARARGS(((PyObject*)Py_None));
+1935:             str token=None,
    values[6] = __Pyx_Arg_NewRef_VARARGS(((PyObject*)Py_None));
+1936:             str token_x=None,
    values[7] = __Pyx_Arg_NewRef_VARARGS(((PyObject*)Py_None));
+1937:             str token_y=None,
    values[8] = __Pyx_Arg_NewRef_VARARGS(((PyObject*)Py_None));
+1938:             object auth_timeout=None,  # default: 15000 milliseconds
    values[9] = __Pyx_Arg_NewRef_VARARGS(((PyObject *)Py_None));
+1939:             object tls_verify=None,  # default: True
    values[10] = __Pyx_Arg_NewRef_VARARGS(((PyObject *)Py_None));
+1940:             object tls_ca=None,  # default: TlsCa.WebpkiRoots
    values[11] = __Pyx_Arg_NewRef_VARARGS(((PyObject *)Py_None));
+1941:             object tls_roots=None,
    values[12] = __Pyx_Arg_NewRef_VARARGS(((PyObject *)Py_None));
+1942:             object max_buf_size=None,  # 100 * 1024 * 1024 - 100MiB
    values[13] = __Pyx_Arg_NewRef_VARARGS(((PyObject *)Py_None));
+1943:             object retry_timeout=None,  # default: 10000 milliseconds
    values[14] = __Pyx_Arg_NewRef_VARARGS(((PyObject *)Py_None));
+1944:             object request_min_throughput=None, # default: 100 * 1024 - 100KiB/s
    values[15] = __Pyx_Arg_NewRef_VARARGS(((PyObject *)Py_None));
+1945:             object request_timeout=None,
    values[16] = __Pyx_Arg_NewRef_VARARGS(((PyObject *)Py_None));
+1946:             object auto_flush=None,  # Default True
    values[17] = __Pyx_Arg_NewRef_VARARGS(((PyObject *)Py_None));
+1947:             object auto_flush_rows=None,  # Default 75000 (HTTP) or 600 (TCP)
    values[18] = __Pyx_Arg_NewRef_VARARGS(((PyObject *)Py_None));
+1948:             object auto_flush_bytes=None,  # Default off
    values[19] = __Pyx_Arg_NewRef_VARARGS(((PyObject *)Py_None));
+1949:             object auto_flush_interval=None,  # Default 1000 milliseconds
    values[20] = __Pyx_Arg_NewRef_VARARGS(((PyObject *)Py_None));
+1950:             object init_buf_size=None,  # 64KiB
    values[21] = __Pyx_Arg_NewRef_VARARGS(((PyObject *)Py_None));
+1951:             object max_name_len=None):  # 127
    values[22] = __Pyx_Arg_NewRef_VARARGS(((PyObject *)Py_None));
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_VARARGS(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_protocol)) != 0)) {
          (void)__Pyx_Arg_NewRef_VARARGS(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1926, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_host)) != 0)) {
          (void)__Pyx_Arg_NewRef_VARARGS(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1926, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, 1); __PYX_ERR(0, 1926, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_port)) != 0)) {
          (void)__Pyx_Arg_NewRef_VARARGS(values[2]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1926, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, 2); __PYX_ERR(0, 1926, __pyx_L3_error)
        }
      }
      if (kw_args > 0 && likely(kw_args <= 20)) {
        Py_ssize_t index;
        for (index = 3; index < 23 && kw_args > 0; index++) {
          PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, *__pyx_pyargnames[index]);
          if (value) { values[index] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1926, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__init__") < 0)) __PYX_ERR(0, 1926, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 3)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
      values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
      values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2);
    }
    __pyx_v_protocol = values[0];
    __pyx_v_host = ((PyObject*)values[1]);
    __pyx_v_port = values[2];
    __pyx_v_bind_interface = ((PyObject*)values[3]);
    __pyx_v_username = ((PyObject*)values[4]);
    __pyx_v_password = ((PyObject*)values[5]);
    __pyx_v_token = ((PyObject*)values[6]);
    __pyx_v_token_x = ((PyObject*)values[7]);
    __pyx_v_token_y = ((PyObject*)values[8]);
    __pyx_v_auth_timeout = values[9];
    __pyx_v_tls_verify = values[10];
    __pyx_v_tls_ca = values[11];
    __pyx_v_tls_roots = values[12];
    __pyx_v_max_buf_size = values[13];
    __pyx_v_retry_timeout = values[14];
    __pyx_v_request_min_throughput = values[15];
    __pyx_v_request_timeout = values[16];
    __pyx_v_auto_flush = values[17];
    __pyx_v_auto_flush_rows = values[18];
    __pyx_v_auto_flush_bytes = values[19];
    __pyx_v_auto_flush_interval = values[20];
    __pyx_v_init_buf_size = values[21];
    __pyx_v_max_name_len = values[22];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 1926, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("questdb.ingress.Sender.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_host), (&PyUnicode_Type), 1, "host", 1))) __PYX_ERR(0, 1929, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_bind_interface), (&PyUnicode_Type), 1, "bind_interface", 1))) __PYX_ERR(0, 1932, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_username), (&PyUnicode_Type), 1, "username", 1))) __PYX_ERR(0, 1933, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_password), (&PyUnicode_Type), 1, "password", 1))) __PYX_ERR(0, 1934, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_token), (&PyUnicode_Type), 1, "token", 1))) __PYX_ERR(0, 1935, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_token_x), (&PyUnicode_Type), 1, "token_x", 1))) __PYX_ERR(0, 1936, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_token_y), (&PyUnicode_Type), 1, "token_y", 1))) __PYX_ERR(0, 1937, __pyx_L1_error)
  __pyx_r = __pyx_pf_7questdb_7ingress_6Sender_2__init__(((struct __pyx_obj_7questdb_7ingress_Sender *)__pyx_v_self), __pyx_v_protocol, __pyx_v_host, __pyx_v_port, __pyx_v_bind_interface, __pyx_v_username, __pyx_v_password, __pyx_v_token, __pyx_v_token_x, __pyx_v_token_y, __pyx_v_auth_timeout, __pyx_v_tls_verify, __pyx_v_tls_ca, __pyx_v_tls_roots, __pyx_v_max_buf_size, __pyx_v_retry_timeout, __pyx_v_request_min_throughput, __pyx_v_request_timeout, __pyx_v_auto_flush, __pyx_v_auto_flush_rows, __pyx_v_auto_flush_bytes, __pyx_v_auto_flush_interval, __pyx_v_init_buf_size, __pyx_v_max_name_len);
+1952:         print('Sender.__init__')
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__37, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1952, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
/* … */
  __pyx_tuple__37 = PyTuple_Pack(1, __pyx_kp_u_Sender___init); if (unlikely(!__pyx_tuple__37)) __PYX_ERR(0, 1952, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__37);
  __Pyx_GIVEREF(__pyx_tuple__37);
 1953: 
 1954:         cdef line_sender_utf8 c_host
 1955:         cdef str port_str
 1956:         cdef line_sender_protocol c_protocol
 1957:         cdef line_sender_utf8 c_port
+1958:         cdef qdb_pystr_buf* b = qdb_pystr_buf_new()
  __pyx_v_b = qdb_pystr_buf_new();
+1959:         try:
  /*try:*/ {
+1960:             protocol = Protocol.parse(protocol)
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_Protocol); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1960, __pyx_L4_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_parse); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1960, __pyx_L4_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = NULL;
    __pyx_t_4 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_2)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_2);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
        __pyx_t_4 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_protocol};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1960, __pyx_L4_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    __Pyx_DECREF_SET(__pyx_v_protocol, __pyx_t_1);
    __pyx_t_1 = 0;
+1961:             c_protocol = protocol.c_value
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_protocol, __pyx_n_s_c_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1961, __pyx_L4_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = ((enum line_sender_protocol)__Pyx_PyInt_As_enum__line_sender_protocol(__pyx_t_1)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1961, __pyx_L4_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_v_c_protocol = __pyx_t_5;
+1962:             if PyLong_CheckExact(<PyObject*>port):
    __pyx_t_6 = PyLong_CheckExact(((PyObject *)__pyx_v_port));
    if (__pyx_t_6) {
/* … */
      goto __pyx_L6;
    }
+1963:                 port_str = str(port)
      __pyx_t_1 = __Pyx_PyObject_Str(__pyx_v_port); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1963, __pyx_L4_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_v_port_str = ((PyObject*)__pyx_t_1);
      __pyx_t_1 = 0;
+1964:             elif PyUnicode_CheckExact(<PyObject*>port):
    __pyx_t_6 = PyUnicode_CheckExact(((PyObject *)__pyx_v_port));
    if (likely(__pyx_t_6)) {
/* … */
      goto __pyx_L6;
    }
+1965:                 port_str = port
      if (!(likely(PyUnicode_CheckExact(__pyx_v_port))||((__pyx_v_port) == Py_None) || __Pyx_RaiseUnexpectedTypeError("unicode", __pyx_v_port))) __PYX_ERR(0, 1965, __pyx_L4_error)
      __pyx_t_1 = __pyx_v_port;
      __Pyx_INCREF(__pyx_t_1);
      __pyx_v_port_str = ((PyObject*)__pyx_t_1);
      __pyx_t_1 = 0;
 1966:             else:
+1967:                 raise TypeError(
    /*else*/ {
/* … */
      __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1967, __pyx_L4_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_Raise(__pyx_t_3, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __PYX_ERR(0, 1967, __pyx_L4_error)
    }
    __pyx_L6:;
+1968:                     f'port must be an int or a str, not {_fqn(type(port))}')
      __pyx_t_1 = __pyx_f_7questdb_7ingress__fqn(((PyTypeObject*)((PyObject *)Py_TYPE(__pyx_v_port)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1968, __pyx_L4_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_3 = __Pyx_PyUnicode_Unicode(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1968, __pyx_L4_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = __Pyx_PyUnicode_Concat(__pyx_kp_u_port_must_be_an_int_or_a_str_not, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1968, __pyx_L4_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+1969:             str_to_utf8(b, <PyObject*>host, &c_host)
    __pyx_t_7 = __pyx_f_7questdb_7ingress_str_to_utf8(__pyx_v_b, ((PyObject *)__pyx_v_host), (&__pyx_v_c_host)); if (unlikely(__pyx_t_7 == ((__pyx_t_7questdb_7ingress_void_int)-1))) __PYX_ERR(0, 1969, __pyx_L4_error)
+1970:             str_to_utf8(b, <PyObject*>port_str, &c_port)
    __pyx_t_7 = __pyx_f_7questdb_7ingress_str_to_utf8(__pyx_v_b, ((PyObject *)__pyx_v_port_str), (&__pyx_v_c_port)); if (unlikely(__pyx_t_7 == ((__pyx_t_7questdb_7ingress_void_int)-1))) __PYX_ERR(0, 1970, __pyx_L4_error)
+1971:             self._opts = line_sender_opts_new_service(c_protocol, c_host, c_port)
    __pyx_v_self->_opts = line_sender_opts_new_service(__pyx_v_c_protocol, __pyx_v_c_host, __pyx_v_c_port);
 1972: 
+1973:             self._set_sender_fields(
    __pyx_t_7 = ((struct __pyx_vtabstruct_7questdb_7ingress_Sender *)__pyx_v_self->__pyx_vtab)->_set_sender_fields(__pyx_v_self, __pyx_v_b, __pyx_v_protocol, __pyx_v_bind_interface, __pyx_v_username, __pyx_v_password, __pyx_v_token, __pyx_v_token_x, __pyx_v_token_y, __pyx_v_auth_timeout, __pyx_v_tls_verify, __pyx_v_tls_ca, __pyx_v_tls_roots, __pyx_v_max_buf_size, __pyx_v_retry_timeout, __pyx_v_request_min_throughput, __pyx_v_request_timeout, __pyx_v_auto_flush, __pyx_v_auto_flush_rows, __pyx_v_auto_flush_bytes, __pyx_v_auto_flush_interval, __pyx_v_init_buf_size, __pyx_v_max_name_len); if (unlikely(__pyx_t_7 == ((__pyx_t_7questdb_7ingress_void_int)-1))) __PYX_ERR(0, 1973, __pyx_L4_error)
  }
 1974:                 b,
 1975:                 protocol,
 1976:                 bind_interface,
 1977:                 username,
 1978:                 password,
 1979:                 token,
 1980:                 token_x,
 1981:                 token_y,
 1982:                 auth_timeout,
 1983:                 tls_verify,
 1984:                 tls_ca,
 1985:                 tls_roots,
 1986:                 max_buf_size,
 1987:                 retry_timeout,
 1988:                 request_min_throughput,
 1989:                 request_timeout,
 1990:                 auto_flush,
 1991:                 auto_flush_rows,
 1992:                 auto_flush_bytes,
 1993:                 auto_flush_interval,
 1994:                 init_buf_size,
 1995:                 max_name_len)
 1996:         finally:
+1997:             qdb_pystr_buf_free(b)
  /*finally:*/ {
    /*normal exit:*/{
      qdb_pystr_buf_free(__pyx_v_b);
      goto __pyx_L5;
    }
    __pyx_L4_error:;
    /*exception exit:*/{
      __Pyx_PyThreadState_declare
      __Pyx_PyThreadState_assign
      __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0;
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15);
      if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12) < 0)) __Pyx_ErrFetch(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12);
      __Pyx_XGOTREF(__pyx_t_10);
      __Pyx_XGOTREF(__pyx_t_11);
      __Pyx_XGOTREF(__pyx_t_12);
      __Pyx_XGOTREF(__pyx_t_13);
      __Pyx_XGOTREF(__pyx_t_14);
      __Pyx_XGOTREF(__pyx_t_15);
      __pyx_t_4 = __pyx_lineno; __pyx_t_8 = __pyx_clineno; __pyx_t_9 = __pyx_filename;
      {
        qdb_pystr_buf_free(__pyx_v_b);
      }
      if (PY_MAJOR_VERSION >= 3) {
        __Pyx_XGIVEREF(__pyx_t_13);
        __Pyx_XGIVEREF(__pyx_t_14);
        __Pyx_XGIVEREF(__pyx_t_15);
        __Pyx_ExceptionReset(__pyx_t_13, __pyx_t_14, __pyx_t_15);
      }
      __Pyx_XGIVEREF(__pyx_t_10);
      __Pyx_XGIVEREF(__pyx_t_11);
      __Pyx_XGIVEREF(__pyx_t_12);
      __Pyx_ErrRestore(__pyx_t_10, __pyx_t_11, __pyx_t_12);
      __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0;
      __pyx_lineno = __pyx_t_4; __pyx_clineno = __pyx_t_8; __pyx_filename = __pyx_t_9;
      goto __pyx_L1_error;
    }
    __pyx_L5:;
  }
 1998: 
+1999:     @staticmethod
/* Python wrapper */
static PyObject *__pyx_pw_7questdb_7ingress_6Sender_5from_conf(CYTHON_UNUSED PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7questdb_7ingress_6Sender_4from_conf, "\n        Construct a sender from a :ref:`configuration string <sender_conf>`.\n\n        The additional arguments are used to specify additional parameters\n        which are not present in the configuration string.\n\n        Note that any parameters already present in the configuration string\n        cannot be overridden.\n        ");
static PyMethodDef __pyx_mdef_7questdb_7ingress_6Sender_5from_conf = {"from_conf", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7questdb_7ingress_6Sender_5from_conf, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7questdb_7ingress_6Sender_4from_conf};
static PyObject *__pyx_pw_7questdb_7ingress_6Sender_5from_conf(CYTHON_UNUSED PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_conf_str = 0;
  PyObject *__pyx_v_bind_interface = 0;
  PyObject *__pyx_v_username = 0;
  PyObject *__pyx_v_password = 0;
  PyObject *__pyx_v_token = 0;
  PyObject *__pyx_v_token_x = 0;
  PyObject *__pyx_v_token_y = 0;
  PyObject *__pyx_v_auth_timeout = 0;
  PyObject *__pyx_v_tls_verify = 0;
  PyObject *__pyx_v_tls_ca = 0;
  PyObject *__pyx_v_tls_roots = 0;
  PyObject *__pyx_v_max_buf_size = 0;
  PyObject *__pyx_v_retry_timeout = 0;
  PyObject *__pyx_v_request_min_throughput = 0;
  PyObject *__pyx_v_request_timeout = 0;
  PyObject *__pyx_v_auto_flush = 0;
  PyObject *__pyx_v_auto_flush_rows = 0;
  PyObject *__pyx_v_auto_flush_bytes = 0;
  PyObject *__pyx_v_auto_flush_interval = 0;
  PyObject *__pyx_v_init_buf_size = 0;
  PyObject *__pyx_v_max_name_len = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("from_conf (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_conf_str,&__pyx_n_s_bind_interface,&__pyx_n_s_username,&__pyx_n_s_password,&__pyx_n_s_token,&__pyx_n_s_token_x,&__pyx_n_s_token_y,&__pyx_n_s_auth_timeout,&__pyx_n_s_tls_verify,&__pyx_n_s_tls_ca,&__pyx_n_s_tls_roots,&__pyx_n_s_max_buf_size,&__pyx_n_s_retry_timeout,&__pyx_n_s_request_min_throughput,&__pyx_n_s_request_timeout,&__pyx_n_s_auto_flush,&__pyx_n_s_auto_flush_rows,&__pyx_n_s_auto_flush_bytes,&__pyx_n_s_auto_flush_interval,&__pyx_n_s_init_buf_size,&__pyx_n_s_max_name_len,0};
  PyObject* values[21] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
/* … */
  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7questdb_7ingress_6Sender_4from_conf(PyObject *__pyx_v_conf_str, PyObject *__pyx_v_bind_interface, PyObject *__pyx_v_username, PyObject *__pyx_v_password, PyObject *__pyx_v_token, PyObject *__pyx_v_token_x, PyObject *__pyx_v_token_y, PyObject *__pyx_v_auth_timeout, PyObject *__pyx_v_tls_verify, PyObject *__pyx_v_tls_ca, PyObject *__pyx_v_tls_roots, PyObject *__pyx_v_max_buf_size, PyObject *__pyx_v_retry_timeout, PyObject *__pyx_v_request_min_throughput, PyObject *__pyx_v_request_timeout, PyObject *__pyx_v_auto_flush, PyObject *__pyx_v_auto_flush_rows, PyObject *__pyx_v_auto_flush_bytes, PyObject *__pyx_v_auto_flush_interval, PyObject *__pyx_v_init_buf_size, PyObject *__pyx_v_max_name_len) {
  struct line_sender_error *__pyx_v_err;
  PyObject *__pyx_v_protocol = 0;
  struct __pyx_obj_7questdb_7ingress_Sender *__pyx_v_sender = 0;
  PyObject *__pyx_v_synthetic_conf_str = 0;
  struct line_sender_utf8 __pyx_v_c_synthetic_conf_str;
  PyObject *__pyx_v_params = 0;
  struct qdb_pystr_buf *__pyx_v_b;
  PyObject *__pyx_v_addr = NULL;
  PyObject *__pyx_v_override_key = NULL;
  PyObject *__pyx_v_override_value = NULL;
  PyObject *__pyx_r = NULL;
/* … */
  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_14);
  __Pyx_XDECREF(__pyx_t_15);
  __Pyx_XDECREF(__pyx_t_16);
  __Pyx_XDECREF(__pyx_t_17);
  __Pyx_XDECREF(__pyx_t_18);
  __Pyx_XDECREF(__pyx_t_19);
  __Pyx_XDECREF(__pyx_t_20);
  __Pyx_XDECREF(__pyx_t_21);
  __Pyx_XDECREF(__pyx_t_22);
  __Pyx_XDECREF(__pyx_t_23);
  __Pyx_XDECREF(__pyx_t_24);
  __Pyx_XDECREF(__pyx_t_25);
  __Pyx_XDECREF(__pyx_t_26);
  __Pyx_XDECREF(__pyx_t_27);
  __Pyx_XDECREF(__pyx_t_28);
  __Pyx_XDECREF(__pyx_t_29);
  __Pyx_AddTraceback("questdb.ingress.Sender.from_conf", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_protocol);
  __Pyx_XDECREF((PyObject *)__pyx_v_sender);
  __Pyx_XDECREF(__pyx_v_synthetic_conf_str);
  __Pyx_XDECREF(__pyx_v_params);
  __Pyx_XDECREF(__pyx_v_addr);
  __Pyx_XDECREF(__pyx_v_override_key);
  __Pyx_XDECREF(__pyx_v_override_value);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
/* … */
  __pyx_tuple__95 = PyTuple_Pack(31, __pyx_n_s_conf_str, __pyx_n_s_bind_interface, __pyx_n_s_username, __pyx_n_s_password, __pyx_n_s_token, __pyx_n_s_token_x, __pyx_n_s_token_y, __pyx_n_s_auth_timeout, __pyx_n_s_tls_verify, __pyx_n_s_tls_ca, __pyx_n_s_tls_roots, __pyx_n_s_max_buf_size, __pyx_n_s_retry_timeout, __pyx_n_s_request_min_throughput, __pyx_n_s_request_timeout, __pyx_n_s_auto_flush, __pyx_n_s_auto_flush_rows, __pyx_n_s_auto_flush_bytes, __pyx_n_s_auto_flush_interval, __pyx_n_s_init_buf_size, __pyx_n_s_max_name_len, __pyx_n_s_err, __pyx_n_s_protocol, __pyx_n_s_sender, __pyx_n_s_synthetic_conf_str, __pyx_n_s_c_synthetic_conf_str, __pyx_n_s_params, __pyx_n_s_b, __pyx_n_s_addr, __pyx_n_s_override_key, __pyx_n_s_override_value); if (unlikely(!__pyx_tuple__95)) __PYX_ERR(0, 1999, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__95);
  __Pyx_GIVEREF(__pyx_tuple__95);
/* … */
  __pyx_t_19 = __Pyx_PyDict_NewPresized(20); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 1999, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_19);
/* … */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_7questdb_7ingress_6Sender_5from_conf, __Pyx_CYFUNCTION_STATICMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Sender_from_conf, NULL, __pyx_n_s_questdb_ingress, __pyx_d, ((PyObject *)__pyx_codeobj__96)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1999, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_CyFunction_SetDefaultsKwDict(__pyx_t_3, __pyx_t_19);
  __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_7questdb_7ingress_Sender, __pyx_n_s_from_conf, __pyx_t_3) < 0) __PYX_ERR(0, 1999, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_7questdb_7ingress_Sender);
  __Pyx_GetNameInClass(__pyx_t_3, (PyObject *)__pyx_ptype_7questdb_7ingress_Sender, __pyx_n_s_from_conf); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1999, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_19 = __Pyx_PyObject_CallOneArg(__pyx_builtin_staticmethod, __pyx_t_3); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 1999, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_19);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_7questdb_7ingress_Sender, __pyx_n_s_from_conf, __pyx_t_19) < 0) __PYX_ERR(0, 1999, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
  PyType_Modified(__pyx_ptype_7questdb_7ingress_Sender);
  __pyx_codeobj__96 = (PyObject*)__Pyx_PyCode_New(1, 0, 20, 31, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__95, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_questdb_ingress_pyx, __pyx_n_s_from_conf, 1999, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__96)) __PYX_ERR(0, 1999, __pyx_L1_error)
 2000:     def from_conf(
 2001:             str conf_str,
 2002:             *,
+2003:             str bind_interface=None,
    values[1] = __Pyx_Arg_NewRef_FASTCALL(((PyObject*)Py_None));
/* … */
  if (PyDict_SetItem(__pyx_t_19, __pyx_n_s_bind_interface, Py_None) < 0) __PYX_ERR(0, 1999, __pyx_L1_error)
+2004:             str username=None,
    values[2] = __Pyx_Arg_NewRef_FASTCALL(((PyObject*)Py_None));
/* … */
  if (PyDict_SetItem(__pyx_t_19, __pyx_n_s_username, Py_None) < 0) __PYX_ERR(0, 1999, __pyx_L1_error)
+2005:             str password=None,
    values[3] = __Pyx_Arg_NewRef_FASTCALL(((PyObject*)Py_None));
/* … */
  if (PyDict_SetItem(__pyx_t_19, __pyx_n_s_password, Py_None) < 0) __PYX_ERR(0, 1999, __pyx_L1_error)
+2006:             str token=None,
    values[4] = __Pyx_Arg_NewRef_FASTCALL(((PyObject*)Py_None));
/* … */
  if (PyDict_SetItem(__pyx_t_19, __pyx_n_s_token, Py_None) < 0) __PYX_ERR(0, 1999, __pyx_L1_error)
+2007:             str token_x=None,
    values[5] = __Pyx_Arg_NewRef_FASTCALL(((PyObject*)Py_None));
/* … */
  if (PyDict_SetItem(__pyx_t_19, __pyx_n_s_token_x, Py_None) < 0) __PYX_ERR(0, 1999, __pyx_L1_error)
+2008:             str token_y=None,
    values[6] = __Pyx_Arg_NewRef_FASTCALL(((PyObject*)Py_None));
/* … */
  if (PyDict_SetItem(__pyx_t_19, __pyx_n_s_token_y, Py_None) < 0) __PYX_ERR(0, 1999, __pyx_L1_error)
+2009:             object auth_timeout=None,  # default: 15000 milliseconds
    values[7] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
/* … */
  if (PyDict_SetItem(__pyx_t_19, __pyx_n_s_auth_timeout, Py_None) < 0) __PYX_ERR(0, 1999, __pyx_L1_error)
+2010:             object tls_verify=None,  # default: True
    values[8] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
/* … */
  if (PyDict_SetItem(__pyx_t_19, __pyx_n_s_tls_verify, Py_None) < 0) __PYX_ERR(0, 1999, __pyx_L1_error)
+2011:             object tls_ca=None,  # default: TlsCa.WebpkiRoots
    values[9] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
/* … */
  if (PyDict_SetItem(__pyx_t_19, __pyx_n_s_tls_ca, Py_None) < 0) __PYX_ERR(0, 1999, __pyx_L1_error)
+2012:             object tls_roots=None,
    values[10] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
/* … */
  if (PyDict_SetItem(__pyx_t_19, __pyx_n_s_tls_roots, Py_None) < 0) __PYX_ERR(0, 1999, __pyx_L1_error)
+2013:             object max_buf_size=None,  # 100 * 1024 * 1024 - 100MiB
    values[11] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
/* … */
  if (PyDict_SetItem(__pyx_t_19, __pyx_n_s_max_buf_size, Py_None) < 0) __PYX_ERR(0, 1999, __pyx_L1_error)
+2014:             object retry_timeout=None,  # default: 10000 milliseconds
    values[12] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
/* … */
  if (PyDict_SetItem(__pyx_t_19, __pyx_n_s_retry_timeout, Py_None) < 0) __PYX_ERR(0, 1999, __pyx_L1_error)
+2015:             object request_min_throughput=None, # default: 100 * 1024 - 100KiB/s
    values[13] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
/* … */
  if (PyDict_SetItem(__pyx_t_19, __pyx_n_s_request_min_throughput, Py_None) < 0) __PYX_ERR(0, 1999, __pyx_L1_error)
+2016:             object request_timeout=None,
    values[14] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
/* … */
  if (PyDict_SetItem(__pyx_t_19, __pyx_n_s_request_timeout, Py_None) < 0) __PYX_ERR(0, 1999, __pyx_L1_error)
+2017:             object auto_flush=None,  # Default True
    values[15] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
/* … */
  if (PyDict_SetItem(__pyx_t_19, __pyx_n_s_auto_flush, Py_None) < 0) __PYX_ERR(0, 1999, __pyx_L1_error)
+2018:             object auto_flush_rows=None,  # Default 75000 (HTTP) or 600 (TCP)
    values[16] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
/* … */
  if (PyDict_SetItem(__pyx_t_19, __pyx_n_s_auto_flush_rows, Py_None) < 0) __PYX_ERR(0, 1999, __pyx_L1_error)
+2019:             object auto_flush_bytes=None,  # Default off
    values[17] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
/* … */
  if (PyDict_SetItem(__pyx_t_19, __pyx_n_s_auto_flush_bytes, Py_None) < 0) __PYX_ERR(0, 1999, __pyx_L1_error)
+2020:             object auto_flush_interval=None,  # Default 1000 milliseconds
    values[18] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
/* … */
  if (PyDict_SetItem(__pyx_t_19, __pyx_n_s_auto_flush_interval, Py_None) < 0) __PYX_ERR(0, 1999, __pyx_L1_error)
+2021:             object init_buf_size=None,  # 64KiB
    values[19] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
/* … */
  if (PyDict_SetItem(__pyx_t_19, __pyx_n_s_init_buf_size, Py_None) < 0) __PYX_ERR(0, 1999, __pyx_L1_error)
+2022:             object max_name_len=None):  # 127
    values[20] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_conf_str)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1999, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (kw_args > 0 && likely(kw_args <= 20)) {
        Py_ssize_t index;
        for (index = 1; index < 21 && kw_args > 0; index++) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, *__pyx_pyargnames[index]);
          if (value) { values[index] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1999, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "from_conf") < 0)) __PYX_ERR(0, 1999, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_conf_str = ((PyObject*)values[0]);
    __pyx_v_bind_interface = ((PyObject*)values[1]);
    __pyx_v_username = ((PyObject*)values[2]);
    __pyx_v_password = ((PyObject*)values[3]);
    __pyx_v_token = ((PyObject*)values[4]);
    __pyx_v_token_x = ((PyObject*)values[5]);
    __pyx_v_token_y = ((PyObject*)values[6]);
    __pyx_v_auth_timeout = values[7];
    __pyx_v_tls_verify = values[8];
    __pyx_v_tls_ca = values[9];
    __pyx_v_tls_roots = values[10];
    __pyx_v_max_buf_size = values[11];
    __pyx_v_retry_timeout = values[12];
    __pyx_v_request_min_throughput = values[13];
    __pyx_v_request_timeout = values[14];
    __pyx_v_auto_flush = values[15];
    __pyx_v_auto_flush_rows = values[16];
    __pyx_v_auto_flush_bytes = values[17];
    __pyx_v_auto_flush_interval = values[18];
    __pyx_v_init_buf_size = values[19];
    __pyx_v_max_name_len = values[20];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("from_conf", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1999, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("questdb.ingress.Sender.from_conf", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_conf_str), (&PyUnicode_Type), 1, "conf_str", 1))) __PYX_ERR(0, 2001, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_bind_interface), (&PyUnicode_Type), 1, "bind_interface", 1))) __PYX_ERR(0, 2003, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_username), (&PyUnicode_Type), 1, "username", 1))) __PYX_ERR(0, 2004, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_password), (&PyUnicode_Type), 1, "password", 1))) __PYX_ERR(0, 2005, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_token), (&PyUnicode_Type), 1, "token", 1))) __PYX_ERR(0, 2006, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_token_x), (&PyUnicode_Type), 1, "token_x", 1))) __PYX_ERR(0, 2007, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_token_y), (&PyUnicode_Type), 1, "token_y", 1))) __PYX_ERR(0, 2008, __pyx_L1_error)
  __pyx_r = __pyx_pf_7questdb_7ingress_6Sender_4from_conf(__pyx_v_conf_str, __pyx_v_bind_interface, __pyx_v_username, __pyx_v_password, __pyx_v_token, __pyx_v_token_x, __pyx_v_token_y, __pyx_v_auth_timeout, __pyx_v_tls_verify, __pyx_v_tls_ca, __pyx_v_tls_roots, __pyx_v_max_buf_size, __pyx_v_retry_timeout, __pyx_v_request_min_throughput, __pyx_v_request_timeout, __pyx_v_auto_flush, __pyx_v_auto_flush_rows, __pyx_v_auto_flush_bytes, __pyx_v_auto_flush_interval, __pyx_v_init_buf_size, __pyx_v_max_name_len);
/* … */
  if (PyDict_SetItem(__pyx_t_19, __pyx_n_s_max_name_len, Py_None) < 0) __PYX_ERR(0, 1999, __pyx_L1_error)
 2023:         """
 2024:         Construct a sender from a :ref:`configuration string <sender_conf>`.
 2025: 
 2026:         The additional arguments are used to specify additional parameters
 2027:         which are not present in the configuration string.
 2028: 
 2029:         Note that any parameters already present in the configuration string
 2030:         cannot be overridden.
 2031:         """
 2032: 
+2033:         cdef line_sender_error* err = NULL
  __pyx_v_err = NULL;
 2034:         cdef object protocol
 2035:         cdef Sender sender
 2036:         cdef str synthetic_conf_str
 2037:         cdef line_sender_utf8 c_synthetic_conf_str
 2038:         cdef dict params
+2039:         cdef qdb_pystr_buf* b = qdb_pystr_buf_new()
  __pyx_v_b = qdb_pystr_buf_new();
+2040:         print('Sender.from_conf')
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__38, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2040, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
/* … */
  __pyx_tuple__38 = PyTuple_Pack(1, __pyx_kp_u_Sender_from_conf); if (unlikely(!__pyx_tuple__38)) __PYX_ERR(0, 2040, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__38);
  __Pyx_GIVEREF(__pyx_tuple__38);
+2041:         try:
  /*try:*/ {
+2042:             protocol, params = parse_conf_str(b, conf_str)
    __pyx_t_1 = __pyx_f_7questdb_7ingress_parse_conf_str(__pyx_v_b, __pyx_v_conf_str); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2042, __pyx_L4_error)
    __Pyx_GOTREF(__pyx_t_1);
    if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
      PyObject* sequence = __pyx_t_1;
      Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
      if (unlikely(size != 2)) {
        if (size > 2) __Pyx_RaiseTooManyValuesError(2);
        else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
        __PYX_ERR(0, 2042, __pyx_L4_error)
      }
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      if (likely(PyTuple_CheckExact(sequence))) {
        __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); 
        __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); 
      } else {
        __pyx_t_2 = PyList_GET_ITEM(sequence, 0); 
        __pyx_t_3 = PyList_GET_ITEM(sequence, 1); 
      }
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      #else
      __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2042, __pyx_L4_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2042, __pyx_L4_error)
      __Pyx_GOTREF(__pyx_t_3);
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    } else {
      Py_ssize_t index = -1;
      __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2042, __pyx_L4_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_5 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_4);
      index = 0; __pyx_t_2 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_2)) goto __pyx_L6_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_2);
      index = 1; __pyx_t_3 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_3)) goto __pyx_L6_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_3);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_4), 2) < 0) __PYX_ERR(0, 2042, __pyx_L4_error)
      __pyx_t_5 = NULL;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      goto __pyx_L7_unpacking_done;
      __pyx_L6_unpacking_failed:;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_5 = NULL;
      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
      __PYX_ERR(0, 2042, __pyx_L4_error)
      __pyx_L7_unpacking_done:;
    }
    if (!(likely(PyDict_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None) || __Pyx_RaiseUnexpectedTypeError("dict", __pyx_t_3))) __PYX_ERR(0, 2042, __pyx_L4_error)
    __pyx_v_protocol = __pyx_t_2;
    __pyx_t_2 = 0;
    __pyx_v_params = ((PyObject*)__pyx_t_3);
    __pyx_t_3 = 0;
 2043: 
+2044:             addr = params.get('addr')
    if (unlikely(__pyx_v_params == Py_None)) {
      PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get");
      __PYX_ERR(0, 2044, __pyx_L4_error)
    }
    __pyx_t_1 = __Pyx_PyDict_GetItemDefault(__pyx_v_params, __pyx_n_u_addr, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2044, __pyx_L4_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_v_addr = __pyx_t_1;
    __pyx_t_1 = 0;
+2045:             if addr is None:
    __pyx_t_6 = (__pyx_v_addr == Py_None);
    if (unlikely(__pyx_t_6)) {
/* … */
    }
+2046:                 raise IngressError(
      __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_IngressError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2046, __pyx_L4_error)
      __Pyx_GOTREF(__pyx_t_3);
+2047:                     IngressErrorCode.ConfigError,
      __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_IngressErrorCode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2047, __pyx_L4_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_ConfigError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2047, __pyx_L4_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = NULL;
      __pyx_t_7 = 0;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_2)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_2);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
          __pyx_t_7 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_t_4, __pyx_kp_u_Missing_addr_parameter_in_config};
        __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_7, 2+__pyx_t_7);
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2046, __pyx_L4_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      }
      __Pyx_Raise(__pyx_t_1, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __PYX_ERR(0, 2046, __pyx_L4_error)
 2048:                     'Missing "addr" parameter in config string')
 2049: 
+2050:             if 'tls_roots_password' in params:
    if (unlikely(__pyx_v_params == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
      __PYX_ERR(0, 2050, __pyx_L4_error)
    }
    __pyx_t_6 = (__Pyx_PyDict_ContainsTF(__pyx_n_u_tls_roots_password, __pyx_v_params, Py_EQ)); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 2050, __pyx_L4_error)
    if (unlikely(__pyx_t_6)) {
/* … */
    }
+2051:                 raise IngressError(
      __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_IngressError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2051, __pyx_L4_error)
      __Pyx_GOTREF(__pyx_t_3);
+2052:                     IngressErrorCode.ConfigError,
      __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_IngressErrorCode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2052, __pyx_L4_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_ConfigError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2052, __pyx_L4_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = NULL;
      __pyx_t_7 = 0;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_4)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
          __pyx_t_7 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[3] = {__pyx_t_4, __pyx_t_2, __pyx_kp_u_tls_roots_password_is_not_suppo};
        __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_7, 2+__pyx_t_7);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2051, __pyx_L4_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      }
      __Pyx_Raise(__pyx_t_1, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __PYX_ERR(0, 2051, __pyx_L4_error)
 2053:                     '"tls_roots_password" is not supported in the conf_str.')
 2054: 
 2055:             # add fields to the dictionary, so long as they aren't already
 2056:             # present in the params dictionary
+2057:             for override_key, override_value in {
    __pyx_t_8 = 0;
/* … */
    while (1) {
/* … */
      __Pyx_XDECREF_SET(__pyx_v_override_key, __pyx_t_2);
      __pyx_t_2 = 0;
      __Pyx_XDECREF_SET(__pyx_v_override_value, __pyx_t_3);
      __pyx_t_3 = 0;
+2058:                 'bind_interface': bind_interface,
    __pyx_t_3 = __Pyx_PyDict_NewPresized(20); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2058, __pyx_L4_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_bind_interface, __pyx_v_bind_interface) < 0) __PYX_ERR(0, 2058, __pyx_L4_error)
/* … */
    __pyx_t_2 = __Pyx_dict_iterator(__pyx_t_3, 1, __pyx_n_s_items, (&__pyx_t_9), (&__pyx_t_7)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2058, __pyx_L4_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF(__pyx_t_1);
    __pyx_t_1 = __pyx_t_2;
    __pyx_t_2 = 0;
/* … */
      __pyx_t_10 = __Pyx_dict_iter_next(__pyx_t_1, __pyx_t_9, &__pyx_t_8, &__pyx_t_2, &__pyx_t_3, NULL, __pyx_t_7);
      if (unlikely(__pyx_t_10 == 0)) break;
      if (unlikely(__pyx_t_10 == -1)) __PYX_ERR(0, 2058, __pyx_L4_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_GOTREF(__pyx_t_3);
+2059:                 'username': username,
    if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_username, __pyx_v_username) < 0) __PYX_ERR(0, 2058, __pyx_L4_error)
+2060:                 'password': password,
    if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_password, __pyx_v_password) < 0) __PYX_ERR(0, 2058, __pyx_L4_error)
+2061:                 'token': token,
    if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_token, __pyx_v_token) < 0) __PYX_ERR(0, 2058, __pyx_L4_error)
+2062:                 'token_x': token_x,
    if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_token_x, __pyx_v_token_x) < 0) __PYX_ERR(0, 2058, __pyx_L4_error)
+2063:                 'token_y': token_y,
    if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_token_y, __pyx_v_token_y) < 0) __PYX_ERR(0, 2058, __pyx_L4_error)
+2064:                 'auth_timeout': auth_timeout,
    if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_auth_timeout, __pyx_v_auth_timeout) < 0) __PYX_ERR(0, 2058, __pyx_L4_error)
+2065:                 'tls_verify': tls_verify,
    if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_tls_verify, __pyx_v_tls_verify) < 0) __PYX_ERR(0, 2058, __pyx_L4_error)
+2066:                 'tls_ca': tls_ca,
    if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_tls_ca, __pyx_v_tls_ca) < 0) __PYX_ERR(0, 2058, __pyx_L4_error)
+2067:                 'tls_roots': tls_roots,
    if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_tls_roots, __pyx_v_tls_roots) < 0) __PYX_ERR(0, 2058, __pyx_L4_error)
+2068:                 'max_buf_size': max_buf_size,
    if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_max_buf_size, __pyx_v_max_buf_size) < 0) __PYX_ERR(0, 2058, __pyx_L4_error)
+2069:                 'retry_timeout': retry_timeout,
    if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_retry_timeout, __pyx_v_retry_timeout) < 0) __PYX_ERR(0, 2058, __pyx_L4_error)
+2070:                 'request_min_throughput': request_min_throughput,
    if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_request_min_throughput, __pyx_v_request_min_throughput) < 0) __PYX_ERR(0, 2058, __pyx_L4_error)
+2071:                 'request_timeout': request_timeout,
    if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_request_timeout, __pyx_v_request_timeout) < 0) __PYX_ERR(0, 2058, __pyx_L4_error)
+2072:                 'auto_flush': auto_flush,
    if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_auto_flush, __pyx_v_auto_flush) < 0) __PYX_ERR(0, 2058, __pyx_L4_error)
+2073:                 'auto_flush_rows': auto_flush_rows,
    if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_auto_flush_rows, __pyx_v_auto_flush_rows) < 0) __PYX_ERR(0, 2058, __pyx_L4_error)
+2074:                 'auto_flush_bytes': auto_flush_bytes,
    if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_auto_flush_bytes, __pyx_v_auto_flush_bytes) < 0) __PYX_ERR(0, 2058, __pyx_L4_error)
+2075:                 'auto_flush_interval': auto_flush_interval,
    if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_auto_flush_interval, __pyx_v_auto_flush_interval) < 0) __PYX_ERR(0, 2058, __pyx_L4_error)
+2076:                 'init_buf_size': init_buf_size,
    if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_init_buf_size, __pyx_v_init_buf_size) < 0) __PYX_ERR(0, 2058, __pyx_L4_error)
+2077:                 'max_name_len': max_name_len,
    if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_max_name_len, __pyx_v_max_name_len) < 0) __PYX_ERR(0, 2058, __pyx_L4_error)
 2078:             }.items():
+2079:                 if override_value is None:
      __pyx_t_6 = (__pyx_v_override_value == Py_None);
      if (__pyx_t_6) {
/* … */
      }
+2080:                     continue
        goto __pyx_L10_continue;
+2081:                 if override_key in params:
      if (unlikely(__pyx_v_params == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
        __PYX_ERR(0, 2081, __pyx_L4_error)
      }
      __pyx_t_6 = (__Pyx_PyDict_ContainsTF(__pyx_v_override_key, __pyx_v_params, Py_EQ)); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 2081, __pyx_L4_error)
      if (unlikely(__pyx_t_6)) {
/* … */
      }
+2082:                     raise ValueError(
        __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2082, __pyx_L4_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_Raise(__pyx_t_3, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __PYX_ERR(0, 2082, __pyx_L4_error)
+2083:                         f'"{override_key}" is already present in the conf_str '
        __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2083, __pyx_L4_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_11 = 0;
        __pyx_t_12 = 127;
        __Pyx_INCREF(__pyx_kp_u__39);
        __pyx_t_11 += 1;
        __Pyx_GIVEREF(__pyx_kp_u__39);
        PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_kp_u__39);
        __pyx_t_2 = __Pyx_PyObject_FormatSimple(__pyx_v_override_key, __pyx_empty_unicode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2083, __pyx_L4_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_12 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2) > __pyx_t_12) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2) : __pyx_t_12;
        __pyx_t_11 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2);
        __Pyx_GIVEREF(__pyx_t_2);
        PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2);
        __pyx_t_2 = 0;
        __Pyx_INCREF(__pyx_kp_u_is_already_present_in_the_conf);
        __pyx_t_11 += 62;
        __Pyx_GIVEREF(__pyx_kp_u_is_already_present_in_the_conf);
        PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_kp_u_is_already_present_in_the_conf);
        __pyx_t_2 = __Pyx_PyUnicode_Join(__pyx_t_3, 3, __pyx_t_11, __pyx_t_12); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2083, __pyx_L4_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 2084:                         'and cannot be overridden.')
+2085:                 params[override_key] = override_value
      if (unlikely(__pyx_v_params == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
        __PYX_ERR(0, 2085, __pyx_L4_error)
      }
      if (unlikely((PyDict_SetItem(__pyx_v_params, __pyx_v_override_key, __pyx_v_override_value) < 0))) __PYX_ERR(0, 2085, __pyx_L4_error)
      __pyx_L10_continue:;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 2086: 
+2087:             sender = Sender.__new__(Sender)
    __pyx_t_1 = ((PyObject *)__pyx_tp_new_7questdb_7ingress_Sender(((PyTypeObject *)__pyx_ptype_7questdb_7ingress_Sender), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2087, __pyx_L4_error)
    __Pyx_GOTREF((PyObject *)__pyx_t_1);
    __pyx_v_sender = ((struct __pyx_obj_7questdb_7ingress_Sender *)__pyx_t_1);
    __pyx_t_1 = 0;
 2088: 
 2089:             # Forward only the `addr=` parameter to the C API.
+2090:             synthetic_conf_str = f'{protocol.tag}::addr={addr};'
    __pyx_t_1 = PyTuple_New(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2090, __pyx_L4_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_9 = 0;
    __pyx_t_12 = 127;
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_protocol, __pyx_n_s_tag); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2090, __pyx_L4_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = __Pyx_PyObject_FormatSimple(__pyx_t_3, __pyx_empty_unicode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2090, __pyx_L4_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_12 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2) > __pyx_t_12) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2) : __pyx_t_12;
    __pyx_t_9 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
    __pyx_t_2 = 0;
    __Pyx_INCREF(__pyx_kp_u_addr_2);
    __pyx_t_9 += 7;
    __Pyx_GIVEREF(__pyx_kp_u_addr_2);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_kp_u_addr_2);
    __pyx_t_2 = __Pyx_PyObject_FormatSimple(__pyx_v_addr, __pyx_empty_unicode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2090, __pyx_L4_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_12 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2) > __pyx_t_12) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2) : __pyx_t_12;
    __pyx_t_9 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_t_2);
    __pyx_t_2 = 0;
    __Pyx_INCREF(__pyx_kp_u__40);
    __pyx_t_9 += 1;
    __Pyx_GIVEREF(__pyx_kp_u__40);
    PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_kp_u__40);
    __pyx_t_2 = __Pyx_PyUnicode_Join(__pyx_t_1, 4, __pyx_t_9, __pyx_t_12); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2090, __pyx_L4_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_v_synthetic_conf_str = ((PyObject*)__pyx_t_2);
    __pyx_t_2 = 0;
+2091:             str_to_utf8(b, <PyObject*>synthetic_conf_str, &c_synthetic_conf_str)
    __pyx_t_13 = __pyx_f_7questdb_7ingress_str_to_utf8(__pyx_v_b, ((PyObject *)__pyx_v_synthetic_conf_str), (&__pyx_v_c_synthetic_conf_str)); if (unlikely(__pyx_t_13 == ((__pyx_t_7questdb_7ingress_void_int)-1))) __PYX_ERR(0, 2091, __pyx_L4_error)
+2092:             sender._opts = line_sender_opts_from_conf(
    __pyx_v_sender->_opts = line_sender_opts_from_conf(__pyx_v_c_synthetic_conf_str, (&__pyx_v_err));
 2093:                 c_synthetic_conf_str, &err)
 2094: 
+2095:             sender._set_sender_fields(
    __pyx_t_13 = ((struct __pyx_vtabstruct_7questdb_7ingress_Sender *)__pyx_v_sender->__pyx_vtab)->_set_sender_fields(__pyx_v_sender, __pyx_v_b, __pyx_v_protocol, ((PyObject*)__pyx_t_2), ((PyObject*)__pyx_t_1), ((PyObject*)__pyx_t_3), ((PyObject*)__pyx_t_4), ((PyObject*)__pyx_t_14), ((PyObject*)__pyx_t_15), __pyx_t_16, __pyx_t_17, __pyx_t_18, __pyx_t_19, __pyx_t_20, __pyx_t_21, __pyx_t_22, __pyx_t_23, __pyx_t_24, __pyx_t_25, __pyx_t_26, __pyx_t_27, __pyx_t_28, __pyx_t_29); if (unlikely(__pyx_t_13 == ((__pyx_t_7questdb_7ingress_void_int)-1))) __PYX_ERR(0, 2095, __pyx_L4_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
    __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
    __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
    __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
    __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
    __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
    __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
    __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
    __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
    __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0;
    __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0;
    __Pyx_DECREF(__pyx_t_25); __pyx_t_25 = 0;
    __Pyx_DECREF(__pyx_t_26); __pyx_t_26 = 0;
    __Pyx_DECREF(__pyx_t_27); __pyx_t_27 = 0;
    __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0;
    __Pyx_DECREF(__pyx_t_29); __pyx_t_29 = 0;
 2096:                 b,
 2097:                 protocol,
+2098:                 params.get('bind_interface'),
    if (unlikely(__pyx_v_params == Py_None)) {
      PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get");
      __PYX_ERR(0, 2098, __pyx_L4_error)
    }
    __pyx_t_2 = __Pyx_PyDict_GetItemDefault(__pyx_v_params, __pyx_n_u_bind_interface, Py_None); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2098, __pyx_L4_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (!(likely(PyUnicode_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None) || __Pyx_RaiseUnexpectedTypeError("unicode", __pyx_t_2))) __PYX_ERR(0, 2098, __pyx_L4_error)
+2099:                 params.get('username'),
    if (unlikely(__pyx_v_params == Py_None)) {
      PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get");
      __PYX_ERR(0, 2099, __pyx_L4_error)
    }
    __pyx_t_1 = __Pyx_PyDict_GetItemDefault(__pyx_v_params, __pyx_n_u_username, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2099, __pyx_L4_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (!(likely(PyUnicode_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("unicode", __pyx_t_1))) __PYX_ERR(0, 2099, __pyx_L4_error)
+2100:                 params.get('password'),
    if (unlikely(__pyx_v_params == Py_None)) {
      PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get");
      __PYX_ERR(0, 2100, __pyx_L4_error)
    }
    __pyx_t_3 = __Pyx_PyDict_GetItemDefault(__pyx_v_params, __pyx_n_u_password, Py_None); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2100, __pyx_L4_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (!(likely(PyUnicode_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None) || __Pyx_RaiseUnexpectedTypeError("unicode", __pyx_t_3))) __PYX_ERR(0, 2100, __pyx_L4_error)
+2101:                 params.get('token'),
    if (unlikely(__pyx_v_params == Py_None)) {
      PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get");
      __PYX_ERR(0, 2101, __pyx_L4_error)
    }
    __pyx_t_4 = __Pyx_PyDict_GetItemDefault(__pyx_v_params, __pyx_n_u_token, Py_None); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2101, __pyx_L4_error)
    __Pyx_GOTREF(__pyx_t_4);
    if (!(likely(PyUnicode_CheckExact(__pyx_t_4))||((__pyx_t_4) == Py_None) || __Pyx_RaiseUnexpectedTypeError("unicode", __pyx_t_4))) __PYX_ERR(0, 2101, __pyx_L4_error)
+2102:                 params.get('token_x'),
    if (unlikely(__pyx_v_params == Py_None)) {
      PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get");
      __PYX_ERR(0, 2102, __pyx_L4_error)
    }
    __pyx_t_14 = __Pyx_PyDict_GetItemDefault(__pyx_v_params, __pyx_n_u_token_x, Py_None); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2102, __pyx_L4_error)
    __Pyx_GOTREF(__pyx_t_14);
    if (!(likely(PyUnicode_CheckExact(__pyx_t_14))||((__pyx_t_14) == Py_None) || __Pyx_RaiseUnexpectedTypeError("unicode", __pyx_t_14))) __PYX_ERR(0, 2102, __pyx_L4_error)
+2103:                 params.get('token_y'),
    if (unlikely(__pyx_v_params == Py_None)) {
      PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get");
      __PYX_ERR(0, 2103, __pyx_L4_error)
    }
    __pyx_t_15 = __Pyx_PyDict_GetItemDefault(__pyx_v_params, __pyx_n_u_token_y, Py_None); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2103, __pyx_L4_error)
    __Pyx_GOTREF(__pyx_t_15);
    if (!(likely(PyUnicode_CheckExact(__pyx_t_15))||((__pyx_t_15) == Py_None) || __Pyx_RaiseUnexpectedTypeError("unicode", __pyx_t_15))) __PYX_ERR(0, 2103, __pyx_L4_error)
+2104:                 params.get('auth_timeout'),
    if (unlikely(__pyx_v_params == Py_None)) {
      PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get");
      __PYX_ERR(0, 2104, __pyx_L4_error)
    }
    __pyx_t_16 = __Pyx_PyDict_GetItemDefault(__pyx_v_params, __pyx_n_u_auth_timeout, Py_None); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 2104, __pyx_L4_error)
    __Pyx_GOTREF(__pyx_t_16);
+2105:                 params.get('tls_verify'),
    if (unlikely(__pyx_v_params == Py_None)) {
      PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get");
      __PYX_ERR(0, 2105, __pyx_L4_error)
    }
    __pyx_t_17 = __Pyx_PyDict_GetItemDefault(__pyx_v_params, __pyx_n_u_tls_verify, Py_None); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 2105, __pyx_L4_error)
    __Pyx_GOTREF(__pyx_t_17);
+2106:                 params.get('tls_ca'),
    if (unlikely(__pyx_v_params == Py_None)) {
      PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get");
      __PYX_ERR(0, 2106, __pyx_L4_error)
    }
    __pyx_t_18 = __Pyx_PyDict_GetItemDefault(__pyx_v_params, __pyx_n_u_tls_ca, Py_None); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 2106, __pyx_L4_error)
    __Pyx_GOTREF(__pyx_t_18);
+2107:                 params.get('tls_roots'),
    if (unlikely(__pyx_v_params == Py_None)) {
      PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get");
      __PYX_ERR(0, 2107, __pyx_L4_error)
    }
    __pyx_t_19 = __Pyx_PyDict_GetItemDefault(__pyx_v_params, __pyx_n_u_tls_roots, Py_None); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 2107, __pyx_L4_error)
    __Pyx_GOTREF(__pyx_t_19);
+2108:                 params.get('max_buf_size'),
    if (unlikely(__pyx_v_params == Py_None)) {
      PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get");
      __PYX_ERR(0, 2108, __pyx_L4_error)
    }
    __pyx_t_20 = __Pyx_PyDict_GetItemDefault(__pyx_v_params, __pyx_n_u_max_buf_size, Py_None); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 2108, __pyx_L4_error)
    __Pyx_GOTREF(__pyx_t_20);
+2109:                 params.get('retry_timeout'),
    if (unlikely(__pyx_v_params == Py_None)) {
      PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get");
      __PYX_ERR(0, 2109, __pyx_L4_error)
    }
    __pyx_t_21 = __Pyx_PyDict_GetItemDefault(__pyx_v_params, __pyx_n_u_retry_timeout, Py_None); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 2109, __pyx_L4_error)
    __Pyx_GOTREF(__pyx_t_21);
+2110:                 params.get('request_min_throughput'),
    if (unlikely(__pyx_v_params == Py_None)) {
      PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get");
      __PYX_ERR(0, 2110, __pyx_L4_error)
    }
    __pyx_t_22 = __Pyx_PyDict_GetItemDefault(__pyx_v_params, __pyx_n_u_request_min_throughput, Py_None); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 2110, __pyx_L4_error)
    __Pyx_GOTREF(__pyx_t_22);
+2111:                 params.get('request_timeout'),
    if (unlikely(__pyx_v_params == Py_None)) {
      PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get");
      __PYX_ERR(0, 2111, __pyx_L4_error)
    }
    __pyx_t_23 = __Pyx_PyDict_GetItemDefault(__pyx_v_params, __pyx_n_u_request_timeout, Py_None); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 2111, __pyx_L4_error)
    __Pyx_GOTREF(__pyx_t_23);
+2112:                 params.get('auto_flush'),
    if (unlikely(__pyx_v_params == Py_None)) {
      PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get");
      __PYX_ERR(0, 2112, __pyx_L4_error)
    }
    __pyx_t_24 = __Pyx_PyDict_GetItemDefault(__pyx_v_params, __pyx_n_u_auto_flush, Py_None); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 2112, __pyx_L4_error)
    __Pyx_GOTREF(__pyx_t_24);
+2113:                 params.get('auto_flush_rows'),
    if (unlikely(__pyx_v_params == Py_None)) {
      PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get");
      __PYX_ERR(0, 2113, __pyx_L4_error)
    }
    __pyx_t_25 = __Pyx_PyDict_GetItemDefault(__pyx_v_params, __pyx_n_u_auto_flush_rows, Py_None); if (unlikely(!__pyx_t_25)) __PYX_ERR(0, 2113, __pyx_L4_error)
    __Pyx_GOTREF(__pyx_t_25);
+2114:                 params.get('auto_flush_bytes'),
    if (unlikely(__pyx_v_params == Py_None)) {
      PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get");
      __PYX_ERR(0, 2114, __pyx_L4_error)
    }
    __pyx_t_26 = __Pyx_PyDict_GetItemDefault(__pyx_v_params, __pyx_n_u_auto_flush_bytes, Py_None); if (unlikely(!__pyx_t_26)) __PYX_ERR(0, 2114, __pyx_L4_error)
    __Pyx_GOTREF(__pyx_t_26);
+2115:                 params.get('auto_flush_interval'),
    if (unlikely(__pyx_v_params == Py_None)) {
      PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get");
      __PYX_ERR(0, 2115, __pyx_L4_error)
    }
    __pyx_t_27 = __Pyx_PyDict_GetItemDefault(__pyx_v_params, __pyx_n_u_auto_flush_interval, Py_None); if (unlikely(!__pyx_t_27)) __PYX_ERR(0, 2115, __pyx_L4_error)
    __Pyx_GOTREF(__pyx_t_27);
+2116:                 params.get('init_buf_size'),
    if (unlikely(__pyx_v_params == Py_None)) {
      PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get");
      __PYX_ERR(0, 2116, __pyx_L4_error)
    }
    __pyx_t_28 = __Pyx_PyDict_GetItemDefault(__pyx_v_params, __pyx_n_u_init_buf_size, Py_None); if (unlikely(!__pyx_t_28)) __PYX_ERR(0, 2116, __pyx_L4_error)
    __Pyx_GOTREF(__pyx_t_28);
+2117:                 params.get('max_name_len'))
    if (unlikely(__pyx_v_params == Py_None)) {
      PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get");
      __PYX_ERR(0, 2117, __pyx_L4_error)
    }
    __pyx_t_29 = __Pyx_PyDict_GetItemDefault(__pyx_v_params, __pyx_n_u_max_name_len, Py_None); if (unlikely(!__pyx_t_29)) __PYX_ERR(0, 2117, __pyx_L4_error)
    __Pyx_GOTREF(__pyx_t_29);
 2118: 
+2119:             return sender
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF((PyObject *)__pyx_v_sender);
    __pyx_r = ((PyObject *)__pyx_v_sender);
    goto __pyx_L3_return;
  }
 2120:         finally:
+2121:             qdb_pystr_buf_free(b)
  /*finally:*/ {
    __pyx_L4_error:;
    /*exception exit:*/{
      __Pyx_PyThreadState_declare
      __Pyx_PyThreadState_assign
      __pyx_t_31 = 0; __pyx_t_32 = 0; __pyx_t_33 = 0; __pyx_t_34 = 0; __pyx_t_35 = 0; __pyx_t_36 = 0;
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
      __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
      __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
      __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
      __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
      __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0;
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_XDECREF(__pyx_t_20); __pyx_t_20 = 0;
      __Pyx_XDECREF(__pyx_t_21); __pyx_t_21 = 0;
      __Pyx_XDECREF(__pyx_t_22); __pyx_t_22 = 0;
      __Pyx_XDECREF(__pyx_t_23); __pyx_t_23 = 0;
      __Pyx_XDECREF(__pyx_t_24); __pyx_t_24 = 0;
      __Pyx_XDECREF(__pyx_t_25); __pyx_t_25 = 0;
      __Pyx_XDECREF(__pyx_t_26); __pyx_t_26 = 0;
      __Pyx_XDECREF(__pyx_t_27); __pyx_t_27 = 0;
      __Pyx_XDECREF(__pyx_t_28); __pyx_t_28 = 0;
      __Pyx_XDECREF(__pyx_t_29); __pyx_t_29 = 0;
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_34, &__pyx_t_35, &__pyx_t_36);
      if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_31, &__pyx_t_32, &__pyx_t_33) < 0)) __Pyx_ErrFetch(&__pyx_t_31, &__pyx_t_32, &__pyx_t_33);
      __Pyx_XGOTREF(__pyx_t_31);
      __Pyx_XGOTREF(__pyx_t_32);
      __Pyx_XGOTREF(__pyx_t_33);
      __Pyx_XGOTREF(__pyx_t_34);
      __Pyx_XGOTREF(__pyx_t_35);
      __Pyx_XGOTREF(__pyx_t_36);
      __pyx_t_7 = __pyx_lineno; __pyx_t_10 = __pyx_clineno; __pyx_t_30 = __pyx_filename;
      {
        qdb_pystr_buf_free(__pyx_v_b);
      }
      if (PY_MAJOR_VERSION >= 3) {
        __Pyx_XGIVEREF(__pyx_t_34);
        __Pyx_XGIVEREF(__pyx_t_35);
        __Pyx_XGIVEREF(__pyx_t_36);
        __Pyx_ExceptionReset(__pyx_t_34, __pyx_t_35, __pyx_t_36);
      }
      __Pyx_XGIVEREF(__pyx_t_31);
      __Pyx_XGIVEREF(__pyx_t_32);
      __Pyx_XGIVEREF(__pyx_t_33);
      __Pyx_ErrRestore(__pyx_t_31, __pyx_t_32, __pyx_t_33);
      __pyx_t_31 = 0; __pyx_t_32 = 0; __pyx_t_33 = 0; __pyx_t_34 = 0; __pyx_t_35 = 0; __pyx_t_36 = 0;
      __pyx_lineno = __pyx_t_7; __pyx_clineno = __pyx_t_10; __pyx_filename = __pyx_t_30;
      goto __pyx_L1_error;
    }
    __pyx_L3_return: {
      __pyx_t_36 = __pyx_r;
      __pyx_r = 0;
      qdb_pystr_buf_free(__pyx_v_b);
      __pyx_r = __pyx_t_36;
      __pyx_t_36 = 0;
      goto __pyx_L0;
    }
  }
 2122: 
+2123:     @staticmethod
/* Python wrapper */
static PyObject *__pyx_pw_7questdb_7ingress_6Sender_7from_env(CYTHON_UNUSED PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7questdb_7ingress_6Sender_6from_env, "\n        Construct a sender from the ``QDB_CLIENT_CONF`` environment variable.\n\n        The environment variable must be set to a valid\n        :ref:`configuration string <sender_conf>`.\n\n        The additional arguments are used to specify additional parameters\n        which are not present in the configuration string.\n\n        Note that any parameters already present in the configuration string\n        cannot be overridden.\n        ");
static PyMethodDef __pyx_mdef_7questdb_7ingress_6Sender_7from_env = {"from_env", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7questdb_7ingress_6Sender_7from_env, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7questdb_7ingress_6Sender_6from_env};
static PyObject *__pyx_pw_7questdb_7ingress_6Sender_7from_env(CYTHON_UNUSED PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_bind_interface = 0;
  PyObject *__pyx_v_username = 0;
  PyObject *__pyx_v_password = 0;
  PyObject *__pyx_v_token = 0;
  PyObject *__pyx_v_token_x = 0;
  PyObject *__pyx_v_token_y = 0;
  PyObject *__pyx_v_auth_timeout = 0;
  PyObject *__pyx_v_tls_verify = 0;
  PyObject *__pyx_v_tls_ca = 0;
  PyObject *__pyx_v_tls_roots = 0;
  PyObject *__pyx_v_max_buf_size = 0;
  PyObject *__pyx_v_retry_timeout = 0;
  PyObject *__pyx_v_request_min_throughput = 0;
  PyObject *__pyx_v_request_timeout = 0;
  PyObject *__pyx_v_auto_flush = 0;
  PyObject *__pyx_v_auto_flush_rows = 0;
  PyObject *__pyx_v_auto_flush_bytes = 0;
  PyObject *__pyx_v_auto_flush_interval = 0;
  PyObject *__pyx_v_init_buf_size = 0;
  PyObject *__pyx_v_max_name_len = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("from_env (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_bind_interface,&__pyx_n_s_username,&__pyx_n_s_password,&__pyx_n_s_token,&__pyx_n_s_token_x,&__pyx_n_s_token_y,&__pyx_n_s_auth_timeout,&__pyx_n_s_tls_verify,&__pyx_n_s_tls_ca,&__pyx_n_s_tls_roots,&__pyx_n_s_max_buf_size,&__pyx_n_s_retry_timeout,&__pyx_n_s_request_min_throughput,&__pyx_n_s_request_timeout,&__pyx_n_s_auto_flush,&__pyx_n_s_auto_flush_rows,&__pyx_n_s_auto_flush_bytes,&__pyx_n_s_auto_flush_interval,&__pyx_n_s_init_buf_size,&__pyx_n_s_max_name_len,0};
  PyObject* values[20] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
/* … */
  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7questdb_7ingress_6Sender_6from_env(PyObject *__pyx_v_bind_interface, PyObject *__pyx_v_username, PyObject *__pyx_v_password, PyObject *__pyx_v_token, PyObject *__pyx_v_token_x, PyObject *__pyx_v_token_y, PyObject *__pyx_v_auth_timeout, PyObject *__pyx_v_tls_verify, PyObject *__pyx_v_tls_ca, PyObject *__pyx_v_tls_roots, PyObject *__pyx_v_max_buf_size, PyObject *__pyx_v_retry_timeout, PyObject *__pyx_v_request_min_throughput, PyObject *__pyx_v_request_timeout, PyObject *__pyx_v_auto_flush, PyObject *__pyx_v_auto_flush_rows, PyObject *__pyx_v_auto_flush_bytes, PyObject *__pyx_v_auto_flush_interval, PyObject *__pyx_v_init_buf_size, PyObject *__pyx_v_max_name_len) {
  PyObject *__pyx_v_conf_str = 0;
  PyObject *__pyx_r = NULL;
/* … */
  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("questdb.ingress.Sender.from_env", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_conf_str);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
/* … */
  __pyx_tuple__97 = PyTuple_Pack(21, __pyx_n_s_bind_interface, __pyx_n_s_username, __pyx_n_s_password, __pyx_n_s_token, __pyx_n_s_token_x, __pyx_n_s_token_y, __pyx_n_s_auth_timeout, __pyx_n_s_tls_verify, __pyx_n_s_tls_ca, __pyx_n_s_tls_roots, __pyx_n_s_max_buf_size, __pyx_n_s_retry_timeout, __pyx_n_s_request_min_throughput, __pyx_n_s_request_timeout, __pyx_n_s_auto_flush, __pyx_n_s_auto_flush_rows, __pyx_n_s_auto_flush_bytes, __pyx_n_s_auto_flush_interval, __pyx_n_s_init_buf_size, __pyx_n_s_max_name_len, __pyx_n_s_conf_str); if (unlikely(!__pyx_tuple__97)) __PYX_ERR(0, 2123, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__97);
  __Pyx_GIVEREF(__pyx_tuple__97);
/* … */
  __pyx_t_19 = __Pyx_PyDict_NewPresized(20); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 2123, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_19);
/* … */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_7questdb_7ingress_6Sender_7from_env, __Pyx_CYFUNCTION_STATICMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Sender_from_env, NULL, __pyx_n_s_questdb_ingress, __pyx_d, ((PyObject *)__pyx_codeobj__98)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2123, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_CyFunction_SetDefaultsKwDict(__pyx_t_3, __pyx_t_19);
  __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_7questdb_7ingress_Sender, __pyx_n_s_from_env, __pyx_t_3) < 0) __PYX_ERR(0, 2123, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_7questdb_7ingress_Sender);
  __Pyx_GetNameInClass(__pyx_t_3, (PyObject *)__pyx_ptype_7questdb_7ingress_Sender, __pyx_n_s_from_env); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2123, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_19 = __Pyx_PyObject_CallOneArg(__pyx_builtin_staticmethod, __pyx_t_3); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 2123, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_19);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_7questdb_7ingress_Sender, __pyx_n_s_from_env, __pyx_t_19) < 0) __PYX_ERR(0, 2123, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
  PyType_Modified(__pyx_ptype_7questdb_7ingress_Sender);
  __pyx_codeobj__98 = (PyObject*)__Pyx_PyCode_New(0, 0, 20, 21, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__97, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_questdb_ingress_pyx, __pyx_n_s_from_env, 2123, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__98)) __PYX_ERR(0, 2123, __pyx_L1_error)
 2124:     def from_env(
 2125:             *,
+2126:             str bind_interface=None,
    values[0] = __Pyx_Arg_NewRef_FASTCALL(((PyObject*)Py_None));
/* … */
  if (PyDict_SetItem(__pyx_t_19, __pyx_n_s_bind_interface, Py_None) < 0) __PYX_ERR(0, 2123, __pyx_L1_error)
+2127:             str username=None,
    values[1] = __Pyx_Arg_NewRef_FASTCALL(((PyObject*)Py_None));
/* … */
  if (PyDict_SetItem(__pyx_t_19, __pyx_n_s_username, Py_None) < 0) __PYX_ERR(0, 2123, __pyx_L1_error)
+2128:             str password=None,
    values[2] = __Pyx_Arg_NewRef_FASTCALL(((PyObject*)Py_None));
/* … */
  if (PyDict_SetItem(__pyx_t_19, __pyx_n_s_password, Py_None) < 0) __PYX_ERR(0, 2123, __pyx_L1_error)
+2129:             str token=None,
    values[3] = __Pyx_Arg_NewRef_FASTCALL(((PyObject*)Py_None));
/* … */
  if (PyDict_SetItem(__pyx_t_19, __pyx_n_s_token, Py_None) < 0) __PYX_ERR(0, 2123, __pyx_L1_error)
+2130:             str token_x=None,
    values[4] = __Pyx_Arg_NewRef_FASTCALL(((PyObject*)Py_None));
/* … */
  if (PyDict_SetItem(__pyx_t_19, __pyx_n_s_token_x, Py_None) < 0) __PYX_ERR(0, 2123, __pyx_L1_error)
+2131:             str token_y=None,
    values[5] = __Pyx_Arg_NewRef_FASTCALL(((PyObject*)Py_None));
/* … */
  if (PyDict_SetItem(__pyx_t_19, __pyx_n_s_token_y, Py_None) < 0) __PYX_ERR(0, 2123, __pyx_L1_error)
+2132:             object auth_timeout=None,  # default: 15000 milliseconds
    values[6] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
/* … */
  if (PyDict_SetItem(__pyx_t_19, __pyx_n_s_auth_timeout, Py_None) < 0) __PYX_ERR(0, 2123, __pyx_L1_error)
+2133:             object tls_verify=None,  # default: True
    values[7] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
/* … */
  if (PyDict_SetItem(__pyx_t_19, __pyx_n_s_tls_verify, Py_None) < 0) __PYX_ERR(0, 2123, __pyx_L1_error)
+2134:             object tls_ca=None,  # default: TlsCa.WebpkiRoots
    values[8] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
/* … */
  if (PyDict_SetItem(__pyx_t_19, __pyx_n_s_tls_ca, Py_None) < 0) __PYX_ERR(0, 2123, __pyx_L1_error)
+2135:             object tls_roots=None,
    values[9] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
/* … */
  if (PyDict_SetItem(__pyx_t_19, __pyx_n_s_tls_roots, Py_None) < 0) __PYX_ERR(0, 2123, __pyx_L1_error)
+2136:             object max_buf_size=None,  # 100 * 1024 * 1024 - 100MiB
    values[10] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
/* … */
  if (PyDict_SetItem(__pyx_t_19, __pyx_n_s_max_buf_size, Py_None) < 0) __PYX_ERR(0, 2123, __pyx_L1_error)
+2137:             object retry_timeout=None,  # default: 10000 milliseconds
    values[11] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
/* … */
  if (PyDict_SetItem(__pyx_t_19, __pyx_n_s_retry_timeout, Py_None) < 0) __PYX_ERR(0, 2123, __pyx_L1_error)
+2138:             object request_min_throughput=None, # default: 100 * 1024 - 100KiB/s
    values[12] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
/* … */
  if (PyDict_SetItem(__pyx_t_19, __pyx_n_s_request_min_throughput, Py_None) < 0) __PYX_ERR(0, 2123, __pyx_L1_error)
+2139:             object request_timeout=None,
    values[13] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
/* … */
  if (PyDict_SetItem(__pyx_t_19, __pyx_n_s_request_timeout, Py_None) < 0) __PYX_ERR(0, 2123, __pyx_L1_error)
+2140:             object auto_flush=None,  # Default True
    values[14] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
/* … */
  if (PyDict_SetItem(__pyx_t_19, __pyx_n_s_auto_flush, Py_None) < 0) __PYX_ERR(0, 2123, __pyx_L1_error)
+2141:             object auto_flush_rows=None,  # Default 75000 (HTTP) or 600 (TCP)
    values[15] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
/* … */
  if (PyDict_SetItem(__pyx_t_19, __pyx_n_s_auto_flush_rows, Py_None) < 0) __PYX_ERR(0, 2123, __pyx_L1_error)
+2142:             object auto_flush_bytes=None,  # Default off
    values[16] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
/* … */
  if (PyDict_SetItem(__pyx_t_19, __pyx_n_s_auto_flush_bytes, Py_None) < 0) __PYX_ERR(0, 2123, __pyx_L1_error)
+2143:             object auto_flush_interval=None,  # Default 1000 milliseconds
    values[17] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
/* … */
  if (PyDict_SetItem(__pyx_t_19, __pyx_n_s_auto_flush_interval, Py_None) < 0) __PYX_ERR(0, 2123, __pyx_L1_error)
+2144:             object init_buf_size=None,  # 64KiB
    values[18] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
/* … */
  if (PyDict_SetItem(__pyx_t_19, __pyx_n_s_init_buf_size, Py_None) < 0) __PYX_ERR(0, 2123, __pyx_L1_error)
+2145:             object max_name_len=None):  # 127
    values[19] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      if (kw_args > 0 && likely(kw_args <= 20)) {
        Py_ssize_t index;
        for (index = 0; index < 20 && kw_args > 0; index++) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, *__pyx_pyargnames[index]);
          if (value) { values[index] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2123, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, 0, "from_env") < 0)) __PYX_ERR(0, 2123, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 0)) {
      goto __pyx_L5_argtuple_error;
    } else {
    }
    __pyx_v_bind_interface = ((PyObject*)values[0]);
    __pyx_v_username = ((PyObject*)values[1]);
    __pyx_v_password = ((PyObject*)values[2]);
    __pyx_v_token = ((PyObject*)values[3]);
    __pyx_v_token_x = ((PyObject*)values[4]);
    __pyx_v_token_y = ((PyObject*)values[5]);
    __pyx_v_auth_timeout = values[6];
    __pyx_v_tls_verify = values[7];
    __pyx_v_tls_ca = values[8];
    __pyx_v_tls_roots = values[9];
    __pyx_v_max_buf_size = values[10];
    __pyx_v_retry_timeout = values[11];
    __pyx_v_request_min_throughput = values[12];
    __pyx_v_request_timeout = values[13];
    __pyx_v_auto_flush = values[14];
    __pyx_v_auto_flush_rows = values[15];
    __pyx_v_auto_flush_bytes = values[16];
    __pyx_v_auto_flush_interval = values[17];
    __pyx_v_init_buf_size = values[18];
    __pyx_v_max_name_len = values[19];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("from_env", 1, 0, 0, __pyx_nargs); __PYX_ERR(0, 2123, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("questdb.ingress.Sender.from_env", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_bind_interface), (&PyUnicode_Type), 1, "bind_interface", 1))) __PYX_ERR(0, 2126, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_username), (&PyUnicode_Type), 1, "username", 1))) __PYX_ERR(0, 2127, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_password), (&PyUnicode_Type), 1, "password", 1))) __PYX_ERR(0, 2128, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_token), (&PyUnicode_Type), 1, "token", 1))) __PYX_ERR(0, 2129, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_token_x), (&PyUnicode_Type), 1, "token_x", 1))) __PYX_ERR(0, 2130, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_token_y), (&PyUnicode_Type), 1, "token_y", 1))) __PYX_ERR(0, 2131, __pyx_L1_error)
  __pyx_r = __pyx_pf_7questdb_7ingress_6Sender_6from_env(__pyx_v_bind_interface, __pyx_v_username, __pyx_v_password, __pyx_v_token, __pyx_v_token_x, __pyx_v_token_y, __pyx_v_auth_timeout, __pyx_v_tls_verify, __pyx_v_tls_ca, __pyx_v_tls_roots, __pyx_v_max_buf_size, __pyx_v_retry_timeout, __pyx_v_request_min_throughput, __pyx_v_request_timeout, __pyx_v_auto_flush, __pyx_v_auto_flush_rows, __pyx_v_auto_flush_bytes, __pyx_v_auto_flush_interval, __pyx_v_init_buf_size, __pyx_v_max_name_len);
/* … */
  if (PyDict_SetItem(__pyx_t_19, __pyx_n_s_max_name_len, Py_None) < 0) __PYX_ERR(0, 2123, __pyx_L1_error)
 2146:         """
 2147:         Construct a sender from the ``QDB_CLIENT_CONF`` environment variable.
 2148: 
 2149:         The environment variable must be set to a valid
 2150:         :ref:`configuration string <sender_conf>`.
 2151: 
 2152:         The additional arguments are used to specify additional parameters
 2153:         which are not present in the configuration string.
 2154: 
 2155:         Note that any parameters already present in the configuration string
 2156:         cannot be overridden.
 2157:         """
+2158:         cdef str conf_str = os.environ.get('QDB_CLIENT_CONF')
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_os); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2158, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_environ); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2158, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2158, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_n_u_QDB_CLIENT_CONF};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2158, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  if (!(likely(PyUnicode_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("unicode", __pyx_t_1))) __PYX_ERR(0, 2158, __pyx_L1_error)
  __pyx_v_conf_str = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
+2159:         if conf_str is None:
  __pyx_t_5 = (__pyx_v_conf_str == ((PyObject*)Py_None));
  if (unlikely(__pyx_t_5)) {
/* … */
  }
+2160:             raise IngressError(
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_IngressError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2160, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
+2161:                 IngressErrorCode.ConfigError,
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_IngressErrorCode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2161, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_ConfigError); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2161, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = NULL;
    __pyx_t_4 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
        __pyx_t_4 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_t_6, __pyx_kp_u_Environment_variable_QDB_CLIENT};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 2+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2160, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 2160, __pyx_L1_error)
 2162:                 'Environment variable QDB_CLIENT_CONF is not set.')
+2163:         return Sender.from_conf(
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_7questdb_7ingress_Sender), __pyx_n_s_from_conf); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2163, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
/* … */
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2163, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_v_conf_str);
  __Pyx_GIVEREF(__pyx_v_conf_str);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_conf_str)) __PYX_ERR(0, 2163, __pyx_L1_error);
/* … */
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2163, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;
 2164:             conf_str,
+2165:             bind_interface=bind_interface,
  __pyx_t_6 = __Pyx_PyDict_NewPresized(20); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2165, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_bind_interface, __pyx_v_bind_interface) < 0) __PYX_ERR(0, 2165, __pyx_L1_error)
+2166:             username=username,
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_username, __pyx_v_username) < 0) __PYX_ERR(0, 2165, __pyx_L1_error)
+2167:             password=password,
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_password, __pyx_v_password) < 0) __PYX_ERR(0, 2165, __pyx_L1_error)
+2168:             token=token,
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_token, __pyx_v_token) < 0) __PYX_ERR(0, 2165, __pyx_L1_error)
+2169:             token_x=token_x,
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_token_x, __pyx_v_token_x) < 0) __PYX_ERR(0, 2165, __pyx_L1_error)
+2170:             token_y=token_y,
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_token_y, __pyx_v_token_y) < 0) __PYX_ERR(0, 2165, __pyx_L1_error)
+2171:             auth_timeout=auth_timeout,
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_auth_timeout, __pyx_v_auth_timeout) < 0) __PYX_ERR(0, 2165, __pyx_L1_error)
+2172:             tls_verify=tls_verify,
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_tls_verify, __pyx_v_tls_verify) < 0) __PYX_ERR(0, 2165, __pyx_L1_error)
+2173:             tls_ca=tls_ca,
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_tls_ca, __pyx_v_tls_ca) < 0) __PYX_ERR(0, 2165, __pyx_L1_error)
+2174:             tls_roots=tls_roots,
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_tls_roots, __pyx_v_tls_roots) < 0) __PYX_ERR(0, 2165, __pyx_L1_error)
+2175:             max_buf_size=max_buf_size,
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_max_buf_size, __pyx_v_max_buf_size) < 0) __PYX_ERR(0, 2165, __pyx_L1_error)
+2176:             retry_timeout=retry_timeout,
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_retry_timeout, __pyx_v_retry_timeout) < 0) __PYX_ERR(0, 2165, __pyx_L1_error)
+2177:             request_min_throughput=request_min_throughput,
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_request_min_throughput, __pyx_v_request_min_throughput) < 0) __PYX_ERR(0, 2165, __pyx_L1_error)
+2178:             request_timeout=request_timeout,
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_request_timeout, __pyx_v_request_timeout) < 0) __PYX_ERR(0, 2165, __pyx_L1_error)
+2179:             auto_flush=auto_flush,
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_auto_flush, __pyx_v_auto_flush) < 0) __PYX_ERR(0, 2165, __pyx_L1_error)
+2180:             auto_flush_rows=auto_flush_rows,
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_auto_flush_rows, __pyx_v_auto_flush_rows) < 0) __PYX_ERR(0, 2165, __pyx_L1_error)
+2181:             auto_flush_bytes=auto_flush_bytes,
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_auto_flush_bytes, __pyx_v_auto_flush_bytes) < 0) __PYX_ERR(0, 2165, __pyx_L1_error)
+2182:             auto_flush_interval=auto_flush_interval,
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_auto_flush_interval, __pyx_v_auto_flush_interval) < 0) __PYX_ERR(0, 2165, __pyx_L1_error)
+2183:             init_buf_size=init_buf_size,
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_init_buf_size, __pyx_v_init_buf_size) < 0) __PYX_ERR(0, 2165, __pyx_L1_error)
+2184:             max_name_len=max_name_len)
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_max_name_len, __pyx_v_max_name_len) < 0) __PYX_ERR(0, 2165, __pyx_L1_error)
 2185: 
 2186: 
+2187:     def new_buffer(self):
/* Python wrapper */
static PyObject *__pyx_pw_7questdb_7ingress_6Sender_9new_buffer(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7questdb_7ingress_6Sender_8new_buffer, "\n        Make a new configured buffer.\n\n        The buffer is set up with the configured `init_buf_size` and\n        `max_name_len`.\n        ");
static PyMethodDef __pyx_mdef_7questdb_7ingress_6Sender_9new_buffer = {"new_buffer", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7questdb_7ingress_6Sender_9new_buffer, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7questdb_7ingress_6Sender_8new_buffer};
static PyObject *__pyx_pw_7questdb_7ingress_6Sender_9new_buffer(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("new_buffer (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) {
    __Pyx_RaiseArgtupleInvalid("new_buffer", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "new_buffer", 0))) return NULL;
  __pyx_r = __pyx_pf_7questdb_7ingress_6Sender_8new_buffer(((struct __pyx_obj_7questdb_7ingress_Sender *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7questdb_7ingress_6Sender_8new_buffer(struct __pyx_obj_7questdb_7ingress_Sender *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
/* … */
  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("questdb.ingress.Sender.new_buffer", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
/* … */
  __pyx_t_19 = __Pyx_CyFunction_New(&__pyx_mdef_7questdb_7ingress_6Sender_9new_buffer, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Sender_new_buffer, NULL, __pyx_n_s_questdb_ingress, __pyx_d, ((PyObject *)__pyx_codeobj__99)); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 2187, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_19);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_7questdb_7ingress_Sender, __pyx_n_s_new_buffer, __pyx_t_19) < 0) __PYX_ERR(0, 2187, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
  PyType_Modified(__pyx_ptype_7questdb_7ingress_Sender);
/* … */
  __pyx_codeobj__99 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__48, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_questdb_ingress_pyx, __pyx_n_s_new_buffer, 2187, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__99)) __PYX_ERR(0, 2187, __pyx_L1_error)
 2188:         """
 2189:         Make a new configured buffer.
 2190: 
 2191:         The buffer is set up with the configured `init_buf_size` and
 2192:         `max_name_len`.
 2193:         """
+2194:         return Buffer(
  __Pyx_XDECREF(__pyx_r);
/* … */
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7questdb_7ingress_Buffer), __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2194, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;
+2195:             init_buf_size=self._init_buf_size,
  __pyx_t_1 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2195, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_FromSize_t(__pyx_v_self->_init_buf_size); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2195, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_init_buf_size, __pyx_t_2) < 0) __PYX_ERR(0, 2195, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+2196:             max_name_len=self._max_name_len)
  __pyx_t_2 = __Pyx_PyInt_FromSize_t(__pyx_v_self->_max_name_len); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2196, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_max_name_len, __pyx_t_2) < 0) __PYX_ERR(0, 2195, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 2197: 
+2198:     @property
/* Python wrapper */
static PyObject *__pyx_pw_7questdb_7ingress_6Sender_13init_buf_size_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7questdb_7ingress_6Sender_13init_buf_size_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7questdb_7ingress_6Sender_13init_buf_size___get__(((struct __pyx_obj_7questdb_7ingress_Sender *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7questdb_7ingress_6Sender_13init_buf_size___get__(struct __pyx_obj_7questdb_7ingress_Sender *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
/* … */
  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("questdb.ingress.Sender.init_buf_size.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
 2199:     def init_buf_size(self) -> int:
 2200:         """The initial capacity of the sender's internal buffer."""
+2201:         return self._init_buf_size
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_FromSize_t(__pyx_v_self->_init_buf_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2201, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;
 2202: 
+2203:     @property
/* Python wrapper */
static PyObject *__pyx_pw_7questdb_7ingress_6Sender_12max_name_len_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7questdb_7ingress_6Sender_12max_name_len_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7questdb_7ingress_6Sender_12max_name_len___get__(((struct __pyx_obj_7questdb_7ingress_Sender *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7questdb_7ingress_6Sender_12max_name_len___get__(struct __pyx_obj_7questdb_7ingress_Sender *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
/* … */
  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("questdb.ingress.Sender.max_name_len.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
 2204:     def max_name_len(self) -> int:
 2205:         """Maximum length of a table or column name."""
+2206:         return self._max_name_len
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_FromSize_t(__pyx_v_self->_max_name_len); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2206, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;
 2207: 
+2208:     def establish(self):
/* Python wrapper */
static PyObject *__pyx_pw_7questdb_7ingress_6Sender_11establish(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7questdb_7ingress_6Sender_10establish, "\n        Prepare the sender for use.\n\n        If using ILP/HTTP this will initialize the HTTP connection pool.\n\n        If using ILP/TCP this will cause connection to the server and \n        block until the connection is established.\n\n        If the TCP connection is set up with authentication and/or TLS, this\n        method will return only *after* the handshake(s) is/are complete.\n        ");
static PyMethodDef __pyx_mdef_7questdb_7ingress_6Sender_11establish = {"establish", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7questdb_7ingress_6Sender_11establish, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7questdb_7ingress_6Sender_10establish};
static PyObject *__pyx_pw_7questdb_7ingress_6Sender_11establish(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("establish (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) {
    __Pyx_RaiseArgtupleInvalid("establish", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "establish", 0))) return NULL;
  __pyx_r = __pyx_pf_7questdb_7ingress_6Sender_10establish(((struct __pyx_obj_7questdb_7ingress_Sender *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7questdb_7ingress_6Sender_10establish(struct __pyx_obj_7questdb_7ingress_Sender *__pyx_v_self) {
  struct line_sender_error *__pyx_v_err;
  PyObject *__pyx_r = NULL;
/* … */
  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("questdb.ingress.Sender.establish", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
/* … */
  __pyx_tuple__100 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_err); if (unlikely(!__pyx_tuple__100)) __PYX_ERR(0, 2208, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__100);
  __Pyx_GIVEREF(__pyx_tuple__100);
/* … */
  __pyx_t_19 = __Pyx_CyFunction_New(&__pyx_mdef_7questdb_7ingress_6Sender_11establish, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Sender_establish, NULL, __pyx_n_s_questdb_ingress, __pyx_d, ((PyObject *)__pyx_codeobj__101)); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 2208, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_19);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_7questdb_7ingress_Sender, __pyx_n_s_establish, __pyx_t_19) < 0) __PYX_ERR(0, 2208, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
  PyType_Modified(__pyx_ptype_7questdb_7ingress_Sender);
  __pyx_codeobj__101 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__100, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_questdb_ingress_pyx, __pyx_n_s_establish, 2208, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__101)) __PYX_ERR(0, 2208, __pyx_L1_error)
 2209:         """
 2210:         Prepare the sender for use.
 2211: 
 2212:         If using ILP/HTTP this will initialize the HTTP connection pool.
 2213: 
 2214:         If using ILP/TCP this will cause connection to the server and
 2215:         block until the connection is established.
 2216: 
 2217:         If the TCP connection is set up with authentication and/or TLS, this
 2218:         method will return only *after* the handshake(s) is/are complete.
 2219:         """
+2220:         cdef line_sender_error* err = NULL
  __pyx_v_err = NULL;
+2221:         if self._opts == NULL:
  __pyx_t_1 = (__pyx_v_self->_opts == NULL);
  if (unlikely(__pyx_t_1)) {
/* … */
  }
+2222:             raise IngressError(
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_IngressError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2222, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
+2223:                 IngressErrorCode.InvalidApiCall,
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_IngressErrorCode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2223, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_InvalidApiCall); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2223, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = NULL;
    __pyx_t_6 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
        __pyx_t_6 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[3] = {__pyx_t_4, __pyx_t_5, __pyx_kp_u_establish_can_t_be_called_after};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_6, 2+__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2222, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(0, 2222, __pyx_L1_error)
 2224:                 'establish() can\'t be called after close().')
+2225:         self._impl = line_sender_build(self._opts, &err)
  __pyx_v_self->_impl = line_sender_build(__pyx_v_self->_opts, (&__pyx_v_err));
+2226:         if self._impl == NULL:
  __pyx_t_1 = (__pyx_v_self->_impl == NULL);
  if (unlikely(__pyx_t_1)) {
/* … */
  }
+2227:             raise c_err_to_py(err)
    __pyx_t_2 = __pyx_f_7questdb_7ingress_c_err_to_py(__pyx_v_err); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2227, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(0, 2227, __pyx_L1_error)
+2228:         line_sender_opts_free(self._opts)
  line_sender_opts_free(__pyx_v_self->_opts);
+2229:         self._opts = NULL
  __pyx_v_self->_opts = NULL;
 2230: 
 2231:         # Request callbacks when rows are complete.
+2232:         if self._buffer is not None:
  __pyx_t_1 = (((PyObject *)__pyx_v_self->_buffer) != Py_None);
  if (__pyx_t_1) {
/* … */
  }
+2233:             self._buffer._row_complete_sender = PyWeakref_NewRef(self, None)
    __pyx_t_2 = PyWeakref_NewRef(((PyObject *)__pyx_v_self), Py_None); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2233, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_2);
    __Pyx_GOTREF(__pyx_v_self->_buffer->_row_complete_sender);
    __Pyx_DECREF(__pyx_v_self->_buffer->_row_complete_sender);
    __pyx_v_self->_buffer->_row_complete_sender = __pyx_t_2;
    __pyx_t_2 = 0;
 2234: 
+2235:         self._last_flush_ms[0] = line_sender_now_micros() // 1000
  (__pyx_v_self->_last_flush_ms[0]) = __Pyx_div_int64_t(line_sender_now_micros(), 0x3E8);
 2236: 
+2237:     def __enter__(self) -> Sender:
/* Python wrapper */
static struct __pyx_obj_7questdb_7ingress_Sender *__pyx_pw_7questdb_7ingress_6Sender_13__enter__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7questdb_7ingress_6Sender_12__enter__, "Call :func:`Sender.establish` at the start of a ``with`` block.");
static PyMethodDef __pyx_mdef_7questdb_7ingress_6Sender_13__enter__ = {"__enter__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7questdb_7ingress_6Sender_13__enter__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7questdb_7ingress_6Sender_12__enter__};
static struct __pyx_obj_7questdb_7ingress_Sender *__pyx_pw_7questdb_7ingress_6Sender_13__enter__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  struct __pyx_obj_7questdb_7ingress_Sender *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__enter__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) {
    __Pyx_RaiseArgtupleInvalid("__enter__", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__enter__", 0))) return NULL;
  __pyx_r = __pyx_pf_7questdb_7ingress_6Sender_12__enter__(((struct __pyx_obj_7questdb_7ingress_Sender *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static struct __pyx_obj_7questdb_7ingress_Sender *__pyx_pf_7questdb_7ingress_6Sender_12__enter__(struct __pyx_obj_7questdb_7ingress_Sender *__pyx_v_self) {
  struct __pyx_obj_7questdb_7ingress_Sender *__pyx_r = NULL;
/* … */
  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("questdb.ingress.Sender.__enter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
/* … */
  __pyx_t_19 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 2237, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_19);
  if (PyDict_SetItem(__pyx_t_19, __pyx_n_s_return, __pyx_n_s_Sender) < 0) __PYX_ERR(0, 2237, __pyx_L1_error)
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_7questdb_7ingress_6Sender_13__enter__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Sender___enter, NULL, __pyx_n_s_questdb_ingress, __pyx_d, ((PyObject *)__pyx_codeobj__102)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2237, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_3, __pyx_t_19);
  __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_7questdb_7ingress_Sender, __pyx_n_s_enter, __pyx_t_3) < 0) __PYX_ERR(0, 2237, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_7questdb_7ingress_Sender);
/* … */
  __pyx_codeobj__102 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__48, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_questdb_ingress_pyx, __pyx_n_s_enter, 2237, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__102)) __PYX_ERR(0, 2237, __pyx_L1_error)
 2238:         """Call :func:`Sender.establish` at the start of a ``with`` block."""
+2239:         self.establish()
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_establish); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2239, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2239, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+2240:         return self
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_self);
  __pyx_r = __pyx_v_self;
  goto __pyx_L0;
 2241: 
+2242:     def __str__(self) -> str:
/* Python wrapper */
static PyObject *__pyx_pw_7questdb_7ingress_6Sender_15__str__(PyObject *__pyx_v_self); /*proto*/
PyDoc_STRVAR(__pyx_doc_7questdb_7ingress_6Sender_14__str__, "\n        Inspect the contents of the internal buffer.\n\n        The ``str`` value returned represents the unsent data.\n\n        Also see :func:`Sender.__len__`.\n        ");
#if CYTHON_UPDATE_DESCRIPTOR_DOC
struct wrapperbase __pyx_wrapperbase_7questdb_7ingress_6Sender_14__str__;
#endif
static PyObject *__pyx_pw_7questdb_7ingress_6Sender_15__str__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7questdb_7ingress_6Sender_14__str__(((struct __pyx_obj_7questdb_7ingress_Sender *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7questdb_7ingress_6Sender_14__str__(struct __pyx_obj_7questdb_7ingress_Sender *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
/* … */
  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("questdb.ingress.Sender.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
 2243:         """
 2244:         Inspect the contents of the internal buffer.
 2245: 
 2246:         The ``str`` value returned represents the unsent data.
 2247: 
 2248:         Also see :func:`Sender.__len__`.
 2249:         """
+2250:         return str(self._buffer)
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_Str(((PyObject *)__pyx_v_self->_buffer)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2250, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;
 2251: 
+2252:     def __len__(self) -> int:
/* Python wrapper */
static Py_ssize_t __pyx_pw_7questdb_7ingress_6Sender_17__len__(PyObject *__pyx_v_self); /*proto*/
PyDoc_STRVAR(__pyx_doc_7questdb_7ingress_6Sender_16__len__, "\n        Number of bytes of unsent data in the internal buffer.\n\n        Equivalent (but cheaper) to ``len(str(sender))``.\n        ");
#if CYTHON_UPDATE_DESCRIPTOR_DOC
struct wrapperbase __pyx_wrapperbase_7questdb_7ingress_6Sender_16__len__;
#endif
static Py_ssize_t __pyx_pw_7questdb_7ingress_6Sender_17__len__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  Py_ssize_t __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__len__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7questdb_7ingress_6Sender_16__len__(((struct __pyx_obj_7questdb_7ingress_Sender *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static Py_ssize_t __pyx_pf_7questdb_7ingress_6Sender_16__len__(struct __pyx_obj_7questdb_7ingress_Sender *__pyx_v_self) {
  Py_ssize_t __pyx_r;
/* … */
  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("questdb.ingress.Sender.__len__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
 2253:         """
 2254:         Number of bytes of unsent data in the internal buffer.
 2255: 
 2256:         Equivalent (but cheaper) to ``len(str(sender))``.
 2257:         """
+2258:         return len(self._buffer)
  __pyx_t_1 = ((PyObject *)__pyx_v_self->_buffer);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2258, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  goto __pyx_L0;
 2259: 
+2260:     def transaction(self, table_name: str):
/* Python wrapper */
static PyObject *__pyx_pw_7questdb_7ingress_6Sender_19transaction(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7questdb_7ingress_6Sender_18transaction, "\n        Start a :ref:`sender_transaction` block.\n        ");
static PyMethodDef __pyx_mdef_7questdb_7ingress_6Sender_19transaction = {"transaction", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7questdb_7ingress_6Sender_19transaction, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7questdb_7ingress_6Sender_18transaction};
static PyObject *__pyx_pw_7questdb_7ingress_6Sender_19transaction(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_table_name = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("transaction (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_table_name,0};
  PyObject* values[1] = {0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_table_name)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2260, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "transaction") < 0)) __PYX_ERR(0, 2260, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_table_name = ((PyObject*)values[0]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("transaction", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 2260, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("questdb.ingress.Sender.transaction", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_table_name), (&PyUnicode_Type), 0, "table_name", 1))) __PYX_ERR(0, 2260, __pyx_L1_error)
  __pyx_r = __pyx_pf_7questdb_7ingress_6Sender_18transaction(((struct __pyx_obj_7questdb_7ingress_Sender *)__pyx_v_self), __pyx_v_table_name);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7questdb_7ingress_6Sender_18transaction(struct __pyx_obj_7questdb_7ingress_Sender *__pyx_v_self, PyObject *__pyx_v_table_name) {
  PyObject *__pyx_r = NULL;
/* … */
  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("questdb.ingress.Sender.transaction", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
/* … */
  __pyx_tuple__103 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_table_name); if (unlikely(!__pyx_tuple__103)) __PYX_ERR(0, 2260, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__103);
  __Pyx_GIVEREF(__pyx_tuple__103);
/* … */
  __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2260, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_table_name, __pyx_n_s_str) < 0) __PYX_ERR(0, 2260, __pyx_L1_error)
  __pyx_t_19 = __Pyx_CyFunction_New(&__pyx_mdef_7questdb_7ingress_6Sender_19transaction, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Sender_transaction, NULL, __pyx_n_s_questdb_ingress, __pyx_d, ((PyObject *)__pyx_codeobj__104)); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 2260, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_19);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_19, __pyx_t_3);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_7questdb_7ingress_Sender, __pyx_n_s_transaction, __pyx_t_19) < 0) __PYX_ERR(0, 2260, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
  PyType_Modified(__pyx_ptype_7questdb_7ingress_Sender);
  __pyx_codeobj__104 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__103, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_questdb_ingress_pyx, __pyx_n_s_transaction, 2260, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__104)) __PYX_ERR(0, 2260, __pyx_L1_error)
 2261:         """
 2262:         Start a :ref:`sender_transaction` block.
 2263:         """
+2264:         return SenderTransaction(self, table_name)
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2264, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF((PyObject *)__pyx_v_self);
  __Pyx_GIVEREF((PyObject *)__pyx_v_self);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self))) __PYX_ERR(0, 2264, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_table_name);
  __Pyx_GIVEREF(__pyx_v_table_name);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_table_name)) __PYX_ERR(0, 2264, __pyx_L1_error);
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7questdb_7ingress_SenderTransaction), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2264, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;
 2265: 
+2266:     def row(self,
/* Python wrapper */
static PyObject *__pyx_pw_7questdb_7ingress_6Sender_21row(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7questdb_7ingress_6Sender_20row, "\n        Write a row to the internal buffer.\n\n        This may be sent automatically depending on the ``auto_flush`` setting\n        in the constructor.\n\n        Refer to the :func:`Buffer.row` documentation for details on arguments.\n        ");
static PyMethodDef __pyx_mdef_7questdb_7ingress_6Sender_21row = {"row", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7questdb_7ingress_6Sender_21row, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7questdb_7ingress_6Sender_20row};
static PyObject *__pyx_pw_7questdb_7ingress_6Sender_21row(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_table_name = 0;
  PyObject *__pyx_v_symbols = 0;
  PyObject *__pyx_v_columns = 0;
  PyObject *__pyx_v_at = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("row (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_table_name,&__pyx_n_s_at,&__pyx_n_s_symbols,&__pyx_n_s_columns,0};
  PyObject* values[4] = {0,0,0,0};
/* … */
  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7questdb_7ingress_6Sender_20row(struct __pyx_obj_7questdb_7ingress_Sender *__pyx_v_self, PyObject *__pyx_v_table_name, PyObject *__pyx_v_symbols, PyObject *__pyx_v_columns, PyObject *__pyx_v_at) {
  PyObject *__pyx_r = NULL;
/* … */
  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("questdb.ingress.Sender.row", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
/* … */
  __pyx_t_19 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 2266, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_19);
/* … */
  __pyx_t_3 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2266, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_table_name, __pyx_n_s_str) < 0) __PYX_ERR(0, 2266, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_symbols, __pyx_kp_s_Optional_Dict_str_str) < 0) __PYX_ERR(0, 2266, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_columns, __pyx_kp_s_Optional_Dict_str_Union_bool_int) < 0) __PYX_ERR(0, 2266, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_at, __pyx_kp_s_Union_TimestampNanos_datetime_Se) < 0) __PYX_ERR(0, 2266, __pyx_L1_error)
  __pyx_t_18 = __Pyx_CyFunction_New(&__pyx_mdef_7questdb_7ingress_6Sender_21row, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Sender_row, NULL, __pyx_n_s_questdb_ingress, __pyx_d, ((PyObject *)__pyx_codeobj__105)); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 2266, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_18);
  __Pyx_CyFunction_SetDefaultsKwDict(__pyx_t_18, __pyx_t_19);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_18, __pyx_t_3);
  __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_7questdb_7ingress_Sender, __pyx_n_s_row, __pyx_t_18) < 0) __PYX_ERR(0, 2266, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
  PyType_Modified(__pyx_ptype_7questdb_7ingress_Sender);
/* … */
  __pyx_codeobj__105 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__80, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_questdb_ingress_pyx, __pyx_n_s_row, 2266, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__105)) __PYX_ERR(0, 2266, __pyx_L1_error)
 2267:             table_name: str,
 2268:             *,
+2269:             symbols: Optional[Dict[str, str]]=None,
    values[2] = __Pyx_Arg_NewRef_FASTCALL(((PyObject*)Py_None));
/* … */
  if (PyDict_SetItem(__pyx_t_19, __pyx_n_s_symbols, Py_None) < 0) __PYX_ERR(0, 2266, __pyx_L1_error)
 2270:             columns: Optional[Dict[
 2271:                 str,
+2272:                 Union[bool, int, float, str, TimestampMicros, datetime]]]=None,
    values[3] = __Pyx_Arg_NewRef_FASTCALL(((PyObject*)Py_None));
    if (likely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_table_name)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2266, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_at)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2266, __pyx_L3_error)
        else {
          __Pyx_RaiseKeywordRequired("row", __pyx_n_s_at); __PYX_ERR(0, 2266, __pyx_L3_error)
        }
      }
      if (kw_args > 0 && likely(kw_args <= 2)) {
        Py_ssize_t index;
        for (index = 2; index < 4 && kw_args > 0; index++) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, *__pyx_pyargnames[index]);
          if (value) { values[index] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2266, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "row") < 0)) __PYX_ERR(0, 2266, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      __Pyx_RaiseKeywordRequired("row", __pyx_n_s_at); __PYX_ERR(0, 2266, __pyx_L3_error)
    }
    __pyx_v_table_name = ((PyObject*)values[0]);
    __pyx_v_at = values[1];
    __pyx_v_symbols = ((PyObject*)values[2]);
    __pyx_v_columns = ((PyObject*)values[3]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("row", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 2266, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("questdb.ingress.Sender.row", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_table_name), (&PyUnicode_Type), 0, "table_name", 1))) __PYX_ERR(0, 2267, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_symbols), (&PyDict_Type), 1, "symbols", 1))) __PYX_ERR(0, 2269, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_columns), (&PyDict_Type), 1, "columns", 1))) __PYX_ERR(0, 2270, __pyx_L1_error)
  __pyx_r = __pyx_pf_7questdb_7ingress_6Sender_20row(((struct __pyx_obj_7questdb_7ingress_Sender *)__pyx_v_self), __pyx_v_table_name, __pyx_v_symbols, __pyx_v_columns, __pyx_v_at);
/* … */
  if (PyDict_SetItem(__pyx_t_19, __pyx_n_s_columns, Py_None) < 0) __PYX_ERR(0, 2266, __pyx_L1_error)
 2273:             at: Union[TimestampNanos, datetime, ServerTimestamp]):
 2274:         """
 2275:         Write a row to the internal buffer.
 2276: 
 2277:         This may be sent automatically depending on the ``auto_flush`` setting
 2278:         in the constructor.
 2279: 
 2280:         Refer to the :func:`Buffer.row` documentation for details on arguments.
 2281:         """
+2282:         if self._in_txn:
  if (unlikely(__pyx_v_self->_in_txn)) {
/* … */
  }
+2283:             raise IngressError(
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_IngressError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2283, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
+2284:                 IngressErrorCode.InvalidApiCall,
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_IngressErrorCode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2284, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_InvalidApiCall); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2284, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = NULL;
    __pyx_t_5 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
        __pyx_t_5 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_t_4, __pyx_kp_u_Cannot_append_rows_explicitly_in};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 2+__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2283, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 2283, __pyx_L1_error)
 2285:                 'Cannot append rows explicitly inside a transaction')
+2286:         if at is None:
  __pyx_t_6 = (__pyx_v_at == Py_None);
  if (unlikely(__pyx_t_6)) {
/* … */
  }
+2287:             raise IngressError(
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_IngressError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2287, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
+2288:                 IngressErrorCode.InvalidTimestamp,
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_IngressErrorCode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2288, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_InvalidTimestamp); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2288, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = NULL;
    __pyx_t_5 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
        __pyx_t_5 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[3] = {__pyx_t_4, __pyx_t_3, __pyx_kp_u_at_must_be_of_type_TimestampNan};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 2+__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2287, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 2287, __pyx_L1_error)
 2289:                 "`at` must be of type TimestampNanos, datetime, or ServerTimestamp"
 2290:             )
+2291:         self._buffer.row(table_name, symbols=symbols, columns=columns, at=at)
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->_buffer), __pyx_n_s_row); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2291, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2291, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_v_table_name);
  __Pyx_GIVEREF(__pyx_v_table_name);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_table_name)) __PYX_ERR(0, 2291, __pyx_L1_error);
  __pyx_t_3 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2291, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_symbols, __pyx_v_symbols) < 0) __PYX_ERR(0, 2291, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_columns, __pyx_v_columns) < 0) __PYX_ERR(0, 2291, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_at, __pyx_v_at) < 0) __PYX_ERR(0, 2291, __pyx_L1_error)
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2291, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+2292:         return self
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_self);
  __pyx_r = ((PyObject *)__pyx_v_self);
  goto __pyx_L0;
 2293: 
+2294:     def dataframe(
/* Python wrapper */
static PyObject *__pyx_pw_7questdb_7ingress_6Sender_23dataframe(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7questdb_7ingress_6Sender_22dataframe, "\n        Write a Pandas DataFrame to the internal buffer.\n\n        Example:\n\n        .. code-block:: python\n\n            import pandas as pd\n            import questdb.ingress as qi\n\n            df = pd.DataFrame({\n                'car': pd.Categorical(['Nic 42', 'Eddi', 'Nic 42', 'Eddi']),\n                'position': [1, 2, 1, 2],\n                'speed': [89.3, 98.2, 3, 4],\n                'lat_gforce': [0.1, -0.2, -0.6, 0.4],\n                'accelleration': [0.1, -0.2, 0.6, 4.4],\n                'tyre_pressure': [2.6, 2.5, 2.6, 2.5],\n                'ts': [\n                    pd.Timestamp('2022-08-09 13:56:00'),\n                    pd.Timestamp('2022-08-09 13:56:01'),\n                    pd.Timestamp('2022-08-09 13:56:02'),\n                    pd.Timestamp('2022-08-09 13:56:03')]})\n\n            with qi.Sender.from_env() as sender:\n                sender.dataframe(df, table_name='race_metrics', at='ts')\n\n        This method builds on top of the :func:`Buffer.dataframe` method.\n        See its documentation for details on arguments.\n\n        Additionally, this method also supports auto-flushing the buffer\n        as specified in the ``Sender``'s ``auto_flush`` constructor argument.\n        Auto-flushing is implemented incrementally, meanting that when\n        calling ``sender.dataframe(df)`` with a large ``df``, the sender may\n        have sent some of the rows to the server already whist the rest of the\n        rows are going to be sent at the next auto-flush or next explicit call\n        to :func:`Sender.flush`.\n\n        In case of data errors with auto-flushing enabled, some of the rows\n        may have been transmitted to the server already.\n        ");
static PyMethodDef __pyx_mdef_7questdb_7ingress_6Sender_23dataframe = {"dataframe", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7questdb_7ingress_6Sender_23dataframe, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7questdb_7ingress_6Sender_22dataframe};
static PyObject *__pyx_pw_7questdb_7ingress_6Sender_23dataframe(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_df = 0;
  PyObject *__pyx_v_table_name = 0;
  PyObject *__pyx_v_table_name_col = 0;
  PyObject *__pyx_v_symbols = 0;
  PyObject *__pyx_v_at = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("dataframe (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_df,&__pyx_n_s_at,&__pyx_n_s_table_name,&__pyx_n_s_table_name_col,&__pyx_n_s_symbols,0};
  PyObject* values[5] = {0,0,0,0,0};
/* … */
  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7questdb_7ingress_6Sender_22dataframe(struct __pyx_obj_7questdb_7ingress_Sender *__pyx_v_self, PyObject *__pyx_v_df, PyObject *__pyx_v_table_name, PyObject *__pyx_v_table_name_col, PyObject *__pyx_v_symbols, PyObject *__pyx_v_at) {
  struct __pyx_t_7questdb_7ingress_auto_flush_t __pyx_v_af;
  PyObject *__pyx_r = NULL;
/* … */
  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("questdb.ingress.Sender.dataframe", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
/* … */
  __pyx_tuple__106 = PyTuple_Pack(7, __pyx_n_s_self, __pyx_n_s_df, __pyx_n_s_table_name, __pyx_n_s_table_name_col, __pyx_n_s_symbols, __pyx_n_s_at, __pyx_n_s_af); if (unlikely(!__pyx_tuple__106)) __PYX_ERR(0, 2294, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__106);
  __Pyx_GIVEREF(__pyx_tuple__106);
/* … */
  __pyx_t_18 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 2294, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_18);
/* … */
  __pyx_t_3 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2294, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_table_name, __pyx_kp_s_Optional_str) < 0) __PYX_ERR(0, 2294, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_table_name_col, __pyx_kp_s_Union_None_int_str) < 0) __PYX_ERR(0, 2294, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_symbols, __pyx_kp_s_Union_str_bool_List_int_List_str) < 0) __PYX_ERR(0, 2294, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_at, __pyx_kp_s_Union_ServerTimestamp_int_str_Ti) < 0) __PYX_ERR(0, 2294, __pyx_L1_error)
  __pyx_t_19 = __Pyx_CyFunction_New(&__pyx_mdef_7questdb_7ingress_6Sender_23dataframe, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Sender_dataframe, NULL, __pyx_n_s_questdb_ingress, __pyx_d, ((PyObject *)__pyx_codeobj__107)); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 2294, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_19);
  __Pyx_CyFunction_SetDefaultsKwDict(__pyx_t_19, __pyx_t_18);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_19, __pyx_t_3);
  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_7questdb_7ingress_Sender, __pyx_n_s_dataframe, __pyx_t_19) < 0) __PYX_ERR(0, 2294, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
  PyType_Modified(__pyx_ptype_7questdb_7ingress_Sender);
  __pyx_codeobj__107 = (PyObject*)__Pyx_PyCode_New(2, 0, 4, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__106, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_questdb_ingress_pyx, __pyx_n_s_dataframe, 2294, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__107)) __PYX_ERR(0, 2294, __pyx_L1_error)
 2295:             self,
 2296:             df,  # : pd.DataFrame
 2297:             *,
+2298:             table_name: Optional[str] = None,
    values[2] = __Pyx_Arg_NewRef_FASTCALL(((PyObject*)Py_None));
/* … */
  if (PyDict_SetItem(__pyx_t_18, __pyx_n_s_table_name, Py_None) < 0) __PYX_ERR(0, 2294, __pyx_L1_error)
+2299:             table_name_col: Union[None, int, str] = None,
    values[3] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
    values[4] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)__pyx_n_u_auto));
    if (likely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_df)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2294, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_at)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2294, __pyx_L3_error)
        else {
          __Pyx_RaiseKeywordRequired("dataframe", __pyx_n_s_at); __PYX_ERR(0, 2294, __pyx_L3_error)
        }
      }
      if (kw_args > 0 && likely(kw_args <= 3)) {
        Py_ssize_t index;
        for (index = 2; index < 5 && kw_args > 0; index++) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, *__pyx_pyargnames[index]);
          if (value) { values[index] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2294, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "dataframe") < 0)) __PYX_ERR(0, 2294, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      __Pyx_RaiseKeywordRequired("dataframe", __pyx_n_s_at); __PYX_ERR(0, 2294, __pyx_L3_error)
    }
    __pyx_v_df = values[0];
    __pyx_v_at = values[1];
    __pyx_v_table_name = ((PyObject*)values[2]);
    __pyx_v_table_name_col = values[3];
    __pyx_v_symbols = values[4];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("dataframe", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 2294, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("questdb.ingress.Sender.dataframe", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_table_name), (&PyUnicode_Type), 1, "table_name", 1))) __PYX_ERR(0, 2298, __pyx_L1_error)
  __pyx_r = __pyx_pf_7questdb_7ingress_6Sender_22dataframe(((struct __pyx_obj_7questdb_7ingress_Sender *)__pyx_v_self), __pyx_v_df, __pyx_v_table_name, __pyx_v_table_name_col, __pyx_v_symbols, __pyx_v_at);
/* … */
  if (PyDict_SetItem(__pyx_t_18, __pyx_n_s_table_name_col, Py_None) < 0) __PYX_ERR(0, 2294, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_18, __pyx_n_s_symbols, __pyx_n_u_auto) < 0) __PYX_ERR(0, 2294, __pyx_L1_error)
 2300:             symbols: Union[str, bool, List[int], List[str]] = 'auto',
 2301:             at: Union[ServerTimestamp, int, str, TimestampNanos, datetime]):
 2302:         """
 2303:         Write a Pandas DataFrame to the internal buffer.
 2304: 
 2305:         Example:
 2306: 
 2307:         .. code-block:: python
 2308: 
 2309:             import pandas as pd
 2310:             import questdb.ingress as qi
 2311: 
 2312:             df = pd.DataFrame({
 2313:                 'car': pd.Categorical(['Nic 42', 'Eddi', 'Nic 42', 'Eddi']),
 2314:                 'position': [1, 2, 1, 2],
 2315:                 'speed': [89.3, 98.2, 3, 4],
 2316:                 'lat_gforce': [0.1, -0.2, -0.6, 0.4],
 2317:                 'accelleration': [0.1, -0.2, 0.6, 4.4],
 2318:                 'tyre_pressure': [2.6, 2.5, 2.6, 2.5],
 2319:                 'ts': [
 2320:                     pd.Timestamp('2022-08-09 13:56:00'),
 2321:                     pd.Timestamp('2022-08-09 13:56:01'),
 2322:                     pd.Timestamp('2022-08-09 13:56:02'),
 2323:                     pd.Timestamp('2022-08-09 13:56:03')]})
 2324: 
 2325:             with qi.Sender.from_env() as sender:
 2326:                 sender.dataframe(df, table_name='race_metrics', at='ts')
 2327: 
 2328:         This method builds on top of the :func:`Buffer.dataframe` method.
 2329:         See its documentation for details on arguments.
 2330: 
 2331:         Additionally, this method also supports auto-flushing the buffer
 2332:         as specified in the ``Sender``'s ``auto_flush`` constructor argument.
 2333:         Auto-flushing is implemented incrementally, meanting that when
 2334:         calling ``sender.dataframe(df)`` with a large ``df``, the sender may
 2335:         have sent some of the rows to the server already whist the rest of the
 2336:         rows are going to be sent at the next auto-flush or next explicit call
 2337:         to :func:`Sender.flush`.
 2338: 
 2339:         In case of data errors with auto-flushing enabled, some of the rows
 2340:         may have been transmitted to the server already.
 2341:         """
+2342:         cdef auto_flush_t af = auto_flush_blank()
  __pyx_v_af = __pyx_f_7questdb_7ingress_auto_flush_blank();
+2343:         if self._in_txn:
  if (unlikely(__pyx_v_self->_in_txn)) {
/* … */
  }
+2344:             raise IngressError(
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_IngressError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2344, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
+2345:                 IngressErrorCode.InvalidApiCall,
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_IngressErrorCode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2345, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_InvalidApiCall); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2345, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = NULL;
    __pyx_t_5 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
        __pyx_t_5 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_t_4, __pyx_kp_u_Cannot_append_rows_explicitly_in};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 2+__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2344, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 2344, __pyx_L1_error)
 2346:                 'Cannot append rows explicitly inside a transaction')
+2347:         if at is None:
  __pyx_t_6 = (__pyx_v_at == Py_None);
  if (unlikely(__pyx_t_6)) {
/* … */
  }
+2348:             raise IngressError(
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_IngressError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2348, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
+2349:                 IngressErrorCode.InvalidTimestamp,
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_IngressErrorCode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2349, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_InvalidTimestamp); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2349, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = NULL;
    __pyx_t_5 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
        __pyx_t_5 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[3] = {__pyx_t_4, __pyx_t_3, __pyx_kp_u_at_must_be_of_type_TimestampNan};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 2+__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2348, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 2348, __pyx_L1_error)
 2350:                 "`at` must be of type TimestampNanos, datetime, or ServerTimestamp"
 2351:             )
+2352:         if self._auto_flush_mode.enabled:
  if (__pyx_v_self->_auto_flush_mode.enabled) {
/* … */
  }
+2353:             af.sender = self._impl
    __pyx_t_7 = __pyx_v_self->_impl;
    __pyx_v_af.sender = __pyx_t_7;
+2354:             af.mode = self._auto_flush_mode
    __pyx_t_8 = __pyx_v_self->_auto_flush_mode;
    __pyx_v_af.mode = __pyx_t_8;
+2355:             af.last_flush_ms = self._last_flush_ms
    __pyx_t_9 = __pyx_v_self->_last_flush_ms;
    __pyx_v_af.last_flush_ms = __pyx_t_9;
+2356:         _dataframe(
  __pyx_t_10 = __pyx_f_7questdb_7ingress__dataframe(__pyx_v_af, __pyx_v_self->_buffer->_impl, __pyx_v_self->_buffer->_b, __pyx_v_df, __pyx_v_table_name, __pyx_v_table_name_col, __pyx_v_symbols, __pyx_v_at); if (unlikely(__pyx_t_10 == ((__pyx_t_7questdb_7ingress_void_int)-1))) __PYX_ERR(0, 2356, __pyx_L1_error)
 2357:             af,
 2358:             self._buffer._impl,
 2359:             self._buffer._b,
 2360:             df,
 2361:             table_name,
 2362:             table_name_col,
 2363:             symbols,
 2364:             at)
+2365:         return self
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_self);
  __pyx_r = ((PyObject *)__pyx_v_self);
  goto __pyx_L0;
 2366: 
+2367:     cpdef flush(
static PyObject *__pyx_pw_7questdb_7ingress_6Sender_25flush(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_f_7questdb_7ingress_6Sender_flush(struct __pyx_obj_7questdb_7ingress_Sender *__pyx_v_self, int __pyx_skip_dispatch, struct __pyx_opt_args_7questdb_7ingress_6Sender_flush *__pyx_optional_args) {
/* … */
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_flush); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2367, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!__Pyx_IsSameCFunction(__pyx_t_1, (void*) __pyx_pw_7questdb_7ingress_6Sender_25flush)) {
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_clear); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2367, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_v_transactional); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2367, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_5 = __pyx_t_1; __pyx_t_6 = NULL;
        __pyx_t_7 = 0;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_5))) {
          __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
          if (likely(__pyx_t_6)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
            __Pyx_INCREF(__pyx_t_6);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_5, function);
            __pyx_t_7 = 1;
          }
        }
        #endif
        {
          PyObject *__pyx_callargs[4] = {__pyx_t_6, ((PyObject *)__pyx_v_buffer), __pyx_t_3, __pyx_t_4};
          __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_7, 3+__pyx_t_7);
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2367, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        }
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }
/* … */
  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("questdb.ingress.Sender.flush", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7questdb_7ingress_6Sender_25flush(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7questdb_7ingress_6Sender_24flush, "\n        If called with no arguments, immediately flushes the internal buffer.\n\n        Alternatively you can flush a buffer that was constructed explicitly\n        by passing ``buffer``.\n\n        The buffer will be cleared by default, unless ``clear`` is set to\n        ``False``.\n\n        This method does nothing if the provided or internal buffer is empty.\n\n        :param buffer: The buffer to flush. If ``None``, the internal buffer\n            is flushed.\n\n        :param clear: If ``True``, the flushed buffer is cleared (default).\n            If ``False``, the flushed buffer is left in the internal buffer.\n            Note that ``clear=False`` is only supported if ``buffer`` is also\n            specified.\n\n        :param transactional: If ``True`` ensures that the flushed buffer\n            contains row for a single table, ensuring all data can be written\n            transactionally. This feature requires ILP/HTTP and is not available\n            when connecting over TCP. *Default: False.*\n\n        The Python GIL is released during the network IO operation.\n        ");
static PyMethodDef __pyx_mdef_7questdb_7ingress_6Sender_25flush = {"flush", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7questdb_7ingress_6Sender_25flush, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7questdb_7ingress_6Sender_24flush};
static PyObject *__pyx_pw_7questdb_7ingress_6Sender_25flush(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  struct __pyx_obj_7questdb_7ingress_Buffer *__pyx_v_buffer = 0;
  int __pyx_v_clear;
  int __pyx_v_transactional;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("flush (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_buffer,&__pyx_n_s_clear,&__pyx_n_s_transactional,0};
  PyObject* values[3] = {0,0,0};
/* … */
  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7questdb_7ingress_6Sender_24flush(struct __pyx_obj_7questdb_7ingress_Sender *__pyx_v_self, struct __pyx_obj_7questdb_7ingress_Buffer *__pyx_v_buffer, int __pyx_v_clear, int __pyx_v_transactional) {
  PyObject *__pyx_r = NULL;
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 3;
  __pyx_t_2.buffer = __pyx_v_buffer;
  __pyx_t_2.clear = __pyx_v_clear;
  __pyx_t_2.transactional = __pyx_v_transactional;
  __pyx_t_1 = __pyx_vtabptr_7questdb_7ingress_Sender->flush(__pyx_v_self, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2367, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("questdb.ingress.Sender.flush", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
/* … */
  __pyx_tuple__108 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_buffer, __pyx_n_s_clear, __pyx_n_s_transactional); if (unlikely(!__pyx_tuple__108)) __PYX_ERR(0, 2367, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__108);
  __Pyx_GIVEREF(__pyx_tuple__108);
  __pyx_codeobj__109 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__108, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_questdb_ingress_pyx, __pyx_n_s_flush, 2367, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__109)) __PYX_ERR(0, 2367, __pyx_L1_error)
/* … */
  __pyx_t_19 = __Pyx_CyFunction_New(&__pyx_mdef_7questdb_7ingress_6Sender_25flush, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Sender_flush, NULL, __pyx_n_s_questdb_ingress, __pyx_d, ((PyObject *)__pyx_codeobj__109)); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 2367, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_19);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_19, __pyx_tuple__110);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_7questdb_7ingress_Sender, __pyx_n_s_flush, __pyx_t_19) < 0) __PYX_ERR(0, 2367, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
  PyType_Modified(__pyx_ptype_7questdb_7ingress_Sender);
  __pyx_tuple__110 = PyTuple_Pack(3, Py_None, Py_True, Py_False); if (unlikely(!__pyx_tuple__110)) __PYX_ERR(0, 2367, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__110);
  __Pyx_GIVEREF(__pyx_tuple__110);
/* … */
struct __pyx_opt_args_7questdb_7ingress_6Sender_flush {
  int __pyx_n;
  struct __pyx_obj_7questdb_7ingress_Buffer *buffer;
  int clear;
  int transactional;
};
 2368:             self,
+2369:             Buffer buffer=None,
  struct __pyx_obj_7questdb_7ingress_Buffer *__pyx_v_buffer = ((struct __pyx_obj_7questdb_7ingress_Buffer *)Py_None);
/* … */
    values[0] = __Pyx_Arg_NewRef_FASTCALL((PyObject *)((struct __pyx_obj_7questdb_7ingress_Buffer *)Py_None));
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_buffer);
          if (value) { values[0] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2367, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_clear);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2367, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_transactional);
          if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2367, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "flush") < 0)) __PYX_ERR(0, 2367, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_buffer = ((struct __pyx_obj_7questdb_7ingress_Buffer *)values[0]);
    if (values[1]) {
      __pyx_v_clear = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_clear == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2370, __pyx_L3_error)
    } else {
+2370:             bint clear=True,
  int __pyx_v_clear = ((int)1);
/* … */
      __pyx_v_clear = ((int)1);
    }
    if (values[2]) {
      __pyx_v_transactional = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_transactional == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2371, __pyx_L3_error)
    } else {
+2371:             bint transactional=False):
  int __pyx_v_transactional = ((int)0);
  struct line_sender *__pyx_v_sender;
  struct line_sender_error *__pyx_v_err;
  struct line_sender_buffer *__pyx_v_c_buf;
  PyThreadState *__pyx_v_gs;
  int __pyx_v_ok;
  PyObject *__pyx_r = NULL;
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_buffer = __pyx_optional_args->buffer;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_clear = __pyx_optional_args->clear;
        if (__pyx_optional_args->__pyx_n > 2) {
          __pyx_v_transactional = __pyx_optional_args->transactional;
        }
      }
    }
  }
/* … */
      __pyx_v_transactional = ((int)0);
    }
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("flush", 0, 0, 3, __pyx_nargs); __PYX_ERR(0, 2367, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("questdb.ingress.Sender.flush", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_buffer), __pyx_ptype_7questdb_7ingress_Buffer, 1, "buffer", 0))) __PYX_ERR(0, 2369, __pyx_L1_error)
  __pyx_r = __pyx_pf_7questdb_7ingress_6Sender_24flush(((struct __pyx_obj_7questdb_7ingress_Sender *)__pyx_v_self), __pyx_v_buffer, __pyx_v_clear, __pyx_v_transactional);
 2372:         """
 2373:         If called with no arguments, immediately flushes the internal buffer.
 2374: 
 2375:         Alternatively you can flush a buffer that was constructed explicitly
 2376:         by passing ``buffer``.
 2377: 
 2378:         The buffer will be cleared by default, unless ``clear`` is set to
 2379:         ``False``.
 2380: 
 2381:         This method does nothing if the provided or internal buffer is empty.
 2382: 
 2383:         :param buffer: The buffer to flush. If ``None``, the internal buffer
 2384:             is flushed.
 2385: 
 2386:         :param clear: If ``True``, the flushed buffer is cleared (default).
 2387:             If ``False``, the flushed buffer is left in the internal buffer.
 2388:             Note that ``clear=False`` is only supported if ``buffer`` is also
 2389:             specified.
 2390: 
 2391:         :param transactional: If ``True`` ensures that the flushed buffer
 2392:             contains row for a single table, ensuring all data can be written
 2393:             transactionally. This feature requires ILP/HTTP and is not available
 2394:             when connecting over TCP. *Default: False.*
 2395: 
 2396:         The Python GIL is released during the network IO operation.
 2397:         """
+2398:         cdef line_sender* sender = self._impl
  __pyx_t_8 = __pyx_v_self->_impl;
  __pyx_v_sender = __pyx_t_8;
+2399:         cdef line_sender_error* err = NULL
  __pyx_v_err = NULL;
+2400:         cdef line_sender_buffer* c_buf = NULL
  __pyx_v_c_buf = NULL;
+2401:         cdef PyThreadState* gs = NULL  # GIL state. NULL means we have the GIL.
  __pyx_v_gs = NULL;
+2402:         cdef bint ok = False
  __pyx_v_ok = 0;
 2403: 
+2404:         if self._in_txn:
  if (unlikely(__pyx_v_self->_in_txn)) {
/* … */
  }
+2405:             raise IngressError(
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_IngressError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2405, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
+2406:                 IngressErrorCode.InvalidApiCall,
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_IngressErrorCode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2406, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_InvalidApiCall); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2406, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = NULL;
    __pyx_t_7 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
        __pyx_t_7 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[3] = {__pyx_t_5, __pyx_t_4, __pyx_kp_u_Cannot_flush_explicitly_inside_a};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_7, 2+__pyx_t_7);
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2405, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 2405, __pyx_L1_error)
 2407:                 'Cannot flush explicitly inside a transaction')
 2408: 
+2409:         if buffer is None and not clear:
  __pyx_t_10 = (((PyObject *)__pyx_v_buffer) == Py_None);
  if (__pyx_t_10) {
  } else {
    __pyx_t_9 = __pyx_t_10;
    goto __pyx_L5_bool_binop_done;
  }
  __pyx_t_10 = (!__pyx_v_clear);
  __pyx_t_9 = __pyx_t_10;
  __pyx_L5_bool_binop_done:;
  if (unlikely(__pyx_t_9)) {
/* … */
  }
+2410:             raise ValueError('The internal buffer must always be cleared.')
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__41, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2410, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 2410, __pyx_L1_error)
/* … */
  __pyx_tuple__41 = PyTuple_Pack(1, __pyx_kp_u_The_internal_buffer_must_always); if (unlikely(!__pyx_tuple__41)) __PYX_ERR(0, 2410, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__41);
  __Pyx_GIVEREF(__pyx_tuple__41);
 2411: 
+2412:         if sender == NULL:
  __pyx_t_9 = (__pyx_v_sender == NULL);
  if (unlikely(__pyx_t_9)) {
/* … */
  }
+2413:             raise IngressError(
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_IngressError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2413, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
+2414:                 IngressErrorCode.InvalidApiCall,
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_IngressErrorCode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2414, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_InvalidApiCall); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2414, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = NULL;
    __pyx_t_7 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
        __pyx_t_7 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[3] = {__pyx_t_4, __pyx_t_5, __pyx_kp_u_flush_can_t_be_called_Not_connec};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_7, 2+__pyx_t_7);
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2413, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 2413, __pyx_L1_error)
 2415:                 'flush() can\'t be called: Not connected.')
+2416:         if buffer is not None:
  __pyx_t_9 = (((PyObject *)__pyx_v_buffer) != Py_None);
  if (__pyx_t_9) {
/* … */
    goto __pyx_L8;
  }
+2417:             c_buf = buffer._impl
    __pyx_t_11 = __pyx_v_buffer->_impl;
    __pyx_v_c_buf = __pyx_t_11;
 2418:         else:
+2419:             c_buf = self._buffer._impl
  /*else*/ {
    __pyx_t_11 = __pyx_v_self->_buffer->_impl;
    __pyx_v_c_buf = __pyx_t_11;
  }
  __pyx_L8:;
+2420:         if line_sender_buffer_size(c_buf) == 0:
  __pyx_t_9 = (line_sender_buffer_size(__pyx_v_c_buf) == 0);
  if (__pyx_t_9) {
/* … */
  }
+2421:             return
    __Pyx_XDECREF(__pyx_r);
    __pyx_r = Py_None; __Pyx_INCREF(Py_None);
    goto __pyx_L0;
 2422: 
 2423:         # We might be blocking on IO, so temporarily release the GIL.
+2424:         _ensure_doesnt_have_gil(&gs)
  __pyx_t_9 = __pyx_f_7questdb_7ingress__ensure_doesnt_have_gil((&__pyx_v_gs)); if (unlikely(__pyx_t_9 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2424, __pyx_L1_error)
+2425:         if transactional:
  if (__pyx_v_transactional) {
/* … */
    goto __pyx_L10;
  }
+2426:             ok = line_sender_flush_and_keep_with_flags(
    __pyx_v_ok = line_sender_flush_and_keep_with_flags(__pyx_v_sender, __pyx_v_c_buf, __pyx_v_transactional, (&__pyx_v_err));
 2427:                     sender,
 2428:                     c_buf,
 2429:                     transactional,
 2430:                     &err)
+2431:             if ok and clear:
    if (__pyx_v_ok) {
    } else {
      __pyx_t_9 = __pyx_v_ok;
      goto __pyx_L12_bool_binop_done;
    }
    __pyx_t_9 = __pyx_v_clear;
    __pyx_L12_bool_binop_done:;
    if (__pyx_t_9) {
/* … */
    }
+2432:                 line_sender_buffer_clear(c_buf)
      line_sender_buffer_clear(__pyx_v_c_buf);
+2433:         elif clear:
  if (__pyx_v_clear) {
/* … */
    goto __pyx_L10;
  }
+2434:             ok = line_sender_flush(sender, c_buf, &err)
    __pyx_v_ok = line_sender_flush(__pyx_v_sender, __pyx_v_c_buf, (&__pyx_v_err));
 2435:         else:
+2436:             ok = line_sender_flush_and_keep(sender, c_buf, &err)
  /*else*/ {
    __pyx_v_ok = line_sender_flush_and_keep(__pyx_v_sender, __pyx_v_c_buf, (&__pyx_v_err));
  }
  __pyx_L10:;
+2437:         _ensure_has_gil(&gs)
  __pyx_f_7questdb_7ingress__ensure_has_gil((&__pyx_v_gs)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2437, __pyx_L1_error)
+2438:         if not ok:
  __pyx_t_9 = (!__pyx_v_ok);
  if (__pyx_t_9) {
/* … */
  }
+2439:             if c_buf == self._buffer._impl:
    __pyx_t_9 = (__pyx_v_c_buf == __pyx_v_self->_buffer->_impl);
    if (__pyx_t_9) {
/* … */
    }
 2440:                 # Prevent a follow-up call to `.close(flush=True)` (as is
 2441:                 # usually called from `__exit__`) to raise after the sender
 2442:                 # entered an error state following a failed call to `.flush()`.
 2443:                 # Note: In this case `clear` is always `True`.
+2444:                 line_sender_buffer_clear(c_buf)
      line_sender_buffer_clear(__pyx_v_c_buf);
+2445:             if _is_tcp_protocol(self._c_protocol):
    __pyx_t_9 = __pyx_f_7questdb_7ingress__is_tcp_protocol(__pyx_v_self->_c_protocol); if (unlikely(__pyx_t_9 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2445, __pyx_L1_error)
    if (unlikely(__pyx_t_9)) {
/* … */
    }
 2446:                 # Provide further context pointing to the logs.
+2447:                 raise c_err_to_py_fmt(err, _FLUSH_FMT)
      __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_FLUSH_FMT); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2447, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!(likely(PyUnicode_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("unicode", __pyx_t_1))) __PYX_ERR(0, 2447, __pyx_L1_error)
      __pyx_t_2 = __pyx_f_7questdb_7ingress_c_err_to_py_fmt(__pyx_v_err, ((PyObject*)__pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2447, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_Raise(__pyx_t_2, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __PYX_ERR(0, 2447, __pyx_L1_error)
 2448:             else:
+2449:                 raise c_err_to_py(err)
    /*else*/ {
      __pyx_t_2 = __pyx_f_7questdb_7ingress_c_err_to_py(__pyx_v_err); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2449, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_Raise(__pyx_t_2, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __PYX_ERR(0, 2449, __pyx_L1_error)
    }
 2450: 
+2451:     cdef _close(self):
static PyObject *__pyx_f_7questdb_7ingress_6Sender__close(struct __pyx_obj_7questdb_7ingress_Sender *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
/* … */
  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
+2452:         self._buffer = None
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF((PyObject *)__pyx_v_self->_buffer);
  __Pyx_DECREF((PyObject *)__pyx_v_self->_buffer);
  __pyx_v_self->_buffer = ((struct __pyx_obj_7questdb_7ingress_Buffer *)Py_None);
+2453:         line_sender_opts_free(self._opts)
  line_sender_opts_free(__pyx_v_self->_opts);
+2454:         self._opts = NULL
  __pyx_v_self->_opts = NULL;
+2455:         line_sender_close(self._impl)
  line_sender_close(__pyx_v_self->_impl);
+2456:         self._impl = NULL
  __pyx_v_self->_impl = NULL;
 2457: 
+2458:     cpdef close(self, bint flush=True):
static PyObject *__pyx_pw_7questdb_7ingress_6Sender_27close(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_f_7questdb_7ingress_6Sender_close(struct __pyx_obj_7questdb_7ingress_Sender *__pyx_v_self, int __pyx_skip_dispatch, struct __pyx_opt_args_7questdb_7ingress_6Sender_close *__pyx_optional_args) {
  int __pyx_v_flush = ((int)1);
  PyObject *__pyx_r = NULL;
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_flush = __pyx_optional_args->flush;
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_close); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2458, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!__Pyx_IsSameCFunction(__pyx_t_1, (void*) __pyx_pw_7questdb_7ingress_6Sender_27close)) {
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_flush); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2458, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_4 = __pyx_t_1; __pyx_t_5 = NULL;
        __pyx_t_6 = 0;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
          if (likely(__pyx_t_5)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
            __Pyx_INCREF(__pyx_t_5);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_4, function);
            __pyx_t_6 = 1;
          }
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_3};
          __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6);
          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2458, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        }
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }
/* … */
  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("questdb.ingress.Sender.close", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7questdb_7ingress_6Sender_27close(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7questdb_7ingress_6Sender_26close, "\n        Disconnect.\n\n        This method is idempotent and can be called repeatedly.\n\n        Once a sender is closed, it can't be re-used.\n\n        :param bool flush: If ``True``, flush the internal buffer before closing.\n        ");
static PyMethodDef __pyx_mdef_7questdb_7ingress_6Sender_27close = {"close", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7questdb_7ingress_6Sender_27close, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7questdb_7ingress_6Sender_26close};
static PyObject *__pyx_pw_7questdb_7ingress_6Sender_27close(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  int __pyx_v_flush;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("close (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_flush,0};
  PyObject* values[1] = {0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_flush);
          if (value) { values[0] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2458, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "close") < 0)) __PYX_ERR(0, 2458, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    if (values[0]) {
      __pyx_v_flush = __Pyx_PyObject_IsTrue(values[0]); if (unlikely((__pyx_v_flush == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2458, __pyx_L3_error)
    } else {
      __pyx_v_flush = ((int)1);
    }
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("close", 0, 0, 1, __pyx_nargs); __PYX_ERR(0, 2458, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("questdb.ingress.Sender.close", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7questdb_7ingress_6Sender_26close(((struct __pyx_obj_7questdb_7ingress_Sender *)__pyx_v_self), __pyx_v_flush);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7questdb_7ingress_6Sender_26close(struct __pyx_obj_7questdb_7ingress_Sender *__pyx_v_self, int __pyx_v_flush) {
  PyObject *__pyx_r = NULL;
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.flush = __pyx_v_flush;
  __pyx_t_1 = __pyx_vtabptr_7questdb_7ingress_Sender->close(__pyx_v_self, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2458, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("questdb.ingress.Sender.close", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
/* … */
  __pyx_tuple__111 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_flush); if (unlikely(!__pyx_tuple__111)) __PYX_ERR(0, 2458, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__111);
  __Pyx_GIVEREF(__pyx_tuple__111);
  __pyx_codeobj__112 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__111, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_questdb_ingress_pyx, __pyx_n_s_close, 2458, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__112)) __PYX_ERR(0, 2458, __pyx_L1_error)
/* … */
  __pyx_t_19 = __Pyx_CyFunction_New(&__pyx_mdef_7questdb_7ingress_6Sender_27close, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Sender_close, NULL, __pyx_n_s_questdb_ingress, __pyx_d, ((PyObject *)__pyx_codeobj__112)); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 2458, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_19);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_19, __pyx_tuple__113);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_7questdb_7ingress_Sender, __pyx_n_s_close, __pyx_t_19) < 0) __PYX_ERR(0, 2458, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
  PyType_Modified(__pyx_ptype_7questdb_7ingress_Sender);
  __pyx_tuple__113 = PyTuple_Pack(1, Py_True); if (unlikely(!__pyx_tuple__113)) __PYX_ERR(0, 2458, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__113);
  __Pyx_GIVEREF(__pyx_tuple__113);
/* … */
struct __pyx_opt_args_7questdb_7ingress_6Sender_close {
  int __pyx_n;
  int flush;
};
 2459:         """
 2460:         Disconnect.
 2461: 
 2462:         This method is idempotent and can be called repeatedly.
 2463: 
 2464:         Once a sender is closed, it can't be re-used.
 2465: 
 2466:         :param bool flush: If ``True``, flush the internal buffer before closing.
 2467:         """
+2468:         try:
  /*try:*/ {
+2469:             if (flush and (self._impl != NULL) and
    if (__pyx_v_flush) {
    } else {
      __pyx_t_7 = __pyx_v_flush;
      goto __pyx_L7_bool_binop_done;
    }
    __pyx_t_8 = (__pyx_v_self->_impl != NULL);
    if (__pyx_t_8) {
    } else {
      __pyx_t_7 = __pyx_t_8;
      goto __pyx_L7_bool_binop_done;
    }
/* … */
    if (__pyx_t_7) {
/* … */
    }
  }
+2470:                     (not line_sender_must_close(self._impl))):
    __pyx_t_8 = (!line_sender_must_close(__pyx_v_self->_impl));
    __pyx_t_7 = __pyx_t_8;
    __pyx_L7_bool_binop_done:;
+2471:                 self.flush(None, True)
      __pyx_t_9.__pyx_n = 2;
      __pyx_t_9.buffer = ((struct __pyx_obj_7questdb_7ingress_Buffer *)Py_None);
      __pyx_t_9.clear = 1;
      __pyx_t_1 = ((struct __pyx_vtabstruct_7questdb_7ingress_Sender *)__pyx_v_self->__pyx_vtab)->flush(__pyx_v_self, 0, &__pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2471, __pyx_L4_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 2472:         finally:
+2473:             self._close()
  /*finally:*/ {
    /*normal exit:*/{
      __pyx_t_1 = ((struct __pyx_vtabstruct_7questdb_7ingress_Sender *)__pyx_v_self->__pyx_vtab)->_close(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2473, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L5;
    }
    __pyx_L4_error:;
    /*exception exit:*/{
      __Pyx_PyThreadState_declare
      __Pyx_PyThreadState_assign
      __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0;
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_15, &__pyx_t_16, &__pyx_t_17);
      if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14) < 0)) __Pyx_ErrFetch(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14);
      __Pyx_XGOTREF(__pyx_t_12);
      __Pyx_XGOTREF(__pyx_t_13);
      __Pyx_XGOTREF(__pyx_t_14);
      __Pyx_XGOTREF(__pyx_t_15);
      __Pyx_XGOTREF(__pyx_t_16);
      __Pyx_XGOTREF(__pyx_t_17);
      __pyx_t_6 = __pyx_lineno; __pyx_t_10 = __pyx_clineno; __pyx_t_11 = __pyx_filename;
      {
        __pyx_t_1 = ((struct __pyx_vtabstruct_7questdb_7ingress_Sender *)__pyx_v_self->__pyx_vtab)->_close(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2473, __pyx_L11_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      }
      if (PY_MAJOR_VERSION >= 3) {
        __Pyx_XGIVEREF(__pyx_t_15);
        __Pyx_XGIVEREF(__pyx_t_16);
        __Pyx_XGIVEREF(__pyx_t_17);
        __Pyx_ExceptionReset(__pyx_t_15, __pyx_t_16, __pyx_t_17);
      }
      __Pyx_XGIVEREF(__pyx_t_12);
      __Pyx_XGIVEREF(__pyx_t_13);
      __Pyx_XGIVEREF(__pyx_t_14);
      __Pyx_ErrRestore(__pyx_t_12, __pyx_t_13, __pyx_t_14);
      __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0;
      __pyx_lineno = __pyx_t_6; __pyx_clineno = __pyx_t_10; __pyx_filename = __pyx_t_11;
      goto __pyx_L1_error;
      __pyx_L11_error:;
      if (PY_MAJOR_VERSION >= 3) {
        __Pyx_XGIVEREF(__pyx_t_15);
        __Pyx_XGIVEREF(__pyx_t_16);
        __Pyx_XGIVEREF(__pyx_t_17);
        __Pyx_ExceptionReset(__pyx_t_15, __pyx_t_16, __pyx_t_17);
      }
      __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
      __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
      __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
      __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0;
      goto __pyx_L1_error;
    }
    __pyx_L5:;
  }
 2474: 
+2475:     def __exit__(self, exc_type, _exc_val, _exc_tb):
/* Python wrapper */
static PyObject *__pyx_pw_7questdb_7ingress_6Sender_29__exit__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7questdb_7ingress_6Sender_28__exit__, "\n        Flush pending and disconnect at the end of a ``with`` block.\n\n        If the ``with`` block raises an exception, any pending data will\n        *NOT* be flushed.\n\n        This is implemented by calling :func:`Sender.close`.\n        ");
static PyMethodDef __pyx_mdef_7questdb_7ingress_6Sender_29__exit__ = {"__exit__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7questdb_7ingress_6Sender_29__exit__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7questdb_7ingress_6Sender_28__exit__};
static PyObject *__pyx_pw_7questdb_7ingress_6Sender_29__exit__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_exc_type = 0;
  CYTHON_UNUSED PyObject *__pyx_v__exc_val = 0;
  CYTHON_UNUSED PyObject *__pyx_v__exc_tb = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__exit__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_exc_type,&__pyx_n_s_exc_val,&__pyx_n_s_exc_tb,0};
  PyObject* values[3] = {0,0,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_exc_type)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2475, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_exc_val)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2475, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__exit__", 1, 3, 3, 1); __PYX_ERR(0, 2475, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_exc_tb)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[2]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2475, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__exit__", 1, 3, 3, 2); __PYX_ERR(0, 2475, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__exit__") < 0)) __PYX_ERR(0, 2475, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 3)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
      values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
    }
    __pyx_v_exc_type = values[0];
    __pyx_v__exc_val = values[1];
    __pyx_v__exc_tb = values[2];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__exit__", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 2475, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("questdb.ingress.Sender.__exit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7questdb_7ingress_6Sender_28__exit__(((struct __pyx_obj_7questdb_7ingress_Sender *)__pyx_v_self), __pyx_v_exc_type, __pyx_v__exc_val, __pyx_v__exc_tb);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7questdb_7ingress_6Sender_28__exit__(struct __pyx_obj_7questdb_7ingress_Sender *__pyx_v_self, PyObject *__pyx_v_exc_type, CYTHON_UNUSED PyObject *__pyx_v__exc_val, CYTHON_UNUSED PyObject *__pyx_v__exc_tb) {
  PyObject *__pyx_r = NULL;
/* … */
  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("questdb.ingress.Sender.__exit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
/* … */
  __pyx_tuple__114 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_exc_type, __pyx_n_s_exc_val, __pyx_n_s_exc_tb); if (unlikely(!__pyx_tuple__114)) __PYX_ERR(0, 2475, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__114);
  __Pyx_GIVEREF(__pyx_tuple__114);
/* … */
  __pyx_t_19 = __Pyx_CyFunction_New(&__pyx_mdef_7questdb_7ingress_6Sender_29__exit__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Sender___exit, NULL, __pyx_n_s_questdb_ingress, __pyx_d, ((PyObject *)__pyx_codeobj__115)); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 2475, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_19);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_7questdb_7ingress_Sender, __pyx_n_s_exit, __pyx_t_19) < 0) __PYX_ERR(0, 2475, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
  PyType_Modified(__pyx_ptype_7questdb_7ingress_Sender);
  __pyx_codeobj__115 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__114, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_questdb_ingress_pyx, __pyx_n_s_exit, 2475, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__115)) __PYX_ERR(0, 2475, __pyx_L1_error)
 2476:         """
 2477:         Flush pending and disconnect at the end of a ``with`` block.
 2478: 
 2479:         If the ``with`` block raises an exception, any pending data will
 2480:         *NOT* be flushed.
 2481: 
 2482:         This is implemented by calling :func:`Sender.close`.
 2483:         """
+2484:         self.close(not exc_type)
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_exc_type); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 2484, __pyx_L1_error)
  __pyx_t_3.__pyx_n = 1;
  __pyx_t_3.flush = (!__pyx_t_1);
  __pyx_t_2 = ((struct __pyx_vtabstruct_7questdb_7ingress_Sender *)__pyx_v_self->__pyx_vtab)->close(__pyx_v_self, 0, &__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2484, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 2485: 
+2486:     def __dealloc__(self):
/* Python wrapper */
static void __pyx_pw_7questdb_7ingress_6Sender_31__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_7questdb_7ingress_6Sender_31__dealloc__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_pf_7questdb_7ingress_6Sender_30__dealloc__(((struct __pyx_obj_7questdb_7ingress_Sender *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

static void __pyx_pf_7questdb_7ingress_6Sender_30__dealloc__(struct __pyx_obj_7questdb_7ingress_Sender *__pyx_v_self) {
/* … */
  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_WriteUnraisable("questdb.ingress.Sender.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
}
+2487:         self._close()
  __pyx_t_1 = ((struct __pyx_vtabstruct_7questdb_7ingress_Sender *)__pyx_v_self->__pyx_vtab)->_close(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2487, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+2488:         free(self._last_flush_ms)
  free(__pyx_v_self->_last_flush_ms);
 2489: