(self, parameters, graph_options)
| 2922 | execution_profile.row_factory = row_factory |
| 2923 | |
| 2924 | def _transform_params(self, parameters, graph_options): |
| 2925 | if not isinstance(parameters, dict): |
| 2926 | raise ValueError('The parameters must be a dictionary. Unnamed parameters are not allowed.') |
| 2927 | |
| 2928 | # Serialize python types to graphson |
| 2929 | serializer = GraphSON1Serializer |
| 2930 | if graph_options.graph_protocol == GraphProtocol.GRAPHSON_2_0: |
| 2931 | serializer = GraphSON2Serializer() |
| 2932 | elif graph_options.graph_protocol == GraphProtocol.GRAPHSON_3_0: |
| 2933 | # only required for core graphs |
| 2934 | context = { |
| 2935 | 'cluster': self.cluster, |
| 2936 | 'graph_name': graph_options.graph_name.decode('utf-8') if graph_options.graph_name else None |
| 2937 | } |
| 2938 | serializer = GraphSON3Serializer(context) |
| 2939 | |
| 2940 | serialized_parameters = serializer.serialize(parameters) |
| 2941 | return [json.dumps(serialized_parameters).encode('utf-8')] |
| 2942 | |
| 2943 | def _target_analytics_master(self, future): |
| 2944 | future._start_timer() |
no test coverage detected