use apple
db.apple.insert({})
Observations:
This is also observed for Index,Roles and USers and for Collection fields.
|
94 KB
|
95 KB
@ivan: we have only supported generating MongoJS syntax for a few of these commands, as you are aware. How about doing the following to remove user confusion: If the user chooses to generate a script for the current window & the current window is a MongoJS window and we don't support generating JS syntax for that command, add a comment to the generated script. e.g.
//MongoJS syntax is not supported for the selected object. Therefore, MongoSQL syntax has been generated. CREATE INDEX _id_ ON [object Object](_id) GO
Pls confirm that this will be a low cost change. Otherwise, another approach could be that you display a pop-up dialog w/ an error message instead of generating the script.
If the user chooses "New Window" : create the new window w/ MongoSQL syntax. If the user chooses "File As", create MongoSQL syntax & .sql file.
@tariq: in our doc, we should state for which scripting commands MongoJS syntax is supported.
@tariq: in our doc, we should state for which scripting commands MongoJS syntax is supported.
Changes have been made so that the following will now script the message:
Script Database CREATE
Script Database DROP
Script Collection.Field ALTER
Script Collection.Field DROP
Script Index CREATE
Script Index CREATE (Full)
Script Index DROP
Script Role CREATE
Script User CREATE
Script User DROP
Created an Issue #13905 for enhancing scripting to handle the above actions in version 18.
Changes have been made so that the following will now script the message:
Script Database CREATE
Script Database DROP
Script Collection.Field ALTER
Script Collection.Field DROP
Script Index CREATE
Script Index CREATE (Full)
Script Index DROP
Script Role CREATE
Script User CREATE
Script User DROP
Created an Issue #13905 for enhancing scripting to handle the above actions in version 18.
Verified in 17.0.0-rc-46.
Script Database CREATE // Pass
Script Database DROP // Pass
Script Collection.Field ALTER // Pass
Script Collection.Field DROP // Pass
Script Index CREATE // Pass
Script Index CREATE (Full) // Pass
Script Index DROP // Pass
Script Role CREATE // Pass
Script User CREATE // Pass
Script User DROP // Pass
Script Collection CREATE (Full) // Fail
When we have a index on collection and we use Create Full, index script is generated in SQL syntax and no comments is added as we did for other command.
Below Syntax is generated.
db.createCollection( "products", { size:8192 } )
Verified in 17.0.0-rc-46.
Script Database CREATE // Pass
Script Database DROP // Pass
Script Collection.Field ALTER // Pass
Script Collection.Field DROP // Pass
Script Index CREATE // Pass
Script Index CREATE (Full) // Pass
Script Index DROP // Pass
Script Role CREATE // Pass
Script User CREATE // Pass
Script User DROP // Pass
Script Collection CREATE (Full) // Fail
When we have a index on collection and we use Create Full, index script is generated in SQL syntax and no comments is added as we did for other command.
Below Syntax is generated.
db.createCollection( "products", { size:8192 } )
Comments will print for create full above index scripts if they exists now
Comments will print for create full above index scripts if they exists now
Verified in 17.0.0-rc-47
Script Collection CREATE (Full) // Fail
Now comment is displayed and below syntax is generated.
db.createCollection( "products", { size:8192 } )
Verified in 17.0.0-rc-47
Script Collection CREATE (Full) // Fail
Now comment is displayed and below syntax is generated.
db.createCollection( "products", { size:8192 } )
In the issue 13905, I have commented scenario. Therefor removing label "pending verification in other release"
In the issue 13905, I have commented scenario. Therefor removing label "pending verification in other release"
Issue #13868 |
Closed |
Fixed |
Resolved |
Completion |
No due date |
Fixed Build v17.0.0-rc-47, v18.0.0-dev-24 |
No time estimate |
2 issue links |
relates to #14007
Issue #14007QA(MongoJS)-> CREATE script is not generating properly for Multiple collections |
relates to #13905
Issue #13905MongoJS -> JS script for index, roles, users, databases and fields |
@ivan: we have only supported generating MongoJS syntax for a few of these commands, as you are aware. How about doing the following to remove user confusion: If the user chooses to generate a script for the current window & the current window is a MongoJS window and we don't support generating JS syntax for that command, add a comment to the generated script. e.g.
Pls confirm that this will be a low cost change. Otherwise, another approach could be that you display a pop-up dialog w/ an error message instead of generating the script.
If the user chooses "New Window" : create the new window w/ MongoSQL syntax. If the user chooses "File As", create MongoSQL syntax & .sql file.