• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

typeorm / typeorm / 22256862981

21 Feb 2026 12:31PM UTC coverage: 81.291% (+0.1%) from 81.176%
22256862981

push

github

web-flow
feat!: remove deprecated `Connection` and `ConnectionOptions` (#12022)

27682 of 33521 branches covered (82.58%)

Branch coverage included in aggregate %.

1205 of 1301 new or added lines in 76 files covered. (92.62%)

1 existing line in 1 file now uncovered.

93920 of 116068 relevant lines covered (80.92%)

71235.59 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/src/driver/spanner/SpannerDataSourceOptions.ts
NEW
1
import { BaseDataSourceOptions } from "../../data-source/BaseDataSourceOptions"
×
2
import { ReplicationMode } from "../types/ReplicationMode"
×
3
import { SpannerConnectionCredentialsOptions } from "./SpannerConnectionCredentialsOptions"
×
4

×
5
/**
×
6
 * Spanner specific connection options.
×
7
 */
×
NEW
8
export interface SpannerDataSourceOptions
×
NEW
9
    extends BaseDataSourceOptions, SpannerConnectionCredentialsOptions {
×
10
    /**
×
11
     * Database type.
×
12
     */
×
13
    readonly type: "spanner"
×
14

×
15
    /**
×
16
     * The driver object
×
17
     * This defaults to require("@google-cloud/spanner").
×
18
     */
×
19
    readonly driver?: any
×
20

×
21
    // todo
×
22
    readonly database?: string
×
23

×
24
    // todo
×
25
    readonly schema?: string
×
26

×
27
    /**
×
28
     * The charset for the connection. This is called "collation" in the SQL-level of MySQL (like utf8_general_ci).
×
29
     * If a SQL-level charset is specified (like utf8mb4) then the default collation for that charset is used.
×
30
     * Default: 'UTF8_GENERAL_CI'
×
31
     */
×
32
    readonly charset?: string
×
33

×
34
    /**
×
35
     * The timezone configured on the MySQL server.
×
36
     * This is used to type cast server date/time values to JavaScript Date object and vice versa.
×
37
     * This can be 'local', 'Z', or an offset in the form +HH:MM or -HH:MM. (Default: 'local')
×
38
     */
×
39
    readonly timezone?: string
×
40

×
41
    /**
×
42
     * The milliseconds before a timeout occurs during the initial connection to the MySQL server. (Default: 10000)
×
43
     */
×
44
    readonly connectTimeout?: number
×
45

×
46
    /**
×
47
     * The milliseconds before a timeout occurs during the initial connection to the MySQL server. (Default: 10000)
×
48
     * This difference between connectTimeout and acquireTimeout is subtle and is described in the mysqljs/mysql docs
×
49
     * https://github.com/mysqljs/mysql/tree/master#pool-options
×
50
     */
×
51
    readonly acquireTimeout?: number
×
52

×
53
    /**
×
54
     * Allow connecting to MySQL instances that ask for the old (insecure) authentication method. (Default: false)
×
55
     */
×
56
    readonly insecureAuth?: boolean
×
57

×
58
    /**
×
59
     * When dealing with big numbers (BIGINT and DECIMAL columns) in the database, you should enable this option (Default: false)
×
60
     */
×
61
    readonly supportBigNumbers?: boolean
×
62

×
63
    /**
×
64
     * Enabling both supportBigNumbers and bigNumberStrings forces big numbers (BIGINT and DECIMAL columns) to be always
×
65
     * returned as JavaScript String objects (Default: false). Enabling supportBigNumbers but leaving bigNumberStrings
×
66
     * disabled will return big numbers as String objects only when they cannot be accurately represented with
×
67
     * [JavaScript Number objects](http://ecma262-5.com/ELS5_HTML.htm#Section_8.5) (which happens when they exceed the [-2^53, +2^53] range),
×
68
     * otherwise they will be returned as Number objects. This option is ignored if supportBigNumbers is disabled.
×
69
     */
×
70
    readonly bigNumberStrings?: boolean
×
71

×
72
    /**
×
73
     * Force date types (TIMESTAMP, DATETIME, DATE) to be returned as strings rather then inflated into JavaScript Date objects.
×
74
     * Can be true/false or an array of type names to keep as strings.
×
75
     */
×
76
    readonly dateStrings?: boolean | string[]
×
77

×
78
    /**
×
79
     * Prints protocol details to stdout. Can be true/false or an array of packet type names that should be printed.
×
80
     * (Default: false)
×
81
     */
×
82
    readonly debug?: boolean | string[]
×
83

×
84
    /**
×
85
     * Generates stack traces on Error to include call site of library entrance ("long stack traces").
×
86
     * Slight performance penalty for most calls. (Default: true)
×
87
     */
×
88
    readonly trace?: boolean
×
89

×
90
    /**
×
91
     * Allow multiple mysql statements per query. Be careful with this, it could increase the scope of SQL injection attacks.
×
92
     * (Default: false)
×
93
     */
×
94
    readonly multipleStatements?: boolean
×
95

×
96
    /**
×
97
     * List of connection flags to use other than the default ones. It is also possible to blacklist default ones.
×
98
     * For more information, check https://github.com/mysqljs/mysql#connection-flags.
×
99
     */
×
100
    readonly flags?: string[]
×
101

×
102
    /**
×
103
     * Replication setup.
×
104
     */
×
105
    readonly replication?: {
×
106
        /**
×
107
         * Master server used by orm to perform writes.
×
108
         */
×
109
        readonly master: SpannerConnectionCredentialsOptions
×
110

×
111
        /**
×
112
         * List of read-from servers (slaves).
×
113
         */
×
114
        readonly slaves: SpannerConnectionCredentialsOptions[]
×
115

×
116
        /**
×
117
         * If true, PoolCluster will attempt to reconnect when connection fails. (Default: true)
×
118
         */
×
119
        readonly canRetry?: boolean
×
120

×
121
        /**
×
122
         * If connection fails, node's errorCount increases.
×
123
         * When errorCount is greater than removeNodeErrorCount, remove a node in the PoolCluster. (Default: 5)
×
124
         */
×
125
        readonly removeNodeErrorCount?: number
×
126

×
127
        /**
×
128
         * If connection fails, specifies the number of milliseconds before another connection attempt will be made.
×
129
         * If set to 0, then node will be removed instead and never re-used. (Default: 0)
×
130
         */
×
131
        readonly restoreNodeTimeout?: number
×
132

×
133
        /**
×
134
         * Determines how slaves are selected:
×
135
         * RR: Select one alternately (Round-Robin).
×
136
         * RANDOM: Select the node by random function.
×
137
         * ORDER: Select the first node available unconditionally.
×
138
         */
×
139
        readonly selector?: "RR" | "RANDOM" | "ORDER"
×
140

×
141
        /**
×
142
         * Default connection pool to use for SELECT queries
×
143
         * @default "slave"
×
144
         */
×
145
        readonly defaultMode?: ReplicationMode
×
146
    }
×
147

×
148
    readonly poolSize?: never
×
149
}
×
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc