Compare commits
3 commits
Author | SHA1 | Date | |
---|---|---|---|
8dede5fad6 | |||
db6b019b5d | |||
20360fc412 |
3 changed files with 28 additions and 4 deletions
24
.forgejo/workflows/docs.yaml
Normal file
24
.forgejo/workflows/docs.yaml
Normal file
|
@ -0,0 +1,24 @@
|
|||
on:
|
||||
push:
|
||||
tags:
|
||||
- "*"
|
||||
jobs:
|
||||
build_docs:
|
||||
runs-on: docker
|
||||
container:
|
||||
image: docker.zeptotech.net/zeptotech/zig-yarn:1.1.0
|
||||
credentials:
|
||||
username: ${{ vars.DOCKER_REGISTRY_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_REGISTRY_PASSWORD }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- run: mkdir -p artifact/api
|
||||
- run: (cd docs && corepack enable && yarn install)
|
||||
- run: (cd docs && yarn docs:build)
|
||||
- run: mv docs/.vitepress/dist/* artifact
|
||||
- run: /zig/zig build docs
|
||||
- run: mv zig-out/docs/* artifact/api
|
||||
- uses: https://code.forgejo.org/forgejo/upload-artifact@v4
|
||||
with:
|
||||
name: docs.zip
|
||||
path: artifact
|
|
@ -196,14 +196,14 @@ pub fn RepositoryInsert(comptime Model: type, comptime TableShape: type, comptim
|
|||
}
|
||||
|
||||
/// Set selected columns for RETURNING clause.
|
||||
pub fn returningColumns(self: *Self, _select: []const []const u8) void {
|
||||
pub fn returningColumns(self: *Self, _select: []const []const u8) !void {
|
||||
if (_select.len == 0) {
|
||||
return ZrmError.AtLeastOneSelectionRequired;
|
||||
}
|
||||
|
||||
self.returning(.{
|
||||
// Join selected columns.
|
||||
.sql = std.mem.join(self.arena.allocator(), ", ", _select),
|
||||
.sql = try std.mem.join(self.arena.allocator(), ", ", _select),
|
||||
.params = &[_]_sql.RawQueryParameter{}, // No parameters.
|
||||
});
|
||||
}
|
||||
|
|
|
@ -153,14 +153,14 @@ pub fn RepositoryUpdate(comptime Model: type, comptime TableShape: type, comptim
|
|||
}
|
||||
|
||||
/// Set selected columns for RETURNING clause.
|
||||
pub fn returningColumns(self: *Self, _select: []const []const u8) void {
|
||||
pub fn returningColumns(self: *Self, _select: []const []const u8) !void {
|
||||
if (_select.len == 0) {
|
||||
return ZrmError.AtLeastOneSelectionRequired;
|
||||
}
|
||||
|
||||
self.returning(.{
|
||||
// Join selected columns.
|
||||
.sql = std.mem.join(self.arena.allocator(), ", ", _select),
|
||||
.sql = try std.mem.join(self.arena.allocator(), ", ", _select),
|
||||
.params = &[_]_sql.RawQueryParameter{}, // No parameters.
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue