prisma-datamodel
Advanced tools
Comparing version 1.33.0-alpha.1 to 1.33.0-alpha.2
@@ -9,3 +9,3 @@ export declare abstract class DirectiveKeys { | ||
static sequence: string; | ||
static linkTable: string; | ||
static relationTable: string; | ||
static scalarList: string; | ||
@@ -12,0 +12,0 @@ static isId: string; |
@@ -13,3 +13,3 @@ "use strict"; | ||
DirectiveKeys.sequence = 'sequence'; | ||
DirectiveKeys.linkTable = 'linkTable'; | ||
DirectiveKeys.relationTable = 'relationTable'; | ||
DirectiveKeys.scalarList = 'scalarList'; | ||
@@ -16,0 +16,0 @@ DirectiveKeys.isId = 'id'; |
@@ -139,3 +139,3 @@ /** | ||
*/ | ||
isLinkTable: boolean; | ||
isRelationTable: boolean; | ||
/** | ||
@@ -142,0 +142,0 @@ * The name of this type. |
@@ -135,3 +135,3 @@ import { IGQLType, IGQLField, ISDL, IDirectiveInfo, IIndexInfo, IdStrategy, ISequenceInfo } from '../model'; | ||
*/ | ||
protected isLinkTable(type: any): boolean; | ||
protected isRelationTable(type: any): boolean; | ||
/** | ||
@@ -138,0 +138,0 @@ * Parases an object type. |
@@ -325,4 +325,4 @@ "use strict"; | ||
*/ | ||
DefaultParser.prototype.isLinkTable = function (type) { | ||
return this.hasDirective(type, directives_1.DirectiveKeys.linkTable); | ||
DefaultParser.prototype.isRelationTable = function (type) { | ||
return this.hasDirective(type, directives_1.DirectiveKeys.relationTable); | ||
}; | ||
@@ -344,3 +344,3 @@ /** | ||
var isEmbedded = this.isEmbedded(type); | ||
var isLinkTable = this.isLinkTable(type); | ||
var isRelationTable = this.isRelationTable(type); | ||
var directives = this.parseDirectives(type); | ||
@@ -352,3 +352,3 @@ var indices = this.parseIndices(type, fields); | ||
isEnum: false, | ||
isLinkTable: isLinkTable, | ||
isRelationTable: isRelationTable, | ||
isEmbedded: isEmbedded, | ||
@@ -398,3 +398,3 @@ databaseName: databaseName, | ||
isEnum: true, | ||
isLinkTable: false, | ||
isRelationTable: false, | ||
isEmbedded: false, | ||
@@ -401,0 +401,0 @@ directives: directives, |
@@ -9,3 +9,3 @@ import { ISDL, IGQLType, IDirectiveInfo, IGQLField, IIndexInfo } from '../model'; | ||
}; | ||
protected createIsLinkTableTypeDirective(type: IGQLType): { | ||
protected createIsRelationTableTypeDirective(type: IGQLType): { | ||
name: string; | ||
@@ -24,3 +24,3 @@ arguments: {}; | ||
protected shouldCreateIsEmbeddedTypeDirective(type: IGQLType): boolean; | ||
protected shouldCreateIsLinkTableTypeDirective(type: IGQLType): boolean; | ||
protected shouldCreateIsRelationTableTypeDirective(type: IGQLType): boolean; | ||
protected shouldCreateDatabaseNameTypeDirective(type: IGQLType): boolean | "" | null; | ||
@@ -27,0 +27,0 @@ protected shouldRenderIndexDirectives(type: IGQLType): boolean; |
@@ -42,4 +42,4 @@ "use strict"; | ||
}; | ||
Renderer.prototype.createIsLinkTableTypeDirective = function (type) { | ||
return { name: directives_1.DirectiveKeys.linkTable, arguments: {} }; | ||
Renderer.prototype.createIsRelationTableTypeDirective = function (type) { | ||
return { name: directives_1.DirectiveKeys.relationTable, arguments: {} }; | ||
}; | ||
@@ -102,4 +102,4 @@ Renderer.prototype.createDatabaseNameTypeDirective = function (type) { | ||
}; | ||
Renderer.prototype.shouldCreateIsLinkTableTypeDirective = function (type) { | ||
return type.isLinkTable; | ||
Renderer.prototype.shouldCreateIsRelationTableTypeDirective = function (type) { | ||
return type.isRelationTable; | ||
}; | ||
@@ -119,4 +119,4 @@ Renderer.prototype.shouldCreateDatabaseNameTypeDirective = function (type) { | ||
} | ||
if (this.shouldCreateIsLinkTableTypeDirective(type)) { | ||
typeDirectives.push(this.createIsLinkTableTypeDirective(type)); | ||
if (this.shouldCreateIsRelationTableTypeDirective(type)) { | ||
typeDirectives.push(this.createIsRelationTableTypeDirective(type)); | ||
} | ||
@@ -123,0 +123,0 @@ if (this.shouldRenderIndexDirectives(type)) { |
{ | ||
"name": "prisma-datamodel", | ||
"version": "1.33.0-alpha.1", | ||
"version": "1.33.0-alpha.2", | ||
"description": "Transform prisma datamodel SDL into graphql-js SDL", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
208887