From 466065d6d3d3a212a41dd453a58cdaf4fbab9c03 Mon Sep 17 00:00:00 2001 From: syumai Date: Sun, 26 Feb 2023 17:38:38 +0900 Subject: [PATCH] fix last_row_id key name --- cloudflare/d1/result.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cloudflare/d1/result.go b/cloudflare/d1/result.go index 5c1edfb..00fb84c 100644 --- a/cloudflare/d1/result.go +++ b/cloudflare/d1/result.go @@ -17,7 +17,7 @@ var ( // LastInsertId returns id of result's last row. // If lastRowId can't be retrieved, this method returns error. func (r *result) LastInsertId() (int64, error) { - v := r.resultObj.Get("meta").Get("lastRowId") + v := r.resultObj.Get("meta").Get("last_row_id") if v.IsNull() || v.IsUndefined() { return 0, errors.New("d1: lastRowId cannot be retrieved") }