# HG changeset patch # User František Kučera # Date 1544831044 -3600 # Node ID 7a91400b84c2f6a49a32264f2049048e9630e8c6 # Parent c71600851b011896fdb99afd25603c972d49e3a7 add TODO comments, n.b. this is very experimental code diff -r c71600851b01 -r 7a91400b84c2 src/PythonHandler.h --- a/src/PythonHandler.h Sat Dec 15 00:36:14 2018 +0100 +++ b/src/PythonHandler.h Sat Dec 15 00:44:04 2018 +0100 @@ -77,6 +77,11 @@ if (arguments.size() == 2) { relationNameRegEx = wregex(arguments[0]); pythonCode = arguments[1]; + // TODO: allow relation structure changes: if there are more arguments, the describe the output relation + // TODO: allow also other modes: + // - insert additional records + // - process whole relation at once (can do e.g. some aggregations) + // - process whole stream at once (can do e.g. some joins or unions) } else { PyMem_RawFree(pythonProgramName); throw cli::RelpipeCLIException(L"Usage: relpipe-tr-python ", cli::CLI::EXIT_CODE_UNKNOWN_COMMAND); @@ -119,6 +124,7 @@ pyDict = PyModule_GetDict(pyModule); for (int i = 0; i < currentRecord.size(); i++) { + // TODO: pass particular data-types to Python, not only strings PyObject* pyValue = PyUnicode_FromString(convertor.to_bytes(currentRecord[i]).c_str()); PyList_SetItem(pyRecord, i, pyValue); string_t attributeName = currentWriterMetadata[i].attributeName;