Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to work with modern MongoDB #34

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

npsimons
Copy link

I happened to be working through https://github.com/adamtornhill/LispForTheWeb by @adamtornhill, and managed to hack a bit on this to get it working. I've had literally zero looks at the rest of the code, so I'm sure there's much more work to be done. At least this is a start, and hopefully not completely wrong.

I'm a total noob at Common Lisp and MongoDB. I just happened to be working through https://github.com/adamtornhill/LispForTheWeb by @adamtornhill, and managed to hack a bit on this to get it working. I've had literally zero looks at the rest of the code, so I'm sure there's much more work to be done. At least this is a start, and hopefully not completely wrong.
(kv "limit" ,limit)
(kv "keeptemp" ,keeptemp)
(when ,limit (kv "limit" ,limit))
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • "keeptemp" is apparently no longer supported in calls to MongoDB's mapReduce.
  • "limit" is apparently no longer allowed to be zero in calls to MongoDB's mapReduce.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, 0 is "true" in CL, so perhaps (unless (zerop limit) ...) or (when (> limit 0) ...) ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants