text: /*
      Copyright (c) 2020 TOSHIBA Digital Solutions Corporation.
  
      Licensed under the Apache License, Version 2.0 (the "License");
      you may not use this file except in compliance with the License.
      You may obtain a copy of the License at
  
          http://www.apache.org/licenses/LICENSE-2.0
  
      Unless required by applicable law or agreed to in writing, software
      distributed under the License is distributed on an "AS IS" BASIS,
      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      See the License for the specific language governing permissions and
      limitations under the License.
  */
  
  #ifndef PARTITIONCONTROLLER_H
  #define PARTITIONCONTROLLER_H
  
  #include <napi.h>
  #include "Util.h"
  #include "Macro.h"
  
  namespace griddb {
  
  class PartitionController: public Napi::ObjectWrap<PartitionController> {
   public:
  #if NAPI_VERSION <= 5
      // Constructor
      static Napi::FunctionReference constructor;
  #endif
      static Napi::Object init(Napi::Env env, Napi::Object exports);
      explicit PartitionController(const Napi::CallbackInfo &info);
  
      // Destructor
      ~PartitionController();
  
      // N-API methods
      Napi::Value getContainerCount(const Napi::CallbackInfo &info);
      Napi::Value getPartitionIndexOfContainer(const Napi::CallbackInfo &info);
      Napi::Value getPartitionCount(const Napi::CallbackInfo &info);
      Napi::Value getContainerNames(const Napi::CallbackInfo &info);
  
      // N-API support method
      void setReadonlyAttribute(const Napi::CallbackInfo &info,
              const Napi::Value &value);
  
   private:
      GSPartitionController *mController;
  };
  
  }  // namespace griddb
  
  #endif  // PARTITIONCONTROLLER_H
  