Skip to content

Commit

Permalink
release 300.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
dolphindb-jffu committed May 31, 2024
1 parent 2bf18f6 commit 27db2e9
Show file tree
Hide file tree
Showing 98 changed files with 7,065 additions and 4,906 deletions.
186 changes: 0 additions & 186 deletions example/DFSWriting/dfsWriting.cpp

This file was deleted.

Binary file not shown.
8 changes: 4 additions & 4 deletions include/AsynWorker.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class AsynWorker: public Runnable {
using Task = DBConnectionPoolImpl::Task;
AsynWorker(DBConnectionPoolImpl& pool, CountDownLatchSP latch, const SmartPointer<DBConnection>& conn,
const SmartPointer<SynchronizedQueue<Task>>& queue, TaskStatusMgmt& status,
const string& hostName, int port, const string& userId , const string& password)
const std::string& hostName, int port, const std::string& userId , const std::string& password)
: pool_(pool), latch_(latch), conn_(conn), queue_(queue),taskStatus_(status),
hostName_(hostName), port_(port), userId_(userId), password_(password){}
protected:
Expand All @@ -22,10 +22,10 @@ class AsynWorker: public Runnable {
SmartPointer<DBConnection> conn_;
SmartPointer<SynchronizedQueue<Task>> queue_;
TaskStatusMgmt& taskStatus_;
const string hostName_;
const std::string hostName_;
int port_;
const string userId_;
const string password_;
const std::string userId_;
const std::string password_;
};

}
14 changes: 7 additions & 7 deletions include/BatchTableWriter.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,28 +39,28 @@ class EXPORT_DECL BatchTableWriter {
* table, and the parameter tableName should be a null string. If error is raised on the server, this
* function throws an exception.
*/
void addTable(const string& dbName, const string& tableName="", bool partitioned=true);
void addTable(const std::string& dbName, const std::string& tableName="", bool partitioned=true);

/**
* Gets the current size of the specified table write queue and whethre the specified table is removed. If
* the specified table is not added first, this function throw and exception.
*/
std::tuple<int,bool,bool> getStatus(const string& dbName, const string& tableName="");
std::tuple<int,bool,bool> getStatus(const std::string& dbName, const std::string& tableName="");

/**
* Gets the current size of all table write queue, number of rows already sended to server, whether a
* table is being removed, and whether the backgroud thread is returned because of error.
*/
TableSP getAllStatus();

TableSP getUnwrittenData(const string& dbName, const string& tableName="");
TableSP getUnwrittenData(const std::string& dbName, const std::string& tableName="");

/**
* Release the resouces occupied by the specified table, including write queue and write thread. If this
* function is called to add an in-memory table, the parameter dbName indicates the name of the in-memory
* table, and the parameter tableName should be a null string.
*/
void removeTable(const string& dbName, const string& tableName="");
void removeTable(const std::string& dbName, const std::string& tableName="");

/**
* Insert a row into the specified table. If this function is called to insert data into an in-memory table,
Expand All @@ -72,7 +72,7 @@ class EXPORT_DECL BatchTableWriter {
* If the background thread fails to write a row, it will print error message to std::cerr and return.
*/
template<typename... Targs>
void insert(const string& dbName, const string& tableName, Targs... Fargs){
void insert(const std::string& dbName, const std::string& tableName, Targs... Fargs){
//RECORDTIME("BTW::insert");
SmartPointer<DestTable> destTable;
{
Expand Down Expand Up @@ -104,7 +104,7 @@ class EXPORT_DECL BatchTableWriter {
TableSP colDefs;
int columnNum;
ConstantSP colDefsTypeInt;
std::vector<string> colNames;
std::vector<std::string> colNames;
std::vector<DATA_TYPE> colTypes;
std::string createTmpSharedTable;
SynchronizedQueue<std::vector<ConstantSP>> writeQueue;
Expand Down Expand Up @@ -183,5 +183,5 @@ class EXPORT_DECL BatchTableWriter {
};


};
}
#endif /* BATCHTABLEWRITER_H_ */
2 changes: 1 addition & 1 deletion include/Compress.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,5 +63,5 @@ class CompressDeltaofDelta : public CompressEncoderDecoder {
static const int maxCompressedSize_;
};

};//dolphindb
}//dolphindb
#endif//COMPRESSION_H_
2 changes: 1 addition & 1 deletion include/Concurrent.h
Original file line number Diff line number Diff line change
Expand Up @@ -647,6 +647,6 @@ class BlockingQueue {

};

};
}

