Groups
Groups
Sign in
Groups
Groups
mongodb-user
Conversations
About
Send feedback
Help
Having problems with numbers in collection name
838 views
Skip to first unread message
Denis
unread,
Sep 10, 2009, 3:19:32 AM
9/10/09
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to mongodb-user
Hello,
I have recently started using mongo db for my need.
I'm trying to query a collection named
"summary_from_2009-09-03_06:37", but ending up getting an error.
show collections;
2009
summary_from_2009-09-03_06:37
summary_from_2009-09-03_06:39
system.indexes
db.summary_from_2009-09-03_06:37.find()
Thu Sep 10 15:17:46 JS Error: 09 is not a legal ECMA-262 octal
constant (shell):0
Thu Sep 10 15:17:46 JS Error: SyntaxError: missing ; before statement
(shell):0
For some reason mongo treats collection name as an integer. Should I
parse collection name as a string or otherwise escape it?
Eliot Horowitz
unread,
Sep 10, 2009, 8:32:49 AM
9/10/09
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to mongod...@googlegroups.com
That's just a shell issue b/c its javascript.
You can do:
db["summary_from_2009-09-03_06:37"].find()
to work around it.
Reply all
Reply to author
Forward
0 new messages