{"action":"opened","issue":{"url":"https://api.github.com/repos/pharo-nosql/mongotalk/issues/40","repository_url":"https://api.github.com/repos/pharo-nosql/mongotalk","labels_url":"https://api.github.com/repos/pharo-nosql/mongotalk/issues/40/labels{/name}","comments_url":"https://api.github.com/repos/pharo-nosql/mongotalk/issues/40/comments","events_url":"https://api.github.com/repos/pharo-nosql/mongotalk/issues/40/events","html_url":"https://github.com/pharo-nosql/mongotalk/issues/40","id":387714069,"node_id":"MDU6SXNzdWUzODc3MTQwNjk=","number":40,"title":"[feature request] Ability to send queries in raw js syntax","user":{"login":"sebastianconcept","id":475508,"node_id":"MDQ6VXNlcjQ3NTUwOA==","avatar_url":"https://avatars2.githubusercontent.com/u/475508?v=4","gravatar_id":"","url":"https://api.github.com/users/sebastianconcept","html_url":"https://github.com/sebastianconcept","followers_url":"https://api.github.com/users/sebastianconcept/followers","following_url":"https://api.github.com/users/sebastianconcept/following{/other_user}","gists_url":"https://api.github.com/users/sebastianconcept/gists{/gist_id}","starred_url":"https://api.github.com/users/sebastianconcept/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sebastianconcept/subscriptions","organizations_url":"https://api.github.com/users/sebastianconcept/orgs","repos_url":"https://api.github.com/users/sebastianconcept/repos","events_url":"https://api.github.com/users/sebastianconcept/events{/privacy}","received_events_url":"https://api.github.com/users/sebastianconcept/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-12-05T11:30:17Z","updated_at":"2018-12-05T11:30:17Z","closed_at":null,"author_association":"NONE","body":"Hi there, and thanks for MongoTalk! it's  agreat piece of software and convenient way to access MongoDB from Pharo. I'd like to have a feature that I think is currently missing and it would be extremely useful and powerful IMHO: being able to send a query in raw JavaScript syntax and yet receive the answer as we would expect in any other MongoTalk query.\r\n\r\nHere is why:\r\n\r\nIn real applications you often have aggregations and queries that use advanced MongoDB features. Those queries are complex enough in their native syntax and adding a layer of complexity in translating it to \"the MongoTalk way\" makes them orders of magnitude more complex and verbose. And that's when even possible from Smalltalk because is easy to get to the point of a missing MongoDB feature in MongoTalk as client.\r\n\r\nThe need for those queries is not going to go away because you want to be able to take advantage of the DB engine advanced features and also demands that are simply out of your control. \r\n\r\nSo, as I see it, there are two paths to take:\r\n\r\n1. Extend _the MongoTalk's way_ with the missing feature.\r\n2. Add to MongoTalk the ability to send queries in raw JavaScript.\r\n\r\nAs good as 1 is, it still have the problem of having to \"translate\" original queries that were designed in JavaScript into the _the MongoTalk way_ which consumes time for no good reason and it takes a significant effort in time to get those features nailed one by one without introducing bugs. All this is  delaying the point in which you can start delivering more value from MongoTalk.\r\n\r\nI propose to **add to MongoTalk the ability to send queries in raw JavaScript** because, while it doesn't exclude you from eventually implementing _the MongoTalk way_ to do queries, it provides of the full power of MongoDB for those who know what they are doing.\r\n\r\nIt wouldn't be rare that a database in MongoDB is shared among other services with their own history. History that some times will have database design that wasn't the most brilliant structure the app could have and yet you can come in with Pharo and create a microservice that yields on that data and process it providing a very valuable service that other parts can't. Actually that would be a great case. It would be Pharo winning new territory over other software that is just too messy to be extended."}}
{"actor":{"display_login":"sebastianconcept"}}