#endif /* CONCURRENT_H_ */
22 changes: 11 additions & 11 deletions include/Constant.h
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,9 @@ class EXPORT_DECL Constant {
virtual INDEX getIndex() const {throw RuntimeException("The object can't be converted to index scalar.");}
virtual float getFloat() const {throw RuntimeException("The object can't be converted to float scalar.");}
virtual double getDouble() const {throw RuntimeException("The object can't be converted to double scalar.");}
virtual string getString() const {return "";}
virtual string getScript() const { return getString();}
virtual const string& getStringRef() const {return EMPTY;}
virtual std::string getString() const {return "";}
virtual std::string getScript() const { return getString();}
virtual const std::string& getStringRef() const {return EMPTY;}
virtual const Guid getUuid() const {return getInt128();}
virtual const Guid getInt128() const {throw RuntimeException("The object can't be converted to uuid scalar.");}
virtual const unsigned char* getBinary() const {throw RuntimeException("The object can't be converted to int128 scalar.");}
Expand All @@ -94,7 +94,7 @@ class EXPORT_DECL Constant {
virtual void setIndex(INDEX val){}
virtual void setFloat(float val){}
virtual void setDouble(double val){}
virtual void setString(const string& val){}
virtual void setString(const std::string& val){}
virtual void setBinary(const unsigned char* val, int unitLength){}
virtual void setNull(){}

Expand All @@ -106,8 +106,8 @@ class EXPORT_DECL Constant {
virtual INDEX getIndex(INDEX index) const {return getIndex();}
virtual float getFloat(INDEX index) const {return getFloat();}
virtual double getDouble(INDEX index) const {return getDouble();}
virtual string getString(INDEX index) const {return getString();}
virtual const string& getStringRef(INDEX index) const {return EMPTY;}
virtual std::string getString(INDEX index) const {return getString();}
virtual const std::string& getStringRef(INDEX index) const {return EMPTY;}
virtual bool isNull(INDEX index) const {return isNull();}

virtual int32_t getDecimal32(INDEX index, int scale) const { NOT_IMPLEMENT; }
Expand Down Expand Up @@ -135,7 +135,7 @@ class EXPORT_DECL Constant {
virtual bool getFloat(INDEX start, int len, float* buf) const {return false;}
virtual bool getDouble(INDEX start, int len, double* buf) const {return false;}
virtual bool getSymbol(INDEX start, int len, int* buf, SymbolBase* symBase,bool insertIfNotThere) const {return false;}
virtual bool getString(INDEX start, int len, string** buf) const {return false;}
virtual bool getString(INDEX start, int len, std::string** buf) const {return false;}
virtual bool getString(INDEX start, int len, char** buf) const {return false;}
virtual bool getBinary(INDEX start, int len, int unitLength, unsigned char* buf) const {return false;}
virtual bool getHash(INDEX start, int len, int buckets, int* buf) const {return false;}
Expand All @@ -152,7 +152,7 @@ class EXPORT_DECL Constant {
virtual const float* getFloatConst(INDEX start, int len, float* buf) const {throw RuntimeException("getFloatConst method not supported");}
virtual const double* getDoubleConst(INDEX start, int len, double* buf) const {throw RuntimeException("getDoubleConst method not supported");}
virtual const int* getSymbolConst(INDEX start, int len, int* buf, SymbolBase* symBase, bool insertIfNotThere) const {throw RuntimeException("getSymbolConst method not supported");}
virtual string** getStringConst(INDEX start, int len, string** buf) const {throw RuntimeException("getStringConst method not supported");}
virtual std::string** getStringConst(INDEX start, int len, std::string** buf) const {throw RuntimeException("getStringConst method not supported");}
virtual char** getStringConst(INDEX start, int len, char** buf) const {throw RuntimeException("getStringConst method not supported");}
virtual const unsigned char* getBinaryConst(INDEX start, int len, int unitLength, unsigned char* buf) const {throw RuntimeException("getBinaryConst method not supported");}

Expand Down Expand Up @@ -180,7 +180,7 @@ class EXPORT_DECL Constant {
virtual void setIndex(INDEX index,INDEX val){setIndex(val);}
virtual void setFloat(INDEX index,float val){setFloat(val);}
virtual void setDouble(INDEX index, double val){setDouble(val);}
virtual void setString(INDEX index, const string& val){setString(val);}
virtual void setString(INDEX index, const std::string& val){setString(val);}
virtual void setBinary(INDEX index, int unitLength, const unsigned char* val){setBinary(val, unitLength);}
virtual void setNull(INDEX index){setNull();}

Expand All @@ -191,7 +191,7 @@ class EXPORT_DECL Constant {
virtual bool setColumn(INDEX index, const ConstantSP& value){return assign(value);}
virtual void setRowLabel(const ConstantSP& label){}
virtual void setColumnLabel(const ConstantSP& label){}
virtual bool reshape(INDEX cols, INDEX rows) {return false;}
virtual bool reshape(INDEX colNum, INDEX rowNum) {return false;}
virtual bool assign(const ConstantSP& value){return false;}

virtual bool setBool(INDEX start, int len, const char* buf){return false;}
Expand All @@ -202,7 +202,7 @@ class EXPORT_DECL Constant {
virtual bool setIndex(INDEX start, int len, const INDEX* buf){return false;}
virtual bool setFloat(INDEX start, int len, const float* buf){return false;}
virtual bool setDouble(INDEX start, int len, const double* buf){return false;}
virtual bool setString(INDEX start, int len, const string* buf){return false;}
virtual bool setString(INDEX start, int len, const std::string* buf){return false;}
virtual bool setString(INDEX start, int len, char** buf){return false;}
virtual bool setBinary(INDEX start, int len, int unitLength, const unsigned char* buf){return false;}
virtual bool setData(INDEX start, int len, void* buf) {return false;}
Expand Down
Loading

0 comments on commit 27db2e9

Please sign in to comment.