@@ -12,12 +12,13 @@ using namespace lbug::common;
1212void PyDatabase::initialize (py::handle& m) {
1313 py::class_<PyDatabase>(m, " Database" )
1414 .def (py::init<const std::string&, uint64_t , uint64_t , bool , bool , uint64_t , bool , int64_t ,
15- bool , bool >(),
15+ bool , bool , bool >(),
1616 py::arg (" database_path" ), py::arg (" buffer_pool_size" ) = 0 ,
1717 py::arg (" max_num_threads" ) = 0 , py::arg (" compression" ) = true ,
1818 py::arg (" read_only" ) = false , py::arg (" max_db_size" ) = (uint64_t )1 << 43 ,
1919 py::arg (" auto_checkpoint" ) = true , py::arg (" checkpoint_threshold" ) = -1 ,
20- py::arg (" throw_on_wal_replay_failure" ) = true , py::arg (" enable_checksums" ) = true )
20+ py::arg (" throw_on_wal_replay_failure" ) = true , py::arg (" enable_checksums" ) = true ,
21+ py::arg (" enable_multi_writes" ) = false )
2122 .def (" scan_node_table_as_int64" , &PyDatabase::scanNodeTable<std::int64_t >,
2223 py::arg (" table_name" ), py::arg (" prop_name" ), py::arg (" indices" ), py::arg (" np_array" ),
2324 py::arg (" num_threads" ))
@@ -49,14 +50,15 @@ uint64_t PyDatabase::getStorageVersion() {
4950PyDatabase::PyDatabase (const std::string& databasePath, uint64_t bufferPoolSize,
5051 uint64_t maxNumThreads, bool compression, bool readOnly, uint64_t maxDBSize,
5152 bool autoCheckpoint, int64_t checkpointThreshold, bool throwOnWalReplayFailure,
52- bool enableChecksums) {
53+ bool enableChecksums, bool enableMultiWrites ) {
5354 auto systemConfig = SystemConfig (bufferPoolSize, maxNumThreads, compression, readOnly,
5455 maxDBSize, autoCheckpoint);
5556 if (checkpointThreshold >= 0 ) {
5657 systemConfig.checkpointThreshold = static_cast <uint64_t >(checkpointThreshold);
5758 }
5859 systemConfig.throwOnWalReplayFailure = throwOnWalReplayFailure;
5960 systemConfig.enableChecksums = enableChecksums;
61+ systemConfig.enableMultiWrites = enableMultiWrites;
6062 database = std::make_unique<Database>(databasePath, systemConfig);
6163 lbug::extension::ExtensionUtils::addTableFunc<lbug::PandasScanFunction>(*database);
6264 storageDriver = std::make_unique<StorageDriver>(database.get ());
0 commit comments