Commit Graph

55 Commits

Author SHA1 Message Date
Matej Kenda
cf1a29908a enh(MongoDB): Document::get returns value by const reference instead of creating a copy and few other minor improvements. 2024-05-23 11:46:44 +02:00
Kari Argillander
bf3c519183
Fix some issues found with clang-tidy (#4353)
* directoryiterator: Fix missing inline

Add missing inline to inline function.

This was found with clang-tidy check:  misc-definitions-in-headers

* Convert deprecated throw() to noexcept

throw() has been deprecated in standar in C++17. It has been removed in
C++20. Code still compiles but let's just define these at those should
be.

These where found with clang-tidy check: modernize-use-noexcept

* Fix unnecessary copy initializations

Clang-tidy did find these with check:

  performance-unnecessary-copy-initialization

* Fix some strings not references

Looks like these are just missing reference marks.

---------

Co-authored-by: Kari Argillander <kari.argillander@fidelix.com>
2023-12-17 16:55:30 +01:00
Joerg-Christian Boehme
ec3c0f4f98
Github Action for Android NDK (#4321)
* Add first android git hub action to try

* Set up android toolchain

* Add second android ndk build

* add some default settings for android

* Add a third android build for armv7

* fix(OpMsgMessage): android v7a compile

---------

Co-authored-by: Aleksandar Fabijanic <aleks-f@users.noreply.github.com>
2023-12-11 20:34:03 +01:00
Aleksandar Fabijanic
22379ff9c1 fix: MongoDB deleted copy constructor #4187 2023-10-16 00:47:42 +02:00
Matej Kenda
971a7cc670
Mongodb op msg database commands fix (#4004)
* * Fix: MongoDB::OpMsgCursor did not handle zero batch size properly: cursor requests failed.
* Improvement: Add emptyFirstBatch to indicate that the size of the first batch shall be zero for performance to get potential error ASAP from the server.

* Poco::MongoDB: Some database commands do not need collection as an argument. An integer "1" is passed instead.
2023-05-05 09:27:42 -05:00
Matej Kenda
3838070146
Resolves #3484: support for OP_MSG in Poco::MongoDB (#3902)
* Binary writer/reader: add writeCString and readCString.

* MongoDB::Database: add queryBuildInfo and queryServerHello; add WireVersion enum.

* MongoDB: Introduce OpMsgMessage (request and reply) and related changes in Connection, Database, MessageHeader.

* MongoDB: First unit test changes for OpMsgMessage.

* MongoDB::Document: new functions addNewArray and remove.

* MongoDB: OP_MSG unacknowledged write and many improvements

* MongoDB: new cursor using OP_MSG

* MongoDB: bunch of new tests for OP_MSG wire protocol.

* BinaryWriter::WriteCString: use write instead of operator <<.

* MongoDB::OpMsgCursor: Slightly modified prototype code for using moreToCome flag.

* MongoDB: Add OpMsg* files to Makefiles.

* MongoDB: Add OpMsg* files to VS project files.

* Compile fixes.

* MongoDB::Database: Add factory function for database commands createOpMsgMessage() and cursors createOpMsgCursor()
2023-03-20 01:50:15 -05:00
John Vandenberg
0e6e16645c
Remove trailing whitespace (#3668) 2022-07-07 04:18:20 -05:00
Matej Kenda
9740190551
MongoDB::Array: int --> size_t in get for consistency with size(), new helper functions to add elements to an array. (#3016) 2022-05-29 00:03:08 -05:00
Matej Kenda
8a8c23c352
Fixes from develop experimental (on top of 1.11.2) (#3017)
* MongoDB::PooledConnection: Prevent unwanted release by disabling copy semantics. Enabled move semantics for C++11.

* Construct MongoDB::Cursor from aggragation cursor.

* Added function to get OS-specific numerical thread ID and %J pattern to use numerical OS thread id in pattern formatter.

Co-authored-by: Tomaz Beltram <tomaz.beltram@topit.si>
2022-05-18 17:23:16 -05:00
Günter Obiltschnig
093568ecc7 fixed GH #2655: MongoDB Binary element to string - bug 2019-06-22 18:31:57 +02:00
Günter Obiltschnig
584482677f backport #2553: Fixed Poco::MongoDB not working on big-endian architecture system 2018-11-23 08:34:21 +01:00
Guenter Obiltschnig
d90a3da585 merge fixes from develop 2017-11-08 11:48:52 +01:00
Guenter Obiltschnig
abc4919bfa improved URI support; added tests 2017-11-08 11:42:05 +01:00
Günter Obiltschnig
210248d719 MongoDB: add connection string URI support 2017-11-08 10:16:25 +01:00
Guenter Obiltschnig
d172273a75 remove remaining $Id$ tags from file headers 2017-10-31 16:01:51 +01:00
Guenter Obiltschnig
6462d4ce86 code cleanup 2017-02-17 16:22:14 +01:00
Guenter Obiltschnig
ba6a7900e2 improve compatibility with DocumentDB 2017-02-13 20:44:41 +01:00
Guenter Obiltschnig
1aa6f72085 MongoDB: fixes for style and consistency 2017-02-13 15:53:08 +01:00
Guenter Obiltschnig
9f8146ccaa merged changes from develop; added authentication support 2017-02-12 23:13:51 +01:00
Tomaz Beltram
b042b892db Renamed SpecialTimestamp to BSONTimestamp 2016-09-28 10:58:46 +02:00
Tomaz Beltram
584a776d77 Revert "Renamed MongoDB::SpecialTimestamp to MongoDB::Timestamp"
This reverts commit 06f6f05566.
2016-09-28 10:55:05 +02:00
Tomaz Beltram
06f6f05566 Renamed MongoDB::SpecialTimestamp to MongoDB::Timestamp 2016-09-28 10:47:14 +02:00
Tomaz Beltram
1852739547 MongoDB BSON type 0x11 support, fixes #1429 2016-09-28 10:16:03 +02:00
fbraem
eb879985b0 ObjectId constructor translates a hex string (24 characters) into a 12 byte object id 2014-12-20 19:11:16 +01:00
fbraem
9f7076d7a7 Remove duplicate code 2014-11-27 22:58:09 +01:00
Günter Obiltschnig
a2617235fe #538 more dtor fixes and some style fixes along the way 2014-09-29 12:09:01 +02:00
Roger Meier
b0581433a7 LICENSE: add info about SPDX-License-Identifier usage and use it
fix: remove executable flag and change back to 100644 (was 100755)

Signed-off-by: Roger Meier <r.meier@siemens.com>
2014-05-14 08:38:09 +02:00
Alex Fabijanic
556d8cf1c4 GH #440 MongoDB ObjectId string formatting 2014-05-08 21:35:56 -05:00
Roger Meier
628a06f718 LICENSE: add info about SPDX-License-Identifier usage and use it
Signed-off-by: Roger Meier <roger@bufferoverflow.ch>
2014-05-04 21:02:42 +02:00
Alex Fabijanic
46b5785d98 - fixed PS build script environment vars generation
- fixed MongoDB 64-bit std::size_t warnings
- added Thread::trySleep()/wakeUp() and tests
2014-04-25 23:50:53 -05:00
fbraem
063a642957 Solve collection name problem in ensureIndex 2014-04-22 20:21:17 +02:00
aleks-f
3d16ce00a2 only style changes 2013-03-17 13:34:36 -05:00
aleks-f
bb904d613b VS 100 and 110 projects
- generated VS 100 and 110 projects
- changed message length from signed 32 bit int to std::size_t
2013-03-11 23:48:41 -05:00
Aleksandar Fabijanic
ff0e439aa5 VS 71,80,90 projects, style edits 2013-03-11 22:50:08 -05:00
fbraem
c6d53a0608 Avoid endless loop when indent is set to -1, cleanup code 2013-03-09 20:45:22 +01:00
fbraem
e793083a0a Correct indentation 2013-03-01 21:59:50 +01:00
fbraem
26e89db0dd Add createUpdateRequest, createDeleteRequest 2013-03-01 21:42:51 +01:00
fbraem
ee360d307c Add methods that turns a numeric index into a string for getting the element (an array is actually a document) 2013-02-27 19:51:33 +01:00
fbraem
2d3e78146d Add createCommand method and rearrange code 2013-02-27 18:51:55 +01:00
fbraem
60afc2dbd0 Add ensureIndex 2013-02-22 19:29:48 +01:00
fbraem
7328eace34 Add method addNewDocument and return a reference of the active document in the add methods to allow chaining these methods ... 2013-02-21 16:48:21 +01:00
fbraem
e79f75d9fe Rename query() method to selector() 2013-02-20 22:20:55 +01:00
fbraem
a39b33b3e9 Add const to get method 2013-02-19 22:32:40 +01:00
fbraem
79c1edbdfb Add getLastErrorDoc and getLastError 2013-02-19 22:32:11 +01:00
fbraem
13380b5eb9 Make indentation work in toString 2013-02-17 18:41:36 +01:00
fbraem
b19401af37 Solve wrong assert 2013-02-17 18:40:58 +01:00
fbraem
c33b2506cf Rearrange initialisations to remove warnings 2013-02-16 20:51:23 +01:00
fbraem
dfe27aa917 Cursor class is used to combine query and getmore requests 2013-02-16 19:55:23 +01:00
fbraem
bf315df7a6 Cleaning up code, add docs, add getMore sample ... 2013-02-15 22:32:24 +01:00
fbraem
8fddacd451 Update toString method 2013-02-14 22:51:51 +01:00