github.com/abolfazlbeh/zhycan@v0.0.0-20230819144214-24cf38237387/configs/db_sample.json (about)

     1  {
     2    "connections": ["server1", "server4"],
     3    "server1": {
     4      "type": "sqlite",
     5      "db": "file.db",
     6      "options": {
     7        "mode": "memory",
     8        "cache": "shared",
     9        "_fk": "1"
    10      },
    11      "config": {
    12        "skip_default_transaction": false,
    13        "dry_run": false,
    14        "prepare_stmt": true,
    15        "disable_automatic_ping": false,
    16        "disable_foreign_key_constraint_when_migrating": false,
    17        "ignore_relationships_when_migrating": false,
    18        "disable_nested_transaction": false
    19      },
    20      "logger": {
    21        "slow_threshold": 1000,
    22        "ignore_record_not_found_error": false,
    23        "parameterized_queries": false,
    24        "log_level": "debug"
    25      }
    26    },
    27    "server2": {
    28      "type": "mysql",
    29      "db": "databasename",
    30      "username": "username",
    31      "password": "password",
    32      "host": "127.0.0.1",
    33      "port": "3306",
    34      "protocol": "tcp",
    35      "options": {
    36        "charset": "utf8mb4",
    37        "parseTime": "True",
    38        "loc": "Local"
    39      },
    40      "specific_config": {
    41        "default_string_size": 256,
    42        "disable_datetime_precision": true,
    43        "support_rename_index": true,
    44        "support_rename_column": true,
    45        "skip_initialize_with_version": false,
    46        "disable_with_returning": false,
    47        "support_for_share_clause": false,
    48        "support_null_as_default_value": false,
    49        "support_rename_column_unique": false,
    50        "default_datetime_precision": 3
    51      }
    52    },
    53    "server3": {
    54      "type": "postgresql",
    55      "db": "databasename",
    56      "username": "username",
    57      "password": "password",
    58      "host": "127.0.0.1",
    59      "port": "3306",
    60      "options": {
    61        "sslmode": "disable",
    62        "TimeZone": "Asia/Shanghai"
    63      },
    64      "specific_config": {
    65        "prefer_simple_protocol": true,
    66        "without_returning": false
    67      }
    68    },
    69    "server4": {
    70      "type": "mongodb",
    71      "db": "",
    72      "username": "username",
    73      "password": "password",
    74      "host": "127.0.0.1",
    75      "port": "27017",
    76      "options": {
    77        "maxPoolSize": "100",
    78        "w": "majority",
    79        "connectTimeoutMS": "30000"
    80      },
    81      "logger": {
    82        "component_command": "debug",
    83        "component_connection": "info",
    84        "max_document_length": 1000
    85      }
    86    }
    87  }