This repo is a helper tool for sqlc.
SELECT DISTINCT COLUMN_NAME, COLUMN_TYPE FROM information_schema.`COLUMNS` WHERE TABLE_NAME = 'activity' AND
TABLE_SCHEMA = 'answer';
SELECT DISTINCT COLUMN_NAME, COLUMN_TYPE FROM information_schema.`COLUMNS` WHERE TABLE_NAME = ? AND TABLE_SCHEMA = ?;
SELECT DISTINCT "column_name", data_type FROM information_schema.COLUMNS WHERE table_schema = 'public' AND "
table_name" = 'Post';
SELECT DISTINCT "column_name", data_type FROM information_schema.COLUMNS WHERE table_schema = 'public' AND "
table_name" = ?;
PRAGMA table_info('Todo');
PRAGMA table_info(?);
PRAGMA table_info(downloaded_image);
auto_increment
SELECT COLUMN_NAME
FROM INFORMATION_SCHEMA.COLUMNS
WHERE TABLE_SCHEMA = 'answer'
AND TABLE_NAME = 'activity'
AND EXTRA = 'auto_increment';
primary key
SELECT COLUMN_NAME
FROM INFORMATION_SCHEMA.KEY_COLUMN_USAGE
WHERE TABLE_SCHEMA = 'answer'
AND TABLE_NAME = 'activity'
AND CONSTRAINT_NAME = 'PRIMARY';
auto_increment
SELECT column_name, is_identity, column_default
FROM information_schema.columns
WHERE table_schema = 'public'
AND table_name = 'Post' AND column_default LIKE 'nextval(%';