從零開始 - 學習Go語言(Golang)與 MS SQL Server,資源彙整

 

Golang原廠、官方網站

https://golang.org/

 

下載與安裝 (MS Windows / Apple OS X / Linux)

https://golang.org/dl/

 

....................................................................................................

Golang 與 MS SQL Server

各種資料庫的 Go驅動程式  https://github.com/golang/go/wiki/SQLDrivers

 

https://github.com/golang/go/wiki/SQLDrivers

MS ADODB:    https://github.com/mattn/go-adodb

MS SQL Server (pure go):    https://github.com/denisenkom/go-mssqldb

MS SQL Server (uses cgo):    https://github.com/minus5/gofreetds

 

....................................................................................................

Golang 連結 MS SQL Server(簡體中文)

http://blog.csdn.net/codyguo/article/details/51014450   (原文出處)

http://studygolang.com/articles/6549  (備份)

 

....................................................................................................

SQL指令 與 參數(避免SQL Injection 資料隱碼攻擊)

https://github.com/denisenkom/go-mssqldb

 

db.QueryContext(ctx, `select * from t where ID = @ID;`, sql.Named("ID", 6))

 

db.Query("SELECT * FROM t WHERE a = ?3, b = ?2, c = ?1", "x", "y", "z")

?3表示第三個參數的值,所以是「z」

執行成果   SELECT * FROM t WHERE a = 'z', b = 'y', c = 'x'

 

....................................................................................................

入門文章與其他:

 

初學 Golang 30 天  (2014年的文章)

http://ithelp.ithome.com.tw/users/20079210/ironman/721

 

Golang - 實作 ORM 與 Form 綁定,自動新增、更新資料庫內容

http://blog.cgmlife.net/posts/2015/03/24/golang-orm-update-database-automatically-through-form-value

arrow
arrow

    MIS2000 Lab 發表在 痞客邦 留言(0) 人氣()