add TODO comments, n.b. this is very experimental code v_0
authorFrantišek Kučera <franta-hg@frantovo.cz>
Sat, 15 Dec 2018 00:44:04 +0100
branchv_0
changeset 17 7a91400b84c2
parent 16 c71600851b01
child 18 6a178b86d048
add TODO comments, n.b. this is very experimental code
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 <relationNameRegExp> <pythonCode>", 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;