<commit_before>/*
 * Copyright 2014-2018 <NAME>
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.guerinet.mymartlet.util.room

import android.content.Context
import androidx.room.Database
import androidx.room.Room
import androidx.room.RoomDatabase
import androidx.room.TypeConverters
import com.guerinet.mymartlet.model.place.Category
import com.guerinet.mymartlet.model.place.Place
import com.guerinet.mymartlet.util.room.daos.CategoryDao
import com.guerinet.mymartlet.util.room.daos.PlaceDao
import com.guerinet.room.converter.IntMutableListConverter

/**
 * Database with all of the config information
 * @author <NAME>
 * @since 2.0.0
 */
@Database(exportSchema = false, entities = [Category::class, Place::class], version = 1)
@TypeConverters(IntMutableListConverter::class)
abstract class ConfigDb : RoomDatabase() {

    abstract fun categoryDao(): CategoryDao

    abstract fun placeDao(): PlaceDao

    companion object {

        fun init(context: Context): ConfigDb =
            Room.databaseBuilder(context, ConfigDb::class.java, "config-db").build()
    }
}<commit_msg>Add documentation to the ConfigDb<commit_after>/*
 * Copyright 2014-2019 <NAME>
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.guerinet.mymartlet.util.room

import android.content.Context
import androidx.room.Database
import androidx.room.Room
import androidx.room.RoomDatabase
import androidx.room.TypeConverters
import com.guerinet.mymartlet.model.place.Category
import com.guerinet.mymartlet.model.place.Place
import com.guerinet.mymartlet.util.room.daos.CategoryDao
import com.guerinet.mymartlet.util.room.daos.PlaceDao
import com.guerinet.room.converter.IntMutableListConverter

/**
 * Database with all of the config information
 * @author <NAME>
 * @since 2.0.0
 */
@Database(exportSchema = false, entities = [Category::class, Place::class], version = 1)
@TypeConverters(IntMutableListConverter::class)
abstract class ConfigDb : RoomDatabase() {

    /**
     * Returns the [CategoryDao] instance for all [Category] related DB operations
     */
    abstract fun categoryDao(): CategoryDao

    /**
     * Returns the [PlaceDao] instance for all [Place] related DB operations
     */
    abstract fun placeDao(): PlaceDao

    companion object {

        /**
         * Initializes the [ConfigDb] using the app [context]
         */
        fun init(context: Context): ConfigDb =
            Room.databaseBuilder(context, ConfigDb::class.java, "config-db").build()
    }
}
{'fraction_non_alphanumeric': 0.09556313993174062, 'fraction_numerical': 0.009101251422070534, 'mean_word_length': 4.031473533619456, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4997377', 'n_tokens_mistral': 1008, 'n_tokens_neox': 990, 'n_words': 319}