Á¾¼Ò¸® ¼øÀ§ ¹× ¿ä¾à
- °Ô½ÃÀÚ À̸§:
- Judotens Budiarto
- °Ô½ÃÀÚ À¥»çÀÌÆ®:
- http://code.google.com/u/judotens/
Á¾¼Ò¸® ű×
Á¾¼Ò¸® ¼³¸í
Jongos´Â JSONÀ» ÀÚµ¿À¸·Î ½ÇÇàÇÏ°í·ÎµåÇÏ´Â µµ±¸ÀÔ´Ï´Ù. Python Jongos.py .load JSON ÆÄÀÏ> DB.LOAD ( "file_name.json") ÇöÀç·Îµå µÈ JSON ÆÄÀÏ> DB.REFRESH () ÀúÀå -memory DB ÇöÀç·Îµå µÈ JSON ÆÄÀÏ> DB.SAVE () Äõ¸® °á°ú¸¦ json ÆÄÀÏ> db.capture ( "save_to_file_name.json")·Î ÀúÀåÇÕ´Ï´Ù. Ãß°¡ : db.find () / db.group () / db ÈÄ¿¡ ½ÇÇàµË´Ï´Ù. count () commandinsert »õ ·¹ÄÚµå> db.insert (json_item) »èÁ¦ ·¹ÄÚµå> db.remove (Äõ¸®) Çà> db.find (Äõ¸®) Ãß°¡ : Ãß°¡ "$ RETURN"Ãß°¡ : Äõ¸®¿¡¼ RETUE FIELD1 Query> DB.COUNT (Äõ¸®) ±×·ì¿¡ ÀÏÄ¡ÇÏ´Â Çà> db.group (Äõ¸®) ±×·ì Ãß°¡ "$ key"¸¦ Ãß°¡ÇÕ´Ï´Ù. Äõ¸®ÀÇ "Á¦¸ñ"Çʵå Á¦¸ñÀ» ±×·ìÈ KEYQUERYJSON ±¸Á¶ ¿¹Á¦·Î »ç¿ëÇÕ´Ï´Ù. : Á¤È®ÇÑ ÀÏÄ¡, Á¦¿Ü, MRS Á¦¸ñÀÌÀÖ´Â ¸ðµç Ç׸ñ°ú LIKEALDFILTER : QUERY = { "$ TITLE": "MRS"} MS¸¦ Á¦¿ÜÇÑ Á¦¸ñÀÌÀÖ´Â ¸ðµç Ç׸ñÀ» ÇÊÅ͸µÇÕ´Ï´Ù. ms : query = { "$ title": { "$ ne": "ms"}} ¸ðµÎ ÇÊÅ͸µ À̸ÞÀÏ¿¡¼ '5'¿Í °°Àº Ç׸ñ : query = { "À̸ÞÀÏ": { "$ like": "5"}} À̸ÞÀÏ¿¡¼ '5'¶Ç´Â '4'¿Í °°Àº ¸ðµç Ç׸ñÀ» ÇÊÅ͸µÇÕ´Ï´Ù. query = { ""À̸ÞÀÏ ": {"$ Likes ": }} query = {"À̸ÞÀÏ ": {"$ LikeDand ": }} º¸´Ù Å©°í ³·Àº ¼öÇÐ Á¡¼ö ¸ðµÎ 60º¸´Ù Å« ¸ðµç ¼öÇÐ Á¡¼ö : @ $ gt ": 60} {"$ gt ": 60} {"$ gt ": 60} ¸ðµç ¼öÇÐ Á¡¼ö¸¦ 60º¸´Ù ³·°Ô ÇÊÅ͸µ : query = {"store.math ": {"$ lt ": 60}} ¸ðµç ¼öÇÐ Á¡¼ö¸¦ ÇÊÅ͸µÇϽʽÿÀ 60 ÀÌ»ó : query = {"score.math ": {"$ gte ": 60}} ¸ðµÎ¸¦ ÇÊÅ͸µÇÕ´Ï´Ù. ATH Á¡¼ö´Â 60 ÀÌ»ó ÀÌÇÏ : query = { "Score.Math": { "$ lte": 60}} include and no include fillter 60 ¹× 70ÀÇ ¸ðµç ¼öÇÐ Á¡¼ö : query = { "store.math": { "$ in ": }} ¸ðµç ¼öÇÐ Á¡¼ö¸¦ 60°ú 70¿¡¼ ÇÊÅ͸µÇÏÁö ¾ÊÀ½ : query = {"store.math ": {"$ nin ": }} Á¦Ç° ȨÆäÀÌÁö
Á¾¼Ò¸® °ü·Ã ¼ÒÇÁÆ®¿þ¾î