{"id":15309056,"url":"https://github.com/marcelod/codeigniter-mongodb-library","last_synced_at":"2025-10-08T16:31:24.291Z","repository":{"id":5269782,"uuid":"6448364","full_name":"marcelod/codeigniter-mongodb-library","owner":"marcelod","description":"NEW VERSION UNDER DEVELOPMENT - SEE V2 BRANCH. CodeIgniter library for interfacing with MongoDB","archived":false,"fork":true,"pushed_at":"2012-09-02T15:47:42.000Z","size":127,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-10-02T08:20:52.801Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"jc1arke/codeigniter-mongodb-library","license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/marcelod.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-10-29T22:01:58.000Z","updated_at":"2013-01-12T21:29:58.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/marcelod/codeigniter-mongodb-library","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcelod%2Fcodeigniter-mongodb-library","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcelod%2Fcodeigniter-mongodb-library/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcelod%2Fcodeigniter-mongodb-library/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcelod%2Fcodeigniter-mongodb-library/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/marcelod","download_url":"https://codeload.github.com/marcelod/codeigniter-mongodb-library/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":235731895,"owners_count":19036821,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-01T08:20:13.016Z","updated_at":"2025-10-08T16:31:18.920Z","avatar_url":"https://github.com/marcelod.png","language":"PHP","readme":"# Version 2 of this library is being actively developed\n\n### Please visit [https://github.com/alexbilbie/codeigniter-mongodb-library/tree/v2](https://github.com/alexbilbie/codeigniter-mongodb-library/tree/v2)\n\n### Please ensure any new bugs have been tested on this new version\n\n---\n\n# CodeIgniter MongoDB Library\n\nThis is an active record inspired CodeIgniter library to integrate a MongoDB database into your application.\n\n1. Add the file Mongo_db.php to your /application/libraries folder.\n2. Add the file mongodb.php to your /application/config folder.\n3. Update the config file.\n\nYou can now autoload the library or include it in one of your controllers at run time.\n\nYou can interact with the database using many of the active record functions that CodeIgniter provides.\n\n\t$this-\u003emongo_db\n\t\t-\u003ewhere_gte('age', 18)\n\t\t-\u003ewhere_in('country', array(\n\t\t\t'England',\n\t\t\t'Scotland',\n\t\t\t'Wales',\n\t\t\t'Ireland'\n\t\t))\n\t\t-\u003ewhere(array(\n\t\t\t'likes_whisky' =\u003e TRUE\n\t\t))\n\t\t-\u003eget('people');\n\t\nThe result will be an object containing matching documents.\n\n## Select Functions\n\n* `select`\t\t\t\t\tGet select fields from returned documents\n* `where`\t\t\t\t\t\tWhere section of the query\n* `where_in`\t\t\t\t\tWhere something is in an array of something\n* `where_in_all`\t\t\tWhere something is in all of an array of * something\n* `where_not_in`\t\t\tWhere something is not in array of something\n* `where_gt`\t\t\t\t\tWhere something is greater than something\n* `where_gte`\t\t\t\tWhere something is greater than or equal to something\n* `where_lt`\t\t\t\t\tWhere something is less than something\n* `where_lte`\t\t\t\tWhere something is less than or equal to something\n* `where_not_equal`\t\tWhere something is not equal to something\n* `where_near``\t\t\t\tWhere something is near to something (2d geospatial search)\n* `order_by`\t\t\t\t\tOrder the results\n* `limit`\t\t\t\t\t\tLimit the number of returned results\n\n## Insert Function\n\n* `insert`\t\t\t\t\tInsert a new document into a collection\n\n## Update Functions\n\n* `inc`\t\t\t\t\t\tIncrements the value of a field\n* `dec`\t\t\t\t\t\tDecrements the value of a field\n* `set`\t\t\t\t\t\tSets a field to a value\n* `unset_field`\t\t\t\tUnsets a field\n* `addtoset`\t\t\t\t\tAdds a value to an array if doesn't exist\n* `push`\t\t\t\t\t\tPushes a value into an array field\n* `pop`\t\t\t\t\t\tPops a value from an array field\n* `pull`\t\t\t\t\t\tRemoves an array by the value of a field\n* `rename_field`\t\t\tRename a field\n* `update`\t\t\t\t\tUpdate a single document in a collection\n* `update_all`\t\t\t\tUpdate all documents in a collection\n\n## Delete Functions\n\n* `delete`\t\t\t\t\tDelete a single document in a collection\n* `delete_all`\t\t\t\tDelete all documents in a collection\n\n## Index Functions\n\n* `set_index`\t\t\t\tCreates a new index\n* `delete_index`\t\t\tDeletes an index\n\n## Database Functions\n\n* `drop_db`\t\t\t\t\tDrops a database\n* `switch_db`\t\t\t\tSwitch to a different database\n\n## Collection Functions\n\n* `drop_collection`\t\tDrops a collection","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarcelod%2Fcodeigniter-mongodb-library","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarcelod%2Fcodeigniter-mongodb-library","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarcelod%2Fcodeigniter-mongodb-library/lists"}