github.com/iEvan-lhr/exciting-tool@v0.0.0-20230504054234-8e983f73cdd2/sql.go (about)

     1  package tools
     2  
     3  const sli = '_'
     4  
     5  // Save 根据参数组装insert语句
     6  func Save(model any) (result []*String) {
     7  	result = marshalStruct(model)
     8  	return
     9  }
    10  
    11  // Query 根据参数组装sql查询语句
    12  func Query(model any) string {
    13  	s := String{}
    14  	s.queryStruct(model)
    15  	return s.string()
    16  }
    17  
    18  func Update(model any) {
    19  
    20  }
    21  
    22  func Check(model any) string {
    23  	s := String{}
    24  	s.checkStruct(model)
    25  	return s.string()
    26  }
    27  
    28  func Create(model any) {
    29  
    30  }