func writeToCloudSQL()

in analytics/server.go [218:228]


func writeToCloudSQL(app *app, c Cluster) error {
	sqlInsert := "INSERT INTO CLUSTERS3(ClusterId, CreateId, Version, GitCommit, Timestamp, OS, TerraformState, Region, EnableWorkloadIdentity, EnablePreemptibleNodepool, DefaultNodepoolOS, PrivateEndpoint, EnableConfigSync, EnablePolicyController, AnthosServiceMesh, MultiClusterGateway, VPCType, ClusterIndex, ClusterNumNodes, ClusterMachineType, ClusterRegion, ClusterZone) VALUES($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19, $20, $21, $22)"

	_, err := app.db.Exec(sqlInsert, c.ClusterId, c.CreateId, c.Version, c.GitCommit, c.Timestamp, c.OS, c.TerraformState, c.Region, c.EnableWorkloadIdentity, c.EnablePreemptibleNodepool, c.DefaultNodepoolOS, c.PrivateEndpoint, c.EnableConfigSync, c.EnablePolicyController, c.AnthosServiceMesh, c.MultiClusterGateway, c.VPCType, c.ClusterIndex, c.ClusterNumNodes, c.ClusterMachineType, c.ClusterRegion, c.ClusterZone)

	if err != nil {
		return fmt.Errorf("Error on Cloud SQL Insert: %v", err)
	}

	return nil
}