bytedance / bytedance/rdbStore
ObservedV2 中 Trace 装饰的属性使用了@Columns无效
- Dominant language
- TypeScript
- Stars
- 74
- Forks
- 17
- PR merge metrics
- No merged PRs in 30d
Description
在@ObservedV2装饰的类中的@Trace数据不能被列检测到。
例如:
`@ObservedV2
@Entity({
tableName: ConversationModel.tabName,
index: [{
name: "ai_conversation_conversation", columnName: ["conversation_id", "tittle"]
}]
})
export class ConversationModel {
static tabName: string = "ai_conversation"
@Trace
@Columns({ name: "tittle", type: ColumnType.TEXT })
tittle: string = ""
@Columns({ name: "last_message_time", type: ColumnType.INTEGER })
lastMessageTime: number = 0
@Columns({ name: "create_time", type: ColumnType.INTEGER })
createTime: number = 0
}`
建表时tittle没有被包含在内,在modelToValuesBucket中也没有解析到tittle。
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the @ObservedV2, @Trace, and @Columns decorator handling, then trace how modelToValuesBucket and table creation discover model properties. Reproduce the ConversationModel example and compare the traced tittle field with the untraced fields. Done means tittle is included in the table definition and parsed by modelToValuesBucket.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- databases
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100