Jeremy Mikola
76d49f792b
PHP-1189: BSON Regex type
2014-11-21 10:05:29 -08:00
Jeremy Mikola
773bc909cb
PHP-1173: Use string "majority" for WriteConcern::MAJORITY
...
The purpose is two-fold: abstract libmongo'c constant (defined as -3) from our users and ensure the string "majority" is sets the struct's "w" field properly even if our constant is not used.
2014-10-03 16:02:53 -04:00
Jeremy Mikola
c6da714829
Remove unused class properties in WriteConcern
2014-10-03 13:30:39 -04:00
Jeremy Mikola
e6fc9b0624
PHP-1142: Support upserted ids in WriteResult
...
Renamed getGeneratedIdsForUpsert() to getUpsertedIds().
2014-09-29 11:37:46 -04:00
Jeremy Mikola
7358ac7f6c
PHP-1142: Implement WriteResult getter for meta information
...
This getter is intended to return situational fields (e.g. lastOp, electionId), which are not currently supported by libmongoc (see: CDRIVER-428).
2014-09-25 16:02:45 -04:00
Jeremy Mikola
22b3622ab8
PHP-1142: Memory cleanup and getters for WriteResult error zvals
2014-09-25 15:57:49 -04:00
Jeremy Mikola
7a1c18dbc9
Fix tab indentation for generated C code
2014-09-25 15:57:49 -04:00
Jeremy Mikola
9aaa2de17b
PHP-1230: Implement WriteException class
2014-09-25 15:57:48 -04:00
Jeremy Mikola
12cc8616dc
PHP-1142: Init WriteError and WriteConcernError arrays for WriteResult
...
When initializing a WriteResult, we should initialize the corresponding WriteError and WriteConcernError classes, too. This moves all of the initialization code into php_phongoc, as was done with the error classes.
Additionally, phongo_execute_write() has been changed to not construct a bson_t reply unnecessarily (i.e. return value will not be used).
2014-09-25 15:57:48 -04:00
Jeremy Mikola
9e5b4167fe
PHP-1171: Move WriteConcernError init function to php_phongo.c
...
The functions in each class file are not exported (since we don't have headers), and this ultimately needs to be called by the WriteResult initialization function. Therefore, it's best placed in php_phongo.c for now, as we did with WriteError's function.
2014-09-24 15:50:37 -04:00
Jeremy Mikola
b1b5568edd
PHP-1172: Implement WriteError class
...
Removed getter for bulk operation corresponding to the index, since that would require reconstructing zvals from the libmongoc structs.
2014-09-24 15:48:32 -04:00
Jeremy Mikola
6d5c7cd0d4
Fix typo in constant name
2014-09-24 14:10:51 -04:00
Jeremy Mikola
d0d57d7313
Ensure libmongoc structs get freed in WriteBatch and WriteConcern
2014-09-23 13:17:22 -04:00
Jeremy Mikola
783c14d1c6
PHP-1171: Implement WriteConcernError class
...
Removed constructor and implemented populate method, which should operate on BSON documents within WriteResult's writeConcernError(s) field.
2014-09-17 15:55:18 -04:00
Jeremy Mikola
30a9a80492
Change Query constructor args based on CRUD API spec
...
Query document is the only required field. All other fields are optional. To avoid complicating the constructor, we'll handle the option merging in the init function.
2014-08-25 13:55:59 -04:00
Hannes Magnusson
a3ce178fae
Move BSON encode/decode stuff into BSON namespace
...
BSON\toArray()
BSON\toJSON()
BSON\fromArray()
BSON\fromJSON()
2014-08-13 21:31:50 +00:00
Hannes Magnusson
20d177562c
Fix zts
2014-08-08 23:38:31 +00:00
Hannes Magnusson
cdaa3b074d
Implement BSON\ObjectID properly
2014-08-06 21:59:24 +00:00
Hannes Magnusson
d447f09294
s/executeWrite/executeWriteBatch/g as the class is called WriteBatch
2014-07-30 01:54:49 +00:00
Hannes Magnusson
f8c89f8ba0
Only collect and return the _id if requested - and never $this
2014-07-30 01:52:21 +00:00
Hannes Magnusson
84a215df30
Make BSON types implement BSON\Type interface
2014-07-30 01:49:09 +00:00
Hannes Magnusson
ca6824f78e
Fix bson buffer
2014-07-21 22:20:35 +00:00
Hannes Magnusson
f23cef90ca
Implement WriteConcern
2014-07-21 22:20:05 +00:00
Hannes Magnusson
50f644b753
Fix zts
2014-07-21 20:55:16 +00:00
Hannes Magnusson
bb111df04c
Fix constant generator & regenerate
2014-07-21 20:51:20 +00:00
Hannes Magnusson
1c43114e4a
Implement readPreferences
2014-07-21 19:43:24 +00:00
Hannes Magnusson
1a32de27b8
fix zts
2014-07-19 03:25:44 +00:00
Hannes Magnusson
a07234eb9a
Add __toString() for ObjectID
2014-07-18 20:13:43 -07:00
Hannes Magnusson
e619946d8c
Returned generate _id when adding objects to batches
2014-07-19 02:58:53 +00:00
Hannes Magnusson
18dac2fee7
Add the ability to automatically generate _id
2014-07-18 23:43:30 +00:00
Hannes Magnusson
6360f5038a
Add BSON objects and move generated classes into its own folders
2014-07-18 16:44:45 -07:00
Jeremy Mikola
a438cf5c6a
Only use GeneratedId for upserts, not inserts
...
Identifiers generated for inserts will be returned from WriteBatch::insert()
2014-07-18 16:46:44 -04:00
Jeremy Mikola
7429d1e9db
Replace createFromServers() factory method with getServers()
...
Servers are only constructed internally through a Manager, so the factory method no longer applies.
2014-07-18 16:45:16 -04:00
Jeremy Mikola
bce0363135
Create WriteConcern value object
2014-07-17 18:18:47 -04:00
Hannes Magnusson
e8bc9cfd60
CID-24872: Comment out not-yet-implemented code
2014-07-16 22:47:22 +00:00
Hannes Magnusson
c528ba89fc
CID-24875: Fix uninitialized variable
2014-07-16 22:43:32 +00:00
Hannes Magnusson
c9155e397b
Add the actual implementation into the PHP API docs
...
This is used to generate the actual c classes.
- The CIMPL (Simple) section is the C Implementation
- The CEF (Chef) section is the C Definition
2014-07-16 17:59:26 +00:00
Hannes Magnusson
8d1d17b9b7
Fix classname
2014-07-16 17:59:24 +00:00
Jeremy Mikola
226a32985a
PHP-1136: Allow custom cursor classes from command/query results
...
This commit also restructures the namespaces and some write method APIs.
2014-07-11 15:06:00 -04:00
Jeremy Mikola
aafc3609f8
Consolidate write result classes into WriteResult
2014-07-08 14:37:22 -04:00
Hannes Magnusson
ab3e922165
Missing batch ctor
2014-07-03 09:44:18 -07:00
Hannes Magnusson
b2f621b666
Simplify Batch interface
2014-07-03 09:30:34 -07:00
Hannes Magnusson
62a3d5da76
fqd
2014-06-30 13:27:27 -07:00
Hannes Magnusson
34f82dc5fa
Add a generic result object that can be iterated over via iteratoraggregate
2014-06-30 13:07:31 -07:00
Hannes Magnusson
82c951e32e
This cursor needs a firstBatch, just like the CommandCursor
2014-06-30 13:07:06 -07:00
Hannes Magnusson
d2245c73b3
Update description per review from Jeremy
2014-06-19 14:15:32 -07:00
Hannes Magnusson
f277d731e9
Add descriptions
2014-06-19 11:17:16 -07:00
Jeremy Mikola
f533fd8a50
Fix bit values for query flags
2014-06-19 12:37:13 -04:00
Hannes Magnusson
19fb9bf24d
Change some @see into @param or @param and add some descriptions
2014-06-16 22:58:21 -07:00
Hannes Magnusson
d587a8451f
Lets not start out with complicated zpp...
2014-06-16 22:56:27 -07:00