/usr/lib/python3/dist-packages/kdb.py is in python3-elektra 0.8.14-5.1ubuntu2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 | # This file was automatically generated by SWIG (http://www.swig.org).
# Version 3.0.10
#
# Do not make changes to this file unless you know what you are doing--modify
# the SWIG interface file instead.
from sys import version_info as _swig_python_version_info
if _swig_python_version_info >= (3, 0, 0):
new_instancemethod = lambda func, inst, cls: _kdb.SWIG_PyInstanceMethod_New(func)
else:
from new import instancemethod as new_instancemethod
if _swig_python_version_info >= (2, 7, 0):
def swig_import_helper():
import importlib
pkg = __name__.rpartition('.')[0]
mname = '.'.join((pkg, '_kdb')).lstrip('.')
try:
return importlib.import_module(mname)
except ImportError:
return importlib.import_module('_kdb')
_kdb = swig_import_helper()
del swig_import_helper
elif _swig_python_version_info >= (2, 6, 0):
def swig_import_helper():
from os.path import dirname
import imp
fp = None
try:
fp, pathname, description = imp.find_module('_kdb', [dirname(__file__)])
except ImportError:
import _kdb
return _kdb
if fp is not None:
try:
_mod = imp.load_module('_kdb', fp, pathname, description)
finally:
fp.close()
return _mod
_kdb = swig_import_helper()
del swig_import_helper
else:
import _kdb
del _swig_python_version_info
try:
_swig_property = property
except NameError:
pass # Python < 2.2 doesn't have 'property'.
try:
import builtins as __builtin__
except ImportError:
import __builtin__
def _swig_setattr_nondynamic(self, class_type, name, value, static=1):
if (name == "thisown"):
return self.this.own(value)
if (name == "this"):
if type(value).__name__ == 'SwigPyObject':
self.__dict__[name] = value
return
method = class_type.__swig_setmethods__.get(name, None)
if method:
return method(self, value)
if (not static):
object.__setattr__(self, name, value)
else:
raise AttributeError("You cannot add attributes to %s" % self)
def _swig_setattr(self, class_type, name, value):
return _swig_setattr_nondynamic(self, class_type, name, value, 0)
def _swig_getattr(self, class_type, name):
if (name == "thisown"):
return self.this.own()
method = class_type.__swig_getmethods__.get(name, None)
if method:
return method(self)
raise AttributeError("'%s' object has no attribute '%s'" % (class_type.__name__, name))
def _swig_repr(self):
try:
strthis = "proxy of " + self.this.__repr__()
except __builtin__.Exception:
strthis = ""
return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,)
def _swig_setattr_nondynamic_method(set):
def set_attr(self, name, value):
if (name == "thisown"):
return self.this.own(value)
if hasattr(self, name) or (name == "this"):
set(self, name, value)
else:
raise AttributeError("You cannot add attributes to %s" % self)
return set_attr
class SwigPyIterator(object):
thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
def __init__(self, *args, **kwargs):
raise AttributeError("No constructor defined - class is abstract")
__repr__ = _swig_repr
__swig_destroy__ = _kdb.delete_SwigPyIterator
def __iter__(self):
return self
SwigPyIterator.value = new_instancemethod(_kdb.SwigPyIterator_value, None, SwigPyIterator)
SwigPyIterator.incr = new_instancemethod(_kdb.SwigPyIterator_incr, None, SwigPyIterator)
SwigPyIterator.decr = new_instancemethod(_kdb.SwigPyIterator_decr, None, SwigPyIterator)
SwigPyIterator.distance = new_instancemethod(_kdb.SwigPyIterator_distance, None, SwigPyIterator)
SwigPyIterator.equal = new_instancemethod(_kdb.SwigPyIterator_equal, None, SwigPyIterator)
SwigPyIterator.copy = new_instancemethod(_kdb.SwigPyIterator_copy, None, SwigPyIterator)
SwigPyIterator.next = new_instancemethod(_kdb.SwigPyIterator_next, None, SwigPyIterator)
SwigPyIterator.__next__ = new_instancemethod(_kdb.SwigPyIterator___next__, None, SwigPyIterator)
SwigPyIterator.previous = new_instancemethod(_kdb.SwigPyIterator_previous, None, SwigPyIterator)
SwigPyIterator.advance = new_instancemethod(_kdb.SwigPyIterator_advance, None, SwigPyIterator)
SwigPyIterator.__eq__ = new_instancemethod(_kdb.SwigPyIterator___eq__, None, SwigPyIterator)
SwigPyIterator.__ne__ = new_instancemethod(_kdb.SwigPyIterator___ne__, None, SwigPyIterator)
SwigPyIterator.__iadd__ = new_instancemethod(_kdb.SwigPyIterator___iadd__, None, SwigPyIterator)
SwigPyIterator.__isub__ = new_instancemethod(_kdb.SwigPyIterator___isub__, None, SwigPyIterator)
SwigPyIterator.__add__ = new_instancemethod(_kdb.SwigPyIterator___add__, None, SwigPyIterator)
SwigPyIterator.__sub__ = new_instancemethod(_kdb.SwigPyIterator___sub__, None, SwigPyIterator)
SwigPyIterator_swigregister = _kdb.SwigPyIterator_swigregister
SwigPyIterator_swigregister(SwigPyIterator)
DB_SYSTEM = _kdb.DB_SYSTEM
DB_USER = _kdb.DB_USER
DB_HOME = _kdb.DB_HOME
DEBUG = _kdb.DEBUG
VERBOSE = _kdb.VERBOSE
KS_END = _kdb.KS_END
VERSION = _kdb.VERSION
VERSION_MAJOR = _kdb.VERSION_MAJOR
VERSION_MINOR = _kdb.VERSION_MINOR
VERSION_MICRO = _kdb.VERSION_MICRO
KDB_VERSION = _kdb.KDB_VERSION
KDB_VERSION_MAJOR = _kdb.KDB_VERSION_MAJOR
KDB_VERSION_MINOR = _kdb.KDB_VERSION_MINOR
KDB_VERSION_MICRO = _kdb.KDB_VERSION_MICRO
KEY_FLAGS = _kdb.KEY_FLAGS
KEY_END = _kdb.KEY_END
KEY_NAME = _kdb.KEY_NAME
KEY_VALUE = _kdb.KEY_VALUE
KEY_OWNER = _kdb.KEY_OWNER
KEY_COMMENT = _kdb.KEY_COMMENT
KEY_BINARY = _kdb.KEY_BINARY
KEY_UID = _kdb.KEY_UID
KEY_GID = _kdb.KEY_GID
KEY_MODE = _kdb.KEY_MODE
KEY_ATIME = _kdb.KEY_ATIME
KEY_MTIME = _kdb.KEY_MTIME
KEY_CTIME = _kdb.KEY_CTIME
KEY_SIZE = _kdb.KEY_SIZE
KEY_FUNC = _kdb.KEY_FUNC
KEY_DIR = _kdb.KEY_DIR
KEY_META = _kdb.KEY_META
KEY_NULL = _kdb.KEY_NULL
KEY_CASCADING_NAME = _kdb.KEY_CASCADING_NAME
KEY_META_NAME = _kdb.KEY_META_NAME
KDB_O_NONE = _kdb.KDB_O_NONE
KDB_O_DEL = _kdb.KDB_O_DEL
KDB_O_POP = _kdb.KDB_O_POP
KDB_O_NODIR = _kdb.KDB_O_NODIR
KDB_O_DIRONLY = _kdb.KDB_O_DIRONLY
KDB_O_NOREMOVE = _kdb.KDB_O_NOREMOVE
KDB_O_REMOVEONLY = _kdb.KDB_O_REMOVEONLY
KDB_O_INACTIVE = _kdb.KDB_O_INACTIVE
KDB_O_SYNC = _kdb.KDB_O_SYNC
KDB_O_SORT = _kdb.KDB_O_SORT
KDB_O_NORECURSIVE = _kdb.KDB_O_NORECURSIVE
KDB_O_NOCASE = _kdb.KDB_O_NOCASE
KDB_O_WITHOWNER = _kdb.KDB_O_WITHOWNER
KDB_O_NOALL = _kdb.KDB_O_NOALL
import warnings
class Exception(Exception):
"""Proxy of C++ kdb::Exception class."""
__swig_setmethods__ = {}
__setattr__ = lambda self, name, value: _swig_setattr(self, Exception, name, value)
__swig_getmethods__ = {}
__getattr__ = lambda self, name: _swig_getattr(self, Exception, name)
__repr__ = _swig_repr
def what(self) -> "char const *":
"""
what(Exception self) -> char const *
Parameters
----------
self: kdb::Exception const *
"""
return _kdb.Exception_what(self)
def __str__(self):
return self.what()
def __init__(self):
"""__init__(kdb::Exception self) -> Exception"""
_kdb.Exception_swiginit(self, _kdb.new_Exception())
__swig_destroy__ = _kdb.delete_Exception
Exception.what = new_instancemethod(_kdb.Exception_what, None, Exception)
Exception_swigregister = _kdb.Exception_swigregister
Exception_swigregister(Exception)
class KeyException(Exception):
"""Proxy of C++ kdb::KeyException class."""
thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
__repr__ = _swig_repr
def __init__(self):
"""__init__(kdb::KeyException self) -> KeyException"""
_kdb.KeyException_swiginit(self, _kdb.new_KeyException())
__swig_destroy__ = _kdb.delete_KeyException
KeyException_swigregister = _kdb.KeyException_swigregister
KeyException_swigregister(KeyException)
class KeyTypeMismatch(KeyException):
"""Proxy of C++ kdb::KeyTypeMismatch class."""
thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
__repr__ = _swig_repr
def __init__(self):
"""__init__(kdb::KeyTypeMismatch self) -> KeyTypeMismatch"""
_kdb.KeyTypeMismatch_swiginit(self, _kdb.new_KeyTypeMismatch())
__swig_destroy__ = _kdb.delete_KeyTypeMismatch
KeyTypeMismatch_swigregister = _kdb.KeyTypeMismatch_swigregister
KeyTypeMismatch_swigregister(KeyTypeMismatch)
class KeyTypeConversion(KeyException):
"""Proxy of C++ kdb::KeyTypeConversion class."""
thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
__repr__ = _swig_repr
def __init__(self):
"""__init__(kdb::KeyTypeConversion self) -> KeyTypeConversion"""
_kdb.KeyTypeConversion_swiginit(self, _kdb.new_KeyTypeConversion())
__swig_destroy__ = _kdb.delete_KeyTypeConversion
KeyTypeConversion_swigregister = _kdb.KeyTypeConversion_swigregister
KeyTypeConversion_swigregister(KeyTypeConversion)
class KeyInvalidName(KeyException):
"""Proxy of C++ kdb::KeyInvalidName class."""
thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
__repr__ = _swig_repr
def __init__(self):
"""__init__(kdb::KeyInvalidName self) -> KeyInvalidName"""
_kdb.KeyInvalidName_swiginit(self, _kdb.new_KeyInvalidName())
__swig_destroy__ = _kdb.delete_KeyInvalidName
KeyInvalidName_swigregister = _kdb.KeyInvalidName_swigregister
KeyInvalidName_swigregister(KeyInvalidName)
class KDBException(Exception):
"""Proxy of C++ kdb::KDBException class."""
thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
__repr__ = _swig_repr
def __init__(self, key: 'Key'):
"""
__init__(kdb::KDBException self, Key key) -> KDBException
Parameters
----------
key: Key
"""
_kdb.KDBException_swiginit(self, _kdb.new_KDBException(key))
__swig_destroy__ = _kdb.delete_KDBException
KDBException_swigregister = _kdb.KDBException_swigregister
KDBException_swigregister(KDBException)
class Key(object):
"""Proxy of C++ kdb::Key class."""
thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
__repr__ = _swig_repr
def _incRef(self) -> "void":
"""
_incRef(Key self)
Parameters
----------
self: kdb::Key const *
"""
return _kdb.Key__incRef(self)
def _decRef(self) -> "void":
"""
_decRef(Key self)
Parameters
----------
self: kdb::Key const *
"""
return _kdb.Key__decRef(self)
def getReferenceCounter(self) -> "ssize_t":
"""
getReferenceCounter(Key self) -> ssize_t
Parameters
----------
self: kdb::Key const *
"""
return _kdb.Key_getReferenceCounter(self)
def copy(self, other: 'Key') -> "void":
"""
copy(Key self, Key other)
Parameters
----------
other: kdb::Key const &
"""
return _kdb.Key_copy(self, other)
def clear(self) -> "void":
"""
clear(Key self)
Parameters
----------
self: kdb::Key *
"""
return _kdb.Key_clear(self)
def getKey(self) -> "ckdb::Key *":
"""
getKey(Key self) -> ckdb::Key *
Parameters
----------
self: kdb::Key const *
"""
return _kdb.Key_getKey(self)
def __ref__(self) -> "ckdb::Key *":
"""
__ref__(Key self) -> ckdb::Key *
Parameters
----------
self: kdb::Key const *
"""
return _kdb.Key___ref__(self)
def release(self) -> "ckdb::Key *":
"""
release(Key self) -> ckdb::Key *
Parameters
----------
self: kdb::Key *
"""
return _kdb.Key_release(self)
def dup(self) -> "ckdb::Key *":
"""
dup(Key self) -> ckdb::Key *
Parameters
----------
self: kdb::Key const *
"""
return _kdb.Key_dup(self)
__swig_destroy__ = _kdb.delete_Key
def _getName(self) -> "std::string":
"""
_getName(Key self) -> std::string
Parameters
----------
self: kdb::Key const *
"""
return _kdb.Key__getName(self)
def _getNameSize(self) -> "ssize_t":
"""
_getNameSize(Key self) -> ssize_t
Parameters
----------
self: kdb::Key const *
"""
return _kdb.Key__getNameSize(self)
def _getBaseName(self) -> "std::string":
"""
_getBaseName(Key self) -> std::string
Parameters
----------
self: kdb::Key const *
"""
return _kdb.Key__getBaseName(self)
def _getBaseNameSize(self) -> "ssize_t":
"""
_getBaseNameSize(Key self) -> ssize_t
Parameters
----------
self: kdb::Key const *
"""
return _kdb.Key__getBaseNameSize(self)
def _setName(self, newName: 'std::string const &') -> "void":
"""
_setName(Key self, std::string const & newName)
Parameters
----------
newName: std::string const &
"""
return _kdb.Key__setName(self, newName)
def addName(self, addedName: 'std::string const &') -> "void":
"""
addName(Key self, std::string const & addedName)
Parameters
----------
addedName: std::string const &
"""
return _kdb.Key_addName(self, addedName)
def _setBaseName(self, baseName: 'std::string const &') -> "void":
"""
_setBaseName(Key self, std::string const & baseName)
Parameters
----------
baseName: std::string const &
"""
return _kdb.Key__setBaseName(self, baseName)
def addBaseName(self, baseName: 'std::string const &') -> "void":
"""
addBaseName(Key self, std::string const & baseName)
Parameters
----------
baseName: std::string const &
"""
return _kdb.Key_addBaseName(self, baseName)
def _getFullNameSize(self) -> "ssize_t":
"""
_getFullNameSize(Key self) -> ssize_t
Parameters
----------
self: kdb::Key const *
"""
return _kdb.Key__getFullNameSize(self)
def _getFullName(self) -> "std::string":
"""
_getFullName(Key self) -> std::string
Parameters
----------
self: kdb::Key const *
"""
return _kdb.Key__getFullName(self)
def __eq__(self, k: 'Key') -> "bool":
"""
__eq__(Key self, Key k) -> bool
Parameters
----------
k: kdb::Key const &
"""
return _kdb.Key___eq__(self, k)
def __ne__(self, k: 'Key') -> "bool":
"""
__ne__(Key self, Key k) -> bool
Parameters
----------
k: kdb::Key const &
"""
return _kdb.Key___ne__(self, k)
def __lt__(self, other: 'Key') -> "bool":
"""
__lt__(Key self, Key other) -> bool
Parameters
----------
other: kdb::Key const &
"""
return _kdb.Key___lt__(self, other)
def __le__(self, other: 'Key') -> "bool":
"""
__le__(Key self, Key other) -> bool
Parameters
----------
other: kdb::Key const &
"""
return _kdb.Key___le__(self, other)
def __gt__(self, other: 'Key') -> "bool":
"""
__gt__(Key self, Key other) -> bool
Parameters
----------
other: kdb::Key const &
"""
return _kdb.Key___gt__(self, other)
def __ge__(self, other: 'Key') -> "bool":
"""
__ge__(Key self, Key other) -> bool
Parameters
----------
other: kdb::Key const &
"""
return _kdb.Key___ge__(self, other)
def isNull(self) -> "bool":
"""
isNull(Key self) -> bool
Parameters
----------
self: kdb::Key const *
"""
return _kdb.Key_isNull(self)
def __nonzero__(self):
return _kdb.Key___nonzero__(self)
__bool__ = __nonzero__
def needSync(self) -> "bool":
"""
needSync(Key self) -> bool
Parameters
----------
self: kdb::Key const *
"""
return _kdb.Key_needSync(self)
def _getString(self) -> "std::string":
"""
_getString(Key self) -> std::string
Parameters
----------
self: kdb::Key const *
"""
return _kdb.Key__getString(self)
def _setString(self, newString: 'std::string') -> "void":
"""
_setString(Key self, std::string newString)
Parameters
----------
newString: std::string
"""
return _kdb.Key__setString(self, newString)
def _getStringSize(self) -> "ssize_t":
"""
_getStringSize(Key self) -> ssize_t
Parameters
----------
self: kdb::Key const *
"""
return _kdb.Key__getStringSize(self)
def _getFunc(self) -> "kdb::Key::func_t":
"""
_getFunc(Key self) -> kdb::Key::func_t
Parameters
----------
self: kdb::Key const *
"""
return _kdb.Key__getFunc(self)
def setCallback(self, fct: 'kdb::Key::callback_t') -> "void":
"""
setCallback(Key self, kdb::Key::callback_t fct)
Parameters
----------
fct: kdb::Key::callback_t
"""
return _kdb.Key_setCallback(self, fct)
def _getValue(self) -> "void const *":
"""
_getValue(Key self) -> void const *
Parameters
----------
self: kdb::Key const *
"""
return _kdb.Key__getValue(self)
def _getBinary(self) -> "std::string":
"""
_getBinary(Key self) -> std::string
Parameters
----------
self: kdb::Key const *
"""
return _kdb.Key__getBinary(self)
def _getBinarySize(self) -> "ssize_t":
"""
_getBinarySize(Key self) -> ssize_t
Parameters
----------
self: kdb::Key const *
"""
return _kdb.Key__getBinarySize(self)
def _setBinary(self, newBinary: 'void const *') -> "ssize_t":
"""
_setBinary(Key self, void const * newBinary) -> ssize_t
Parameters
----------
newBinary: void const *
"""
return _kdb.Key__setBinary(self, newBinary)
def hasMeta(self, metaName: 'std::string const &') -> "bool":
"""
hasMeta(Key self, std::string const & metaName) -> bool
Parameters
----------
metaName: std::string const &
"""
return _kdb.Key_hasMeta(self, metaName)
def delMeta(self, metaName: 'std::string const &') -> "void":
"""
delMeta(Key self, std::string const & metaName)
Parameters
----------
metaName: std::string const &
"""
return _kdb.Key_delMeta(self, metaName)
def copyMeta(self, other: 'Key', metaName: 'std::string const &') -> "void":
"""
copyMeta(Key self, Key other, std::string const & metaName)
Parameters
----------
other: kdb::Key const &
metaName: std::string const &
"""
return _kdb.Key_copyMeta(self, other, metaName)
def copyAllMeta(self, other: 'Key') -> "void":
"""
copyAllMeta(Key self, Key other)
Parameters
----------
other: kdb::Key const &
"""
return _kdb.Key_copyAllMeta(self, other)
def _rewindMeta(self) -> "void":
"""
_rewindMeta(Key self)
Parameters
----------
self: kdb::Key const *
"""
return _kdb.Key__rewindMeta(self)
def _nextMeta(self) -> "kdb::Key const":
"""
_nextMeta(Key self) -> Key
Parameters
----------
self: kdb::Key *
"""
return _kdb.Key__nextMeta(self)
def _currentMeta(self) -> "kdb::Key const":
"""
_currentMeta(Key self) -> Key
Parameters
----------
self: kdb::Key const *
"""
return _kdb.Key__currentMeta(self)
def isValid(self) -> "bool":
"""
isValid(Key self) -> bool
Parameters
----------
self: kdb::Key const *
"""
return _kdb.Key_isValid(self)
def getNamespace(self) -> "std::string":
"""
getNamespace(Key self) -> std::string
Parameters
----------
self: kdb::Key const *
"""
return _kdb.Key_getNamespace(self)
def isSystem(self) -> "bool":
"""
isSystem(Key self) -> bool
Parameters
----------
self: kdb::Key const *
"""
return _kdb.Key_isSystem(self)
def isUser(self) -> "bool":
"""
isUser(Key self) -> bool
Parameters
----------
self: kdb::Key const *
"""
return _kdb.Key_isUser(self)
def isString(self) -> "bool":
"""
isString(Key self) -> bool
Parameters
----------
self: kdb::Key const *
"""
return _kdb.Key_isString(self)
def isBinary(self) -> "bool":
"""
isBinary(Key self) -> bool
Parameters
----------
self: kdb::Key const *
"""
return _kdb.Key_isBinary(self)
def isInactive(self) -> "bool":
"""
isInactive(Key self) -> bool
Parameters
----------
self: kdb::Key const *
"""
return _kdb.Key_isInactive(self)
def isBelow(self, k: 'Key') -> "bool":
"""
isBelow(Key self, Key k) -> bool
Parameters
----------
k: kdb::Key const &
"""
return _kdb.Key_isBelow(self, k)
def isBelowOrSame(self, k: 'Key') -> "bool":
"""
isBelowOrSame(Key self, Key k) -> bool
Parameters
----------
k: kdb::Key const &
"""
return _kdb.Key_isBelowOrSame(self, k)
def isDirectBelow(self, k: 'Key') -> "bool":
"""
isDirectBelow(Key self, Key k) -> bool
Parameters
----------
k: kdb::Key const &
"""
return _kdb.Key_isDirectBelow(self, k)
def __init__(self, *args):
"""
__init__(kdb::Key self) -> Key
__init__(kdb::Key self, ckdb::Key * k) -> Key
Parameters
----------
k: ckdb::Key *
__init__(kdb::Key self, Key k) -> Key
Parameters
----------
k: kdb::Key &
__init__(kdb::Key self, char const * name, int flags=0) -> Key
Parameters
----------
name: char const *
flags: int
__init__(kdb::Key self, char const * name) -> Key
Parameters
----------
name: char const *
"""
value = None
meta = {}
# check for copy constructor
if len(args) and isinstance(args[0], str):
arg0, args = args[0], args[1:]
flags = 0
args = iter(args)
for arg in args:
if arg == KEY_END:
break
elif arg == KEY_SIZE:
# ignore value
next(args)
elif arg == KEY_VALUE:
value = next(args)
elif arg == KEY_FUNC:
#TODO swig directors?
raise TypeError("Unsupported meta type")
elif arg == KEY_FLAGS:
flags = next(args)
elif arg == KEY_META:
k = next(args)
meta[k] = next(args)
elif isinstance(arg, int):
warnings.warn("Deprecated option in keyNew: {0}".format(arg),
DeprecationWarning)
flags |= arg
else:
warnings.warn("Unknown option in keyNew {0}".format(arg),
RuntimeWarning)
args = [ arg0, flags ]
_kdb.Key_swiginit(self, _kdb.new_Key(*args))
if value:
self.value = value
for k in meta:
self.setMeta(k, meta[k])
def __cmp__(self, o: 'Key') -> "int":
"""
__cmp__(Key self, Key o) -> int
Parameters
----------
o: kdb::Key const *
"""
return _kdb.Key___cmp__(self, o)
def __copy__(self) -> "kdb::Key *":
"""
__copy__(Key self) -> Key
Parameters
----------
self: kdb::Key *
"""
return _kdb.Key___copy__(self)
def get(self):
"""returns the keys value"""
if self.isBinary():
return self._getBinary()
return self._getString()
def set(self, value):
"""set the keys value. Can be either string or binary"""
if isinstance(value, bytes):
return self._setBinary(value)
return self._setString(str(value))
def getMeta(self, name = None):
"""returns a meta key given by name. Name can be either string or Key.
If no meta key is found None is returned.
If name is omitted an iterator object is returned.
"""
if name is not None:
meta = self._getMeta(name)
return meta if meta else None
return self.__metaIter()
def setMeta(self, name, value):
"""set a new meta key consisting of name and value"""
if isinstance(value, str):
return self._setMeta(name, value)
raise TypeError("Unsupported value type")
def __metaIter(self):
self._rewindMeta()
meta = self._nextMeta()
while meta:
yield meta
meta = self._nextMeta()
name = property(_kdb.Key__getName, _kdb.Key__setName)
value = property(get, set, None, "Key value")
basename = property(_kdb.Key__getBaseName, _kdb.Key__setBaseName)
fullname = property(_kdb.Key__getFullName)
def __str__(self):
return self.name
def __iter__(self) -> "swig::SwigPyIterator *":
"""
__iter__(Key self) -> SwigPyIterator
Parameters
----------
self: kdb::Key *
"""
return _kdb.Key___iter__(self)
def __reversed__(self) -> "swig::SwigPyIterator *":
"""
__reversed__(Key self) -> SwigPyIterator
Parameters
----------
self: kdb::Key *
"""
return _kdb.Key___reversed__(self)
def _getMeta(self, metaName: 'std::string const &') -> "kdb::Key const":
"""
_getMeta(Key self, std::string const & metaName) -> Key
Parameters
----------
metaName: std::string const &
"""
return _kdb.Key__getMeta(self, metaName)
def _setMeta(self, metaName: 'std::string const &', x: 'std::string') -> "void":
"""
_setMeta(Key self, std::string const & metaName, std::string x)
Parameters
----------
metaName: std::string const &
x: std::string
"""
return _kdb.Key__setMeta(self, metaName, x)
Key._incRef = new_instancemethod(_kdb.Key__incRef, None, Key)
Key._decRef = new_instancemethod(_kdb.Key__decRef, None, Key)
Key.getReferenceCounter = new_instancemethod(_kdb.Key_getReferenceCounter, None, Key)
Key.copy = new_instancemethod(_kdb.Key_copy, None, Key)
Key.clear = new_instancemethod(_kdb.Key_clear, None, Key)
Key.getKey = new_instancemethod(_kdb.Key_getKey, None, Key)
Key.__ref__ = new_instancemethod(_kdb.Key___ref__, None, Key)
Key.release = new_instancemethod(_kdb.Key_release, None, Key)
Key.dup = new_instancemethod(_kdb.Key_dup, None, Key)
Key._getName = new_instancemethod(_kdb.Key__getName, None, Key)
Key._getNameSize = new_instancemethod(_kdb.Key__getNameSize, None, Key)
Key._getBaseName = new_instancemethod(_kdb.Key__getBaseName, None, Key)
Key._getBaseNameSize = new_instancemethod(_kdb.Key__getBaseNameSize, None, Key)
Key._setName = new_instancemethod(_kdb.Key__setName, None, Key)
Key.addName = new_instancemethod(_kdb.Key_addName, None, Key)
Key._setBaseName = new_instancemethod(_kdb.Key__setBaseName, None, Key)
Key.addBaseName = new_instancemethod(_kdb.Key_addBaseName, None, Key)
Key._getFullNameSize = new_instancemethod(_kdb.Key__getFullNameSize, None, Key)
Key._getFullName = new_instancemethod(_kdb.Key__getFullName, None, Key)
Key.__eq__ = new_instancemethod(_kdb.Key___eq__, None, Key)
Key.__ne__ = new_instancemethod(_kdb.Key___ne__, None, Key)
Key.__lt__ = new_instancemethod(_kdb.Key___lt__, None, Key)
Key.__le__ = new_instancemethod(_kdb.Key___le__, None, Key)
Key.__gt__ = new_instancemethod(_kdb.Key___gt__, None, Key)
Key.__ge__ = new_instancemethod(_kdb.Key___ge__, None, Key)
Key.isNull = new_instancemethod(_kdb.Key_isNull, None, Key)
Key.needSync = new_instancemethod(_kdb.Key_needSync, None, Key)
Key._getString = new_instancemethod(_kdb.Key__getString, None, Key)
Key._setString = new_instancemethod(_kdb.Key__setString, None, Key)
Key._getStringSize = new_instancemethod(_kdb.Key__getStringSize, None, Key)
Key._getFunc = new_instancemethod(_kdb.Key__getFunc, None, Key)
Key.setCallback = new_instancemethod(_kdb.Key_setCallback, None, Key)
Key._getValue = new_instancemethod(_kdb.Key__getValue, None, Key)
Key._getBinary = new_instancemethod(_kdb.Key__getBinary, None, Key)
Key._getBinarySize = new_instancemethod(_kdb.Key__getBinarySize, None, Key)
Key._setBinary = new_instancemethod(_kdb.Key__setBinary, None, Key)
Key.hasMeta = new_instancemethod(_kdb.Key_hasMeta, None, Key)
Key.delMeta = new_instancemethod(_kdb.Key_delMeta, None, Key)
Key.copyMeta = new_instancemethod(_kdb.Key_copyMeta, None, Key)
Key.copyAllMeta = new_instancemethod(_kdb.Key_copyAllMeta, None, Key)
Key._rewindMeta = new_instancemethod(_kdb.Key__rewindMeta, None, Key)
Key._nextMeta = new_instancemethod(_kdb.Key__nextMeta, None, Key)
Key._currentMeta = new_instancemethod(_kdb.Key__currentMeta, None, Key)
Key.isValid = new_instancemethod(_kdb.Key_isValid, None, Key)
Key.getNamespace = new_instancemethod(_kdb.Key_getNamespace, None, Key)
Key.isSystem = new_instancemethod(_kdb.Key_isSystem, None, Key)
Key.isUser = new_instancemethod(_kdb.Key_isUser, None, Key)
Key.isString = new_instancemethod(_kdb.Key_isString, None, Key)
Key.isBinary = new_instancemethod(_kdb.Key_isBinary, None, Key)
Key.isInactive = new_instancemethod(_kdb.Key_isInactive, None, Key)
Key.isBelow = new_instancemethod(_kdb.Key_isBelow, None, Key)
Key.isBelowOrSame = new_instancemethod(_kdb.Key_isBelowOrSame, None, Key)
Key.isDirectBelow = new_instancemethod(_kdb.Key_isDirectBelow, None, Key)
Key.__cmp__ = new_instancemethod(_kdb.Key___cmp__, None, Key)
Key.__copy__ = new_instancemethod(_kdb.Key___copy__, None, Key)
Key.__iter__ = new_instancemethod(_kdb.Key___iter__, None, Key)
Key.__reversed__ = new_instancemethod(_kdb.Key___reversed__, None, Key)
Key._getMeta = new_instancemethod(_kdb.Key__getMeta, None, Key)
Key._setMeta = new_instancemethod(_kdb.Key__setMeta, None, Key)
Key_swigregister = _kdb.Key_swigregister
Key_swigregister(Key)
class KeySet(object):
"""Proxy of C++ kdb::KeySet class."""
thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
__repr__ = _swig_repr
__swig_destroy__ = _kdb.delete_KeySet
def release(self) -> "ckdb::KeySet *":
"""
release(KeySet self) -> ckdb::KeySet *
Parameters
----------
self: kdb::KeySet *
"""
return _kdb.KeySet_release(self)
def getKeySet(self) -> "ckdb::KeySet *":
"""
getKeySet(KeySet self) -> ckdb::KeySet *
Parameters
----------
self: kdb::KeySet const *
"""
return _kdb.KeySet_getKeySet(self)
def setKeySet(self, k: 'ckdb::KeySet *') -> "void":
"""
setKeySet(KeySet self, ckdb::KeySet * k)
Parameters
----------
k: ckdb::KeySet *
"""
return _kdb.KeySet_setKeySet(self, k)
def __len__(self) -> "ssize_t":
"""
__len__(KeySet self) -> ssize_t
Parameters
----------
self: kdb::KeySet const *
"""
return _kdb.KeySet___len__(self)
def dup(self) -> "ckdb::KeySet *":
"""
dup(KeySet self) -> ckdb::KeySet *
Parameters
----------
self: kdb::KeySet const *
"""
return _kdb.KeySet_dup(self)
def copy(self, other: 'KeySet') -> "void":
"""
copy(KeySet self, KeySet other)
Parameters
----------
other: kdb::KeySet const &
"""
return _kdb.KeySet_copy(self, other)
def clear(self) -> "void":
"""
clear(KeySet self)
Parameters
----------
self: kdb::KeySet *
"""
return _kdb.KeySet_clear(self)
def append(self, *args) -> "ssize_t":
"""
append(KeySet self, Key toAppend) -> ssize_t
Parameters
----------
toAppend: kdb::Key const &
append(KeySet self, KeySet toAppend) -> ssize_t
Parameters
----------
toAppend: kdb::KeySet const &
"""
return _kdb.KeySet_append(self, *args)
def head(self) -> "kdb::Key":
"""
head(KeySet self) -> Key
Parameters
----------
self: kdb::KeySet const *
"""
return _kdb.KeySet_head(self)
def tail(self) -> "kdb::Key":
"""
tail(KeySet self) -> Key
Parameters
----------
self: kdb::KeySet const *
"""
return _kdb.KeySet_tail(self)
def setCursor(self, cursor: 'cursor_t') -> "void":
"""
setCursor(KeySet self, cursor_t cursor)
Parameters
----------
cursor: cursor_t
"""
return _kdb.KeySet_setCursor(self, cursor)
def getCursor(self) -> "cursor_t":
"""
getCursor(KeySet self) -> cursor_t
Parameters
----------
self: kdb::KeySet const *
"""
return _kdb.KeySet_getCursor(self)
def pop(self) -> "kdb::Key":
"""
pop(KeySet self) -> Key
Parameters
----------
self: kdb::KeySet *
"""
return _kdb.KeySet_pop(self)
def cut(self, k: 'Key') -> "kdb::KeySet":
"""
cut(KeySet self, Key k) -> KeySet
Parameters
----------
k: kdb::Key
"""
return _kdb.KeySet_cut(self, k)
def _lookup(self, *args) -> "kdb::Key":
"""
_lookup(KeySet self, Key k, option_t const options=KDB_O_NONE) -> Key
Parameters
----------
k: kdb::Key const &
options: option_t const
_lookup(KeySet self, Key k) -> Key
Parameters
----------
k: kdb::Key const &
_lookup(KeySet self, std::string const & name, option_t const options=KDB_O_NONE) -> Key
Parameters
----------
name: std::string const &
options: option_t const
_lookup(KeySet self, std::string const & name) -> Key
Parameters
----------
name: std::string const &
_lookup(KeySet self, cursor_t pos) -> Key
Parameters
----------
pos: cursor_t
"""
return _kdb.KeySet__lookup(self, *args)
def __init__(self, *args):
"""
__init__(kdb::KeySet self) -> KeySet
__init__(kdb::KeySet self, ckdb::KeySet * k) -> KeySet
Parameters
----------
k: ckdb::KeySet *
__init__(kdb::KeySet self, KeySet other) -> KeySet
Parameters
----------
other: kdb::KeySet const &
__init__(kdb::KeySet self, size_t alloc) -> KeySet
Parameters
----------
alloc: size_t
"""
orig = []
if len(args):
orig = args[1:]
args = [ args[0] ]
_kdb.KeySet_swiginit(self, _kdb.new_KeySet(*args))
for arg in orig:
if arg is KS_END:
break
self.append(arg)
def __copy__(self) -> "kdb::KeySet *":
"""
__copy__(KeySet self) -> KeySet
Parameters
----------
self: kdb::KeySet *
"""
return _kdb.KeySet___copy__(self)
def __deepcopy__(self, memo: 'PyObject *') -> "kdb::KeySet *":
"""
__deepcopy__(KeySet self, PyObject * memo) -> KeySet
Parameters
----------
memo: PyObject *
"""
return _kdb.KeySet___deepcopy__(self, memo)
def lookup(self, name):
"""Lookup a key by name. Name can be either string, Key or indexes.
If index is negative, search starts at the end.
Returns None if no key is found.
"""
key = self._lookup(name)
return key if key else None
def __getitem__(self, key):
"""See lookup(...) for details.
Slices and negative indexes are supported as well.
"""
if isinstance(key, slice):
return [ self[k] for k in range(*key.indices(len(self))) ]
elif isinstance(key, ( int )):
item = self.lookup(key)
if item is None:
raise IndexError("index out of range")
return item
elif isinstance(key, ( str, Key )):
item = self.lookup(key)
if item is None:
raise KeyError(str(key))
return item
raise TypeError("Invalid argument type")
def __contains__(self, item):
"""See lookup(...) for details"""
if isinstance(item, ( str, Key )):
key = self._lookup(item)
return True if key else False
raise TypeError("Invalid argument type")
def __iter__(self) -> "swig::SwigPyIterator *":
"""
__iter__(KeySet self) -> SwigPyIterator
Parameters
----------
self: kdb::KeySet *
"""
return _kdb.KeySet___iter__(self)
def __reversed__(self) -> "swig::SwigPyIterator *":
"""
__reversed__(KeySet self) -> SwigPyIterator
Parameters
----------
self: kdb::KeySet *
"""
return _kdb.KeySet___reversed__(self)
KeySet.release = new_instancemethod(_kdb.KeySet_release, None, KeySet)
KeySet.getKeySet = new_instancemethod(_kdb.KeySet_getKeySet, None, KeySet)
KeySet.setKeySet = new_instancemethod(_kdb.KeySet_setKeySet, None, KeySet)
KeySet.__len__ = new_instancemethod(_kdb.KeySet___len__, None, KeySet)
KeySet.dup = new_instancemethod(_kdb.KeySet_dup, None, KeySet)
KeySet.copy = new_instancemethod(_kdb.KeySet_copy, None, KeySet)
KeySet.clear = new_instancemethod(_kdb.KeySet_clear, None, KeySet)
KeySet.append = new_instancemethod(_kdb.KeySet_append, None, KeySet)
KeySet.head = new_instancemethod(_kdb.KeySet_head, None, KeySet)
KeySet.tail = new_instancemethod(_kdb.KeySet_tail, None, KeySet)
KeySet.setCursor = new_instancemethod(_kdb.KeySet_setCursor, None, KeySet)
KeySet.getCursor = new_instancemethod(_kdb.KeySet_getCursor, None, KeySet)
KeySet.pop = new_instancemethod(_kdb.KeySet_pop, None, KeySet)
KeySet.cut = new_instancemethod(_kdb.KeySet_cut, None, KeySet)
KeySet._lookup = new_instancemethod(_kdb.KeySet__lookup, None, KeySet)
KeySet.__copy__ = new_instancemethod(_kdb.KeySet___copy__, None, KeySet)
KeySet.__deepcopy__ = new_instancemethod(_kdb.KeySet___deepcopy__, None, KeySet)
KeySet.__iter__ = new_instancemethod(_kdb.KeySet___iter__, None, KeySet)
KeySet.__reversed__ = new_instancemethod(_kdb.KeySet___reversed__, None, KeySet)
KeySet_swigregister = _kdb.KeySet_swigregister
KeySet_swigregister(KeySet)
cvar = _kdb.cvar
va = cvar.va
class KDB(object):
"""Proxy of C++ kdb::KDB class."""
thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
__repr__ = _swig_repr
def __init__(self, *args):
"""
__init__(kdb::KDB self) -> KDB
__init__(kdb::KDB self, Key errorKey) -> KDB
Parameters
----------
errorKey: kdb::Key &
"""
_kdb.KDB_swiginit(self, _kdb.new_KDB(*args))
__swig_destroy__ = _kdb.delete_KDB
def open(self, errorKey: 'Key') -> "void":
"""
open(KDB self, Key errorKey)
Parameters
----------
errorKey: kdb::Key &
"""
return _kdb.KDB_open(self, errorKey)
def close(self, errorKey: 'Key') -> "void":
"""
close(KDB self, Key errorKey)
Parameters
----------
errorKey: kdb::Key &
"""
return _kdb.KDB_close(self, errorKey)
def get(self, *args) -> "int":
"""
get(KDB self, KeySet returned, std::string const & keyname) -> int
Parameters
----------
returned: kdb::KeySet &
keyname: std::string const &
get(KDB self, KeySet returned, Key parentKey) -> int
Parameters
----------
returned: kdb::KeySet &
parentKey: kdb::Key &
"""
return _kdb.KDB_get(self, *args)
def set(self, *args) -> "int":
"""
set(KDB self, KeySet returned, std::string const & keyname) -> int
Parameters
----------
returned: kdb::KeySet &
keyname: std::string const &
set(KDB self, KeySet returned, Key parentKey) -> int
Parameters
----------
returned: kdb::KeySet &
parentKey: kdb::Key &
"""
return _kdb.KDB_set(self, *args)
def __enter__(self):
"""Internal method for usage with context managers"""
return self
def __exit__(self, type, value, tb):
"""Internal method for usage with context managers.
Closes the database.
"""
try:
self.close(Key())
except:
pass
KDB.open = new_instancemethod(_kdb.KDB_open, None, KDB)
KDB.close = new_instancemethod(_kdb.KDB_close, None, KDB)
KDB.get = new_instancemethod(_kdb.KDB_get, None, KDB)
KDB.set = new_instancemethod(_kdb.KDB_set, None, KDB)
KDB_swigregister = _kdb.KDB_swigregister
KDB_swigregister(KDB)
|