Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for RawMessage (0.04 sec)

  1. logger/sql_test.go

    	"encoding/json"
    	"fmt"
    	"regexp"
    	"strings"
    	"testing"
    
    	"github.com/jinzhu/now"
    	"gorm.io/gorm/logger"
    )
    
    type JSON json.RawMessage
    
    func (j JSON) Value() (driver.Value, error) {
    	if len(j) == 0 {
    		return nil, nil
    	}
    	return json.RawMessage(j).MarshalJSON()
    }
    
    type ExampleStruct struct {
    	Name string
    	Val  string
    }
    
    func (s ExampleStruct) Value() (driver.Value, error) {
    Registered: Sun Dec 28 09:35:17 UTC 2025
    - Last Modified: Thu Mar 21 08:00:02 UTC 2024
    - 8.4K bytes
    - Viewed (0)
Back to top