NeoCpp
query_parameter_interface.h
1 /*
2 Apache 2.0 License
3 
4 Copyright 2018 Alex Barry
5 
6 Licensed under the Apache License, Version 2.0 (the "License");
7 you may not use this file except in compliance with the License.
8 You may obtain a copy of the License at
9 
10  http://www.apache.org/licenses/LICENSE-2.0
11 
12 Unless required by applicable law or agreed to in writing, software
13 distributed under the License is distributed on an "AS IS" BASIS,
14 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 See the License for the specific language governing permissions and
16 limitations under the License.
17 
18 */
19 
20 #include <neo4j-client.h>
21 
22 #ifndef NEOCPP_DATA_INTERFACE_QUERY_PARAMETER_INTERFACE_H_
23 #define NEOCPP_DATA_INTERFACE_QUERY_PARAMETER_INTERFACE_H_
24 
25 namespace Neocpp {
26 
28 
33  public:
34  virtual ~Neo4jQueryParameterInterface() {}
35 
37  virtual int get_type() = 0;
38 
40  virtual bool get_boolean_value() = 0;
41 
43  virtual bool get_boolean_value(int index) = 0;
44 
46  virtual std::string get_string_value() = 0;
47 
49  virtual std::string get_string_value(int index) = 0;
50 
52  virtual const char * get_cstring_value() = 0;
53 
55  virtual int get_integer_value() = 0;
56 
58  virtual int get_integer_value(int index) = 0;
59 
61  virtual double get_double_value() = 0;
62 
64  virtual double get_double_value(int index) = 0;
65 
67  virtual bool is_array() = 0;
68 
70  virtual unsigned int size() = 0;
71 
73  virtual void add_value(float new_val) = 0;
74 
76  virtual void add_value(int new_val) = 0;
77 
79  virtual void add_value(bool new_val) = 0;
80 
82  virtual void add_value(std::string new_val) = 0;
83 
85  virtual void add_value(const char * new_val) = 0;
86 
87  // Internal Use only - Used by Neo4j Admin when executing query.
88  virtual neo4j_value_t get_neo4j_list() = 0;
89 };
90 
91 } // namespace Neocpp
92 
93 #endif // NEOCPP_DATA_INTERFACE_QUERY_PARAMETER_INTERFACE_H_
virtual bool get_boolean_value()=0
Get the boolean value, if any.
virtual int get_type()=0
Get the type of the query parameter.
virtual double get_double_value()=0
Get the double value, if any.
virtual bool is_array()=0
If the parameter is an array, return true.
virtual const char * get_cstring_value()=0
Get the string value as a c string.
virtual void add_value(float new_val)=0
Add a float value to the array parameter.
virtual int get_integer_value()=0
Get the integer value, if any.
virtual unsigned int size()=0
If the parameter is an array, return the size.
Definition: neo4j_interface.h:28
Neo4j Query Parameter Interface.
Definition: query_parameter_interface.h:32
virtual std::string get_string_value()=0
Get the string value, if any.