...

Source file src/edge-infra.dev/test/f2/x/postgres/options.go

Documentation: edge-infra.dev/test/f2/x/postgres

     1  package postgres
     2  
     3  type options struct {
     4  	applySeedModel      bool
     5  	skipSchemaIsolation bool
     6  }
     7  type Option func(*options)
     8  
     9  // ApplySeedModel should be passed in order to apply edgesql migrations to database
    10  func ApplySeedModel() Option {
    11  	return func(o *options) {
    12  		o.applySeedModel = true
    13  	}
    14  }
    15  
    16  // SkipSchemaIsolution should be passed if you don't want the framework to create isolated schemas for
    17  // every test
    18  func SkipSchemaIsolation() Option {
    19  	return func(o *options) {
    20  		o.skipSchemaIsolation = true
    21  	}
    22  }
    23  func makeOptions(opts ...Option) *options {
    24  	options := &options{}
    25  	for _, o := range opts {
    26  		o(options)
    27  	}
    28  	return options
    29  }
    30  

View as plain text