Comments (2)
@sybrenstuvel in your case sqlc does not like seeing the ""
double quotes. Try this workaround:
CREATE TABLE tasks(
id integer,
created_at datetime,
updated_at datetime,
uuid char(36) UNIQUE DEFAULT '',
name varchar(64) DEFAULT '',
type varchar(32) DEFAULT '',
job_id integer DEFAULT 0,
priority smallint DEFAULT 50,
status varchar(16) DEFAULT '',
worker_id integer,
last_touched_at datetime,
commands jsonb,
activity varchar(255) DEFAULT '',
PRIMARY KEY(id)
);
-- name: GetTask :one
SELECT * FROM tasks
WHERE uuid = ? LIMIT 1;
It requires some work to clean up your schema, but you will have your codes generated.
from sqlc.
Thanks, this helps!
from sqlc.
Related Issues (20)
- Fails if structure is mysqldump containing rocksdb_has_p_s_session_variables
- Missing columns not being detected
- Error "not enough args to execute query" on complex select query.
- Does it support logging of executed SQL? HOT 1
- Generate in-memory mocked implementation of the Querier interface HOT 2
- Renaming a materialized view causes `sqlc generate` to fail
- sql\queries\users.sql:1:1: relation "users" does not exist HOT 2
- NULL JSON field fails to Scan into json.RawMessage
- Views models do not get updated when base tables are altered HOT 1
- sqlite ALTER TABLE ADD COLUMN without type name panics HOT 2
- wrong type for params in tuple
- COALESCE doesn't appear to work within a CTE
- SQLite: interface{} instead of time.Time for json extracted queries
- Multiple schemas support
- varchar2 support HOT 1
- copyfrom not respecting `query_parameter_limit`
- Add Ruby support
- Problem with selecting from functions
- How to generate schema automatically from database linked in URL?
- Support joins one to many (is the project still active?)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sqlc.