This repository has been archived by the owner on Sep 2, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 861
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
254 changed files
with
10,244 additions
and
3,137 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,3 @@ | ||
[submodule "prisma-query"] | ||
path = server/prisma-rs/libs/prisma-query | ||
url = https://github.com/prisma/prisma-query.git | ||
[submodule "server/.buildkite/build-cli"] | ||
path = server/.buildkite/build-cli | ||
url = https://github.com/prisma/build-cli.git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
set -ex | ||
|
||
cd cli/packages/prisma-datamodel | ||
yarn | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
set -ex | ||
|
||
# | ||
# Detect change | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule build-cli
updated
7 files
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
42 changes: 42 additions & 0 deletions
42
...-connector-native/src/main/scala/com/prisma/api/connector/native/ApiConnectorNative.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
package com.prisma.api.connector.native | ||
|
||
import java.sql.Driver | ||
|
||
import com.prisma.api.connector.postgres.PostgresApiConnector | ||
import com.prisma.api.connector.sqlite.SQLiteApiConnector | ||
import com.prisma.api.connector.{ApiConnector, DataResolver, DatabaseMutactionExecutor} | ||
import com.prisma.config.DatabaseConfig | ||
import com.prisma.shared.models.{ConnectorCapabilities, Project, ProjectIdEncoder} | ||
|
||
import scala.concurrent.{ExecutionContext, Future} | ||
|
||
trait Backup { | ||
def driver: Driver | ||
} | ||
|
||
case class SqliteBackup(driver: Driver) extends Backup | ||
case class PostgresBackup(driver: Driver) extends Backup | ||
|
||
case class ApiConnectorNative(config: DatabaseConfig, backup: Backup)(implicit ec: ExecutionContext) extends ApiConnector { | ||
override def initialize(): Future[Unit] = Future.unit | ||
override def shutdown(): Future[Unit] = Future.unit | ||
|
||
override def databaseMutactionExecutor: DatabaseMutactionExecutor = { | ||
backup match { | ||
case SqliteBackup(driver) => { | ||
val base = SQLiteApiConnector(config, driver) | ||
NativeDatabaseMutactionExecutor(base.databaseMutactionExecutor.slickDatabase) | ||
} | ||
case PostgresBackup(driver) => { | ||
val base = PostgresApiConnector(config, driver) | ||
NativeDatabaseMutactionExecutor(base.databaseMutactionExecutor.slickDatabase) | ||
} | ||
} | ||
} | ||
|
||
override def dataResolver(project: Project): DataResolver = NativeDataResolver(project) | ||
override def masterDataResolver(project: Project): DataResolver = NativeDataResolver(project) | ||
override def projectIdEncoder: ProjectIdEncoder = ProjectIdEncoder('_') | ||
|
||
override val capabilities = ConnectorCapabilities.sqliteNative | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.