How to execute an INSERT query using sqlx for a data which has embedded struct?

This page summarizes the projects mentioned and recommended in the original post on /r/golang

Our great sponsors
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • SaaSHub - Software Alternatives and Reviews
  • sqlx

    general purpose extensions to golang's database/sql

  • Say we want to insert the following data using INSERT query to a mysql database - say SampleDatabase (using sqlx - https://github.com/jmoiron/sqlx) type Sample struct { A int64 B string Data interface{} } Data can be type C struct{} or type D struct{} or nil type C struct{} and type D struct{} have fields defined within them like type C struct{ E int64 F string }

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts