Fix JSONSerializer for postgres
This commit is contained in:
		
							parent
							
								
									a1dc940af3
								
							
						
					
					
						commit
						94d502b71b
					
				@ -83,7 +83,8 @@ func (JSONSerializer) Scan(ctx context.Context, field *Field, dst reflect.Value,
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
// Value implements serializer interface
 | 
					// Value implements serializer interface
 | 
				
			||||||
func (JSONSerializer) Value(ctx context.Context, field *Field, dst reflect.Value, fieldValue interface{}) (interface{}, error) {
 | 
					func (JSONSerializer) Value(ctx context.Context, field *Field, dst reflect.Value, fieldValue interface{}) (interface{}, error) {
 | 
				
			||||||
	return json.Marshal(fieldValue)
 | 
						result, err := json.Marshal(fieldValue)
 | 
				
			||||||
 | 
						return string(result), err
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// CreateClausesInterface create clauses interface
 | 
					// CreateClausesInterface create clauses interface
 | 
				
			||||||
 | 
				
			|||||||
@ -35,7 +35,6 @@ func (es *EncryptedString) Scan(ctx context.Context, field *schema.Field, dst re
 | 
				
			|||||||
	return nil
 | 
						return nil
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// Value implements serializer interface
 | 
					 | 
				
			||||||
func (es EncryptedString) Value(ctx context.Context, field *schema.Field, dst reflect.Value, fieldValue interface{}) (interface{}, error) {
 | 
					func (es EncryptedString) Value(ctx context.Context, field *schema.Field, dst reflect.Value, fieldValue interface{}) (interface{}, error) {
 | 
				
			||||||
	return "hello" + string(es), nil
 | 
						return "hello" + string(es), nil
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user