Compare commits

...

2 Commits

Author SHA1 Message Date
030343bc01 feat: 修改包名 2024-09-14 16:02:22 +08:00
b169659e02 fix: 修复 go mod 模块名 2024-09-14 15:43:43 +08:00
8 changed files with 12 additions and 13 deletions

2
go.mod
View File

@ -1,3 +1,3 @@
module manabox.cn/tdengine-mapper
module codeup.manabox.cn/public/tdengine-mapper-go
go 1.18

View File

@ -1,4 +1,4 @@
package td_builder
package tdmap
import (
"database/sql"

View File

@ -1,13 +1,12 @@
package td_builder
package tdmap
import (
"fmt"
"manabox.cn/tdengine-mapper/syncmap"
"reflect"
"strings"
)
func NewTdMapping() *TdMapping {
func NewMapping() *TdMapping {
return &TdMapping{}
}
@ -17,7 +16,7 @@ type TableNamer interface {
}
type TdMapping struct {
modelMates syncmap.Map[string, *StructMate]
modelMates Map[string, *StructMate]
}
func (b *TdMapping) scanStruct(data ...any) error {

View File

@ -1,4 +1,4 @@
package td_builder
package tdmap
import (
"database/sql"
@ -49,7 +49,7 @@ func (s *TaosUser) TableName() string {
}
func TestBuilderInsert(t *testing.T) {
tdMapping := NewTdMapping()
tdMapping := NewMapping()
p := 1
data := []any{
&TaosDevice{
@ -113,7 +113,7 @@ func (u *User) SuperTableName() string {
}
func TestSimpleInsert(t *testing.T) {
tdMapping := NewTdMapping()
tdMapping := NewMapping()
data := []any{
&User{Name: "张三", Age: 18},
&User{Name: "李四", Age: 20},

View File

@ -1,4 +1,4 @@
package td_builder
package tdmap
import (
"fmt"

View File

@ -1,4 +1,4 @@
package syncmap
package tdmap
import (
"sync"

View File

@ -1,4 +1,4 @@
package syncmap
package tdmap
import (
"log"

View File

@ -1,4 +1,4 @@
package td_builder
package tdmap
type TableRowMateria struct {
SuperTableName string