Skip to content

Instantly share code, notes, and snippets.

View gbih's full-sized avatar
🏠
Working from home

George Baptista gbih

🏠
Working from home
View GitHub Profile
.
├── books
│   ├── handlers.go
│   └── models.go
├── config
│   └── db.go
└── main.go
@alexedwards
alexedwards / gist:dc3145c8e2e6d2fd6cd9
Last active May 28, 2024 20:35
Example of working with Go's database/sql and NULL fields
CREATE TABLE books (
isbn char(14) NOT NULL,
title varchar(255),
author varchar(255),
price decimal(5,2)
);
INSERT INTO books (isbn, title, author, price) VALUES
('978-1503261969', 'Emma', 'Jayne Austen', 9.44),
('978-1514274873', 'Journal of a Soldier', NULL, 5.49),