!CHAPTER Details on FoxxRepository A repository is a gateway to the database. It gets data from the database, updates it or saves new data. It uses the given model when it returns a model and expects instances of the model for methods like save. In your repository file, export the repository as *repository*. ```javascript Foxx = require("org/arangodb/foxx"); TodosRepository = Foxx.Repository.extend({ }); exports.repository = TodosRepository; ``` !SUBSECTION Initialize @startDocuBlock JSF_foxx_repository_initializer !SECTION Attributes of a Repository !SUBSECTION Collection @startDocuBlock JSF_foxx_repository_collection !SUBSECTION ModelPrototype @startDocuBlock JSF_foxx_repository_modelPrototype !SUBSECTION Prefix @startDocuBlock JSF_foxx_repository_prefix !SECTION Methods of a Repository !SUBSECTION Adding entries to the repository @startDocuBlock JSF_foxx_repository_save !SUBSECTION Finding entries in the repository @startDocuBlock JSF_foxx_repository_byId @startDocuBlock JSF_foxx_repository_byExample @startDocuBlock JSF_foxx_repository_firstExample @startDocuBlock JSF_foxx_repository_all !SUBSECTION Removing entries from the repository @startDocuBlock JSF_foxx_repository_remove @startDocuBlock JSF_foxx_repository_removeById @startDocuBlock JSF_foxx_repository_removeByExample !SUBSECTION Replacing entries in the repository @startDocuBlock JSF_foxx_repository_replace @startDocuBlock JSF_foxx_repository_replaceById @startDocuBlock JSF_foxx_repository_replaceByExample !SUBSECTION Updating entries in the repository @startDocuBlock JSF_foxx_repository_updateById @startDocuBlock JSF_foxx_repository_updateByExample !SUBSECTION Counting entries in the repository @startDocuBlock JSF_foxx_repository_count