Skip to content

Commit 26a89c3

Browse files
committed
Change from postgres to postgresql type
Changing to "postgresql" as the official Postgres type as the parser library currently requires that format and there are no other dependencies on the alternative.
1 parent f7216ca commit 26a89c3

File tree

6 files changed

+7
-7
lines changed

6 files changed

+7
-7
lines changed

src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ export default {
179179
};
180180

181181
if (
182-
env.EXTERNAL_DB_TYPE === "postgres" ||
182+
env.EXTERNAL_DB_TYPE === "postgresql" ||
183183
env.EXTERNAL_DB_TYPE === "mysql"
184184
) {
185185
dataSource.external = {

src/literest/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ export class LiteREST {
3333
let query = `PRAGMA table_info(${tableName});`;
3434

3535
if (this.dataSource.source === "external") {
36-
if (this.dataSource.external?.dialect === "postgres") {
36+
if (this.dataSource.external?.dialect === "postgresql") {
3737
query = `
3838
SELECT kcu.column_name AS name
3939
FROM information_schema.table_constraints tc

src/operation.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -396,7 +396,7 @@ export async function executeSDKQuery(opts: {
396396

397397
let connection: SqlConnection;
398398

399-
if (external.dialect === "postgres") {
399+
if (external.dialect === "postgresql") {
400400
const { database } = await createSDKPostgresConnection(external);
401401
connection = database;
402402
} else if (external.dialect === "mysql") {

src/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export type RemoteSource = {
1313
};
1414

1515
export type PostgresSource = {
16-
dialect: "postgres";
16+
dialect: "postgresql";
1717
} & RemoteSource;
1818

1919
export type MySQLSource = {

worker-configuration.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ interface Env {
88
STUDIO_PASS: "123456";
99
ENABLE_ALLOWLIST: 0;
1010
ENABLE_RLS: 0;
11-
EXTERNAL_DB_TYPE: "postgres";
11+
EXTERNAL_DB_TYPE: "postgresql";
1212
AUTH_ALGORITHM: "RS256";
1313
AUTH_JWKS_ENDPOINT: "";
14-
DATABASE_DURABLE_OBJECT: DurableObjectNamespace<import("./src/index").DatabaseDurableObject>;
14+
DATABASE_DURABLE_OBJECT: DurableObjectNamespace<import("./src/index").StarbaseDBDurableObject>;
1515
}

wrangler.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ ENABLE_RLS = 0
4949
# External database source details
5050
# This enables Starbase to connect to an external data source
5151
# OUTERBASE_API_KEY = ""
52-
EXTERNAL_DB_TYPE = "postgres"
52+
EXTERNAL_DB_TYPE = "postgresql"
5353
# EXTERNAL_DB_HOST = ""
5454
# EXTERNAL_DB_PORT = 0
5555
# EXTERNAL_DB_USER = ""

0 commit comments

Comments
 (0)