Skip to content

Latest commit

 

History

History
22 lines (17 loc) · 341 Bytes

uuid.md

File metadata and controls

22 lines (17 loc) · 341 Bytes

Universally unique identifiers (UUIDs)

CREATE TABLE records (
  id   uuid PRIMARY KEY
);

The Go standard library does not come with a uuid package. For UUID support, sqlc uses the excellent github.com/google/uuid package.

package db

import (
	"github.com/google/uuid"
)

type Author struct {
	ID   uuid.UUID
}