{"id":34316714,"url":"https://github.com/mikowals/batch-insert","last_synced_at":"2025-12-17T11:47:09.750Z","repository":{"id":25131997,"uuid":"28553975","full_name":"mikowals/batch-insert","owner":"mikowals","description":"Meteor package enabling batch document inserts to reduce database traffic.","archived":false,"fork":false,"pushed_at":"2023-03-07T05:35:08.000Z","size":193,"stargazers_count":40,"open_issues_count":7,"forks_count":10,"subscribers_count":6,"default_branch":"master","last_synced_at":"2024-04-09T14:40:56.244Z","etag":null,"topics":["meteor","mongodb","nodejs","optimistic-ui"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mikowals.png","metadata":{"files":{"readme":"README.md","changelog":"History.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-12-28T04:45:45.000Z","updated_at":"2024-04-09T14:40:56.245Z","dependencies_parsed_at":"2023-01-14T02:30:22.137Z","dependency_job_id":null,"html_url":"https://github.com/mikowals/batch-insert","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/mikowals/batch-insert","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikowals%2Fbatch-insert","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikowals%2Fbatch-insert/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikowals%2Fbatch-insert/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikowals%2Fbatch-insert/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mikowals","download_url":"https://codeload.github.com/mikowals/batch-insert/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikowals%2Fbatch-insert/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":27782839,"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","status":"online","status_checked_at":"2025-12-17T02:00:08.291Z","response_time":55,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["meteor","mongodb","nodejs","optimistic-ui"],"created_at":"2025-12-17T11:47:08.626Z","updated_at":"2025-12-17T11:47:09.743Z","avatar_url":"https://github.com/mikowals.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# batch-insert\n\nMeteor package enabling insert of multiple documents while maintaining reactivity and respecting `allow` and `deny` rules.\n\nIf you find this package useful consider commenting at https://github.com/meteor/meteor-feature-requests/issues/15 to get bulk insert support directly in Meteor core.\n\n# Installation\n\nIn your meteor app directory run:\n\n    meteor add mikowals:batch-insert\n\n# Usage\n\nThe package adds a `batchInsert()` function on each collection instance.  It works just like `insert()` but takes an array of objects and returns an array of `_id`s.\n\nOn the client, the `_id`s are available synchronously.  Client-side security is managed with allow / deny rules on the collection.  \n\nOn the server, inserted documents are published to subscribed clients when the `batchInsert` completes successfully.\n\n    // on server and client\n    Data = new Meteor.Collection('data');\n\n    // must have an allow function on server to use batchInsert() on client.\n    Data.allow({\n      insert: function(){ return true };\n    });\n\n    // on server or client\n    var newIds = Data.batchInsert([{item: junk},{item: garbage}]);  // returns array of created _id values\n\n    // use asynchronously on client or server.  \n    var moreIds = Data.batchInsert([{item: junk2},{item: garbage2}], function( err, res){\n      //called with err or res where res is array of created _id values\n    });  \n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmikowals%2Fbatch-insert","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmikowals%2Fbatch-insert","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmikowals%2Fbatch-insert/lists"}