feat: Introduce AI Brand Monitoring System V5 technical design document
- Added comprehensive technical design document for AI Brand Monitoring System V5, outlining system architecture, data models, sampling strategies, and monitoring protocols. - Key changes include a shift to a sampling-based trend monitoring approach, updated data collection and storage strategies, and new metrics for performance evaluation. - Implemented migration scripts to support the flattening of brand questions and versioning of question texts, ensuring historical data integrity and version control.
This commit is contained in:
@@ -20,6 +20,22 @@ func nullableText(value pgtype.Text) *string {
|
||||
return &text
|
||||
}
|
||||
|
||||
func nullableAnyText(value interface{}) *string {
|
||||
switch typed := value.(type) {
|
||||
case nil:
|
||||
return nil
|
||||
case string:
|
||||
return &typed
|
||||
case []byte:
|
||||
text := string(typed)
|
||||
return &text
|
||||
case pgtype.Text:
|
||||
return nullableText(typed)
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
func nullableInt64(value pgtype.Int8) *int64 {
|
||||
if !value.Valid {
|
||||
return nil
|
||||
|
||||
Reference in New Issue
Block a user