File tree Expand file tree Collapse file tree 6 files changed +9
-9
lines changed
Expand file tree Collapse file tree 6 files changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -73,11 +73,11 @@ export interface HydratedBucketSource {
7373 */
7474export interface BucketDataSource {
7575 /**
76- * Bucket prefix if no transformations are defined .
76+ * Unique name of the data source within a sync rules version .
7777 *
78- * Transformations may use this as a base, or may generate an entirely different prefix .
78+ * This may be used as the basis for bucketPrefix (or it could be ignored) .
7979 */
80- readonly defaultBucketPrefix : string ;
80+ readonly uniqueName : string ;
8181
8282 /**
8383 * For debug use only.
Original file line number Diff line number Diff line change @@ -40,7 +40,7 @@ export interface HydrationState<
4040export const DEFAULT_HYDRATION_STATE : HydrationState = {
4141 getBucketSourceScope ( source : BucketDataSource ) {
4242 return {
43- bucketPrefix : source . defaultBucketPrefix
43+ bucketPrefix : source . uniqueName
4444 } ;
4545 } ,
4646 getParameterLookupScope ( source ) {
@@ -64,7 +64,7 @@ export function versionedHydrationState(version: number): HydrationState {
6464 return {
6565 getBucketSourceScope ( source : BucketDataSource ) : BucketDataScope {
6666 return {
67- bucketPrefix : `${ version } #${ source . defaultBucketPrefix } `
67+ bucketPrefix : `${ version } #${ source . uniqueName } `
6868 } ;
6969 } ,
7070
Original file line number Diff line number Diff line change @@ -146,7 +146,7 @@ export class BucketDefinitionDataSource implements BucketDataSource {
146146 return this . descriptor . bucketParameters ;
147147 }
148148
149- public get defaultBucketPrefix ( ) : string {
149+ public get uniqueName ( ) : string {
150150 return this . descriptor . name ;
151151 }
152152
Original file line number Diff line number Diff line change @@ -75,7 +75,7 @@ export class SyncStreamDataSource implements BucketDataSource {
7575 return [ ] ;
7676 }
7777
78- public get defaultBucketPrefix ( ) : string {
78+ public get uniqueName ( ) : string {
7979 return this . variant . defaultBucketPrefix ( this . stream . name ) ;
8080 }
8181
Original file line number Diff line number Diff line change @@ -890,7 +890,7 @@ WHERE
890890
891891 const hydrationState : HydrationState = {
892892 getBucketSourceScope ( source ) {
893- return { bucketPrefix : `${ source . defaultBucketPrefix } .test` } ;
893+ return { bucketPrefix : `${ source . uniqueName } .test` } ;
894894 } ,
895895 getParameterLookupScope ( source ) {
896896 return {
Original file line number Diff line number Diff line change @@ -91,7 +91,7 @@ export function identityBucketTransformer(id: string) {
9191 * Empty data source that can be used for testing parameter queries, where most of the functionality here is not used.
9292 */
9393export const EMPTY_DATA_SOURCE : BucketDataSource = {
94- defaultBucketPrefix : 'mybucket' ,
94+ uniqueName : 'mybucket' ,
9595 bucketParameters : [ ] ,
9696 // These are not used in the tests.
9797 getSourceTables : function ( ) : Set < TablePattern > {
You can’t perform that action at this time.
0 commit comments