• 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/postgres/PostgresDataSourceOptions.ts
1
import { BaseDataSourceOptions } from "../../data-source/BaseDataSourceOptions"
×
2
import { ReplicationMode } from "../types/ReplicationMode"
×
3
import { PostgresConnectionCredentialsOptions } from "./PostgresConnectionCredentialsOptions"
×
4

×
5
/**
×
6
 * Postgres-specific connection options.
×
7
 */
×
NEW
8
export interface PostgresDataSourceOptions
×
9
    extends BaseDataSourceOptions, PostgresConnectionCredentialsOptions {
×
10
    /**
×
11
     * Database type.
×
12
     */
×
13
    readonly type: "postgres"
×
14

×
15
    /**
×
16
     * Schema name.
×
17
     */
×
18
    readonly schema?: string
×
19

×
20
    /**
×
21
     * The driver object
×
22
     * This defaults to `require("pg")`.
×
23
     */
×
24
    readonly driver?: any
×
25

×
26
    /**
×
27
     * The driver object
×
28
     * This defaults to `require("pg-native")`.
×
29
     */
×
30
    readonly nativeDriver?: any
×
31

×
32
    /**
×
33
     * A boolean determining whether to pass time values in UTC or local time. (default: false).
×
34
     */
×
35
    readonly useUTC?: boolean
×
36

×
37
    /**
×
38
     * Replication setup.
×
39
     */
×
40
    readonly replication?: {
×
41
        /**
×
42
         * Master server used by orm to perform writes.
×
43
         */
×
44
        readonly master: PostgresConnectionCredentialsOptions
×
45

×
46
        /**
×
47
         * List of read-from servers (slaves).
×
48
         */
×
49
        readonly slaves: PostgresConnectionCredentialsOptions[]
×
50

×
51
        /**
×
52
         * Default connection pool to use for SELECT queries
×
53
         * @default "slave"
×
54
         */
×
55
        readonly defaultMode?: ReplicationMode
×
56
    }
×
57

×
58
    /**
×
59
     * The milliseconds before a timeout occurs during the initial connection to the postgres
×
60
     * server. If undefined, or set to 0, there is no timeout. Defaults to undefined.
×
61
     */
×
62
    readonly connectTimeoutMS?: number
×
63

×
64
    /**
×
65
     * The Postgres extension to use to generate UUID columns. Defaults to uuid-ossp.
×
66
     * If pgcrypto is selected, TypeORM will use the gen_random_uuid() function from this extension.
×
67
     * If uuid-ossp is selected, TypeORM will use the uuid_generate_v4() function from this extension.
×
68
     */
×
69
    readonly uuidExtension?: "pgcrypto" | "uuid-ossp"
×
70

×
71
    /*
×
72
     * Function handling errors thrown by drivers pool.
×
73
     * Defaults to logging error with `warn` level.
×
74
     */
×
75
    readonly poolErrorHandler?: (err: any) => any
×
76

×
77
    /**
×
78
     * Include notification messages from Postgres server in client logs
×
79
     */
×
80
    readonly logNotifications?: boolean
×
81

×
82
    /**
×
83
     * Automatically install postgres extensions
×
84
     */
×
85
    readonly installExtensions?: boolean
×
86

×
87
    /**
×
88
     * Return 64-bit integers (int8) as JavaScript integers.
×
89
     *
×
90
     * Because JavaScript doesn't have support for 64-bit integers node-postgres cannot confidently
×
91
     * parse int8 data type results as numbers because if you have a huge number it will overflow
×
92
     * and the result you'd get back from node-postgres would not be the result in the database.
×
93
     * That would be a very bad thing so node-postgres just returns int8 results as strings and leaves the parsing up to you.
×
94
     *
×
95
     * Enabling parseInt8 will cause node-postgres to parse int8 results as numbers.
×
96
     * Note: the maximum safe integer in js is: Number.MAX_SAFE_INTEGER (`+2^53`)
×
97
     * @see [JavaScript Number objects](http://ecma262-5.com/ELS5_HTML.htm#Section_8.5)
×
98
     * @see [node-postgres int8 explanation](https://github.com/brianc/node-pg-types#:~:text=on%20projects%3A%20return-,64%2Dbit%20integers,-(int8)%20as)
×
99
     * @see [node-postgres defaults.parseInt8 implementation](https://github.com/brianc/node-postgres/blob/pg%408.8.0/packages/pg/lib/defaults.js#L80)
×
100
     */
×
101
    readonly parseInt8?: boolean
×
102

×
103
    /**
×
104
     * List of additional Postgres extensions to be installed in the database.
×
105
     */
×
106
    readonly extensions?: string[]
×
107
}
×
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