| 4 | // This nested class represents a single mapping between a parameter name |
| 5 | // and its associated parameter index in a prepared statement. |
| 6 | class Pair { friend class BindMap; |
| 7 | public: |
| 8 | |
| 9 | inline int GetIndex() { |
| 10 | return index; |
| 11 | } |
| 12 | |
| 13 | inline Napi::String GetName(Napi::Env env) { |
| 14 | return name.Value(); |
| 15 | } |
| 16 | |
| 17 | private: |
| 18 | |
| 19 | explicit Pair(Napi::Env env, const char* name, int index) |
| 20 | : name(Napi::Persistent(InternalizedFromUtf8(env, name, -1))), index(index) {} |
| 21 | |
| 22 | explicit Pair(Napi::Env env, Pair* pair) |
| 23 | : name(Napi::Persistent(pair->name.Value())), index(pair->index) {} |
| 24 | |
| 25 | const Napi::Reference<Napi::String> name; |
| 26 | const int index; |
| 27 | }; |
| 28 | |
| 29 | explicit BindMap(char _) { |
| 30 | assert(_ == 0); |
nothing calls this directly
no outgoing calls
no test coverage detected