ts-repository-fluent
Advanced tools
Comparing version 0.1.1 to 0.1.2
@@ -93,2 +93,2 @@ 'use strict'; | ||
exports.BaseRepository = BaseRepository; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiQmFzZVJlcG9zaXRvcnkuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zb3VyY2UvQmFzZVJlcG9zaXRvcnkudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsWUFBWSxDQUFBOztBQUVaLCtDQUE0QztBQUk1Qzs7R0FFRztBQUNILE1BQXNCLGNBQWM7SUFLaEMsWUFBWSxTQUF5QjtRQUVqQyxJQUFJLENBQUMsU0FBUyxHQUFHLFNBQVMsQ0FBQztRQUMzQixJQUFJLENBQUMsYUFBYSxHQUFHLElBQUksQ0FBQyxTQUFTLENBQUMsSUFBSSxDQUFDO0lBQzdDLENBQUM7SUFFRCxZQUFZO1FBRVIseUNBQXlDO1FBQ3pDLE9BQU8sSUFBSSxJQUFJLENBQUMsU0FBUyxFQUFFLENBQUM7SUFDaEMsQ0FBQztJQUVELGlCQUFpQjtRQUViLE9BQVUsRUFBRSxDQUFDO0lBQ2pCLENBQUM7SUFFRDs7TUFFRTtJQUNGLFdBQVcsQ0FBQyxVQUFtQjtRQUUzQixPQUFPLElBQUksQ0FBQyxZQUFZLEdBQUcsR0FBRyxHQUFHLFVBQVUsQ0FBQztJQUNoRCxDQUFDO0lBQ0Q7O01BRUU7SUFDRixRQUFRLENBQUMsVUFBa0I7UUFFdkIsT0FBTyxDQUFDLENBQUUsVUFBc0IsQ0FBQztJQUNyQyxDQUFDO0lBRUQsSUFBSSxZQUFZO1FBRVosT0FBTyxJQUFJLENBQUMsYUFBYSxDQUFDO0lBQzlCLENBQUM7SUFDRCxJQUFJLGlCQUFpQjtRQUVqQixPQUFPLElBQUksR0FBRyxJQUFJLENBQUMsYUFBYSxDQUFDO0lBQ3JDLENBQUM7SUFDRC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f('(') < 0 && pFullFieldName.indexOf('.') < 0) { | ||
//if not an aggregate or qualified reference, then make it so | ||
this._QueryData.SelectFields.push(`${this._Repository.dataTypeName}.${pFullFieldName}`); | ||
this._QueryData.SelectFields.push([`${this._Repository.dataTypeName}.${pFullFieldName}`, pAlias]); | ||
} | ||
else { | ||
this._QueryData.SelectFields.push(pFullFieldName); | ||
this._QueryData.SelectFields.push([pFullFieldName, pAlias]); | ||
} | ||
@@ -69,6 +69,6 @@ return this; | ||
/** Add field to select clause in this query (type-safe) | ||
* @method | ||
*/ | ||
selectOn(pRemoteTable, pRemoteField) { | ||
return this.select(`${pRemoteTable.name}.${pRemoteField}`); | ||
* @method | ||
*/ | ||
selectOn(pRemoteTable, pRemoteField, pAlias) { | ||
return this.select(`${pRemoteTable.name}.${pRemoteField}`, pAlias); | ||
} | ||
@@ -215,2 +215,2 @@ joinOn(pRemoteTable, pFrom, pSourceTableOrTo, pTo, pJoinType) { | ||
exports.SimpleQuery = SimpleQuery; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiU2ltcGxlUXVlcnkuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zb3VyY2UvU2ltcGxlUXVlcnkudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsWUFBWSxDQUFBOztBQUtaLE1BQWEsZUFBZTtJQUE1QjtRQUVJLFlBQU8sR0FBRyxFQUFFLENBQUM7UUFDYixpQkFBWSxHQUFHLEVBQUUsQ0FBQztRQUNsQixVQUFLLEdBQWdCLEVBQUUsQ0FBQztRQUN4QixlQUFVLEdBQUcsRUFBRSxDQUFDO1FBQ2hCLFFBQUcsR0FBVyxLQUFLLENBQUM7UUFDcEIsVUFBSyxHQUFXLENBQUMsQ0FBQztJQUN0QixDQUFDO0NBQUE7QUFSRCwwQ0FRQztBQUVELE1BQWEsV0FBVztJQU9wQixZQUFZLFdBQTJCLEVBQUUsZUFBb0I7UUF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ztZQUNyQixLQUFLLEVBQUUsTUFBTTtZQUNiLFNBQVMsRUFBRSxZQUFZO1lBQ3ZCLFNBQVMsRUFBRSxZQUFZO1NBQzFCLENBQUMsQ0FBQztJQUNQLENBQUM7Q0FDSjtBQWxSRCxrQ0FrUkMifQ== |
{ | ||
"name": "ts-repository-fluent", | ||
"version": "0.1.1", | ||
"version": "0.1.2", | ||
"description": "A basic data repository framework for Typescript. Includes a fluent-style query interface.", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -77,3 +77,3 @@ 'use strict' | ||
*/ | ||
select(pFullFieldName: string): SimpleQuery<T> | ||
select(pFullFieldName: string, pAlias?: string): SimpleQuery<T> | ||
{ | ||
@@ -83,7 +83,7 @@ if (pFullFieldName.indexOf('(')<0 && pFullFieldName.indexOf('.')<0) | ||
//if not an aggregate or qualified reference, then make it so | ||
this._QueryData.SelectFields.push(`${this._Repository.dataTypeName}.${pFullFieldName}`); | ||
this._QueryData.SelectFields.push([`${this._Repository.dataTypeName}.${pFullFieldName}`, pAlias]); | ||
} | ||
else | ||
{ | ||
this._QueryData.SelectFields.push(pFullFieldName); | ||
this._QueryData.SelectFields.push([pFullFieldName, pAlias]); | ||
} | ||
@@ -94,7 +94,7 @@ return this; | ||
/** Add field to select clause in this query (type-safe) | ||
* @method | ||
*/ | ||
selectOn<ORM>(pRemoteTable: constructor<ORM>, pRemoteField: keyof ORM): SimpleQuery<T> | ||
* @method | ||
*/ | ||
selectOn<ORM>(pRemoteTable: constructor<ORM>, pRemoteField: keyof ORM, pAlias?: string): SimpleQuery<T> | ||
{ | ||
return this.select(`${pRemoteTable.name}.${pRemoteField}`); | ||
return this.select(`${pRemoteTable.name}.${pRemoteField}`, pAlias); | ||
} | ||
@@ -101,0 +101,0 @@ |
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
40563