Bug #81061 | Unable to use for loop with add() for adding documents inside mysqlsh-py | ||
---|---|---|---|
Submitted: | 13 Apr 2016 8:27 | Modified: | 13 Apr 2016 12:12 |
Reporter: | Shahriyar Rzayev | Email Updates: | |
Status: | Verified | Impact on me: | |
Category: | MySQL Server: Document Store: X Plugin | Severity: | S2 (Serious) |
Version: | 5.7.12 | OS: | Any |
Assigned to: | CPU Architecture: | Any |
[13 Apr 2016 8:27]
Shahriyar Rzayev
[13 Apr 2016 12:12]
MySQL Verification Team
Hello Shahriyar, Thank you for the report! Thanks, Umesh
[7 Jul 2017 1:21]
Alfredo Kojima
The add() method must be followed by .execute(). You can do what you want like: op = coll for doc in mydocs: op = op.add(doc) op.execute() That said, I'll leave the bug open for now because it illustrates a problem with clarity of the API.