Compare commits

...

2 Commits

Author SHA1 Message Date
warkanum 784dc1f0da chore(release): update package version to 1.0.63
Release / test (push) Successful in 52s
Release / release (push) Successful in 1m45s
Release / pkg-aur (push) Successful in 1m1s
Release / pkg-deb (push) Successful in 2m48s
Release / pkg-rpm (push) Successful in 2m49s
2026-07-18 22:41:30 +02:00
warkanum 7d93bee4bd chore: Fixed linitng issues 2026-07-18 22:41:23 +02:00
4 changed files with 7 additions and 8 deletions
+1 -1
View File
@@ -393,7 +393,7 @@ func writeDatabase(db *models.Database, dbType, outputPath, packageName, schemaF
writerOpts := newWriterOptions(outputPath, packageName, flattenSchema, nullableTypes, continueOnError) writerOpts := newWriterOptions(outputPath, packageName, flattenSchema, nullableTypes, continueOnError)
if extraFields != "" { if extraFields != "" {
if strings.ToLower(dbType) != "bun" { if !strings.EqualFold(dbType, "bun") {
return fmt.Errorf("--extra-fields is only supported for Bun output") return fmt.Errorf("--extra-fields is only supported for Bun output")
} }
extraFieldsJSON, err := os.ReadFile(extraFields) extraFieldsJSON, err := os.ReadFile(extraFields)
+1 -1
View File
@@ -1,6 +1,6 @@
# Maintainer: Hein (Warky Devs) <hein@warky.dev> # Maintainer: Hein (Warky Devs) <hein@warky.dev>
pkgname=relspec pkgname=relspec
pkgver=1.0.62 pkgver=1.0.63
pkgrel=1 pkgrel=1
pkgdesc="RelSpec is a comprehensive database relations management tool that reads, transforms, and writes database table specifications across multiple formats and ORMs." pkgdesc="RelSpec is a comprehensive database relations management tool that reads, transforms, and writes database table specifications across multiple formats and ORMs."
arch=('x86_64' 'aarch64') arch=('x86_64' 'aarch64')
+1 -1
View File
@@ -1,5 +1,5 @@
Name: relspec Name: relspec
Version: 1.0.62 Version: 1.0.63
Release: 1%{?dist} Release: 1%{?dist}
Summary: RelSpec is a comprehensive database relations management tool that reads, transforms, and writes database table specifications across multiple formats and ORMs. Summary: RelSpec is a comprehensive database relations management tool that reads, transforms, and writes database table specifications across multiple formats and ORMs.
+4 -5
View File
@@ -29,15 +29,14 @@ const pgCastMarker = "\x00PGCAST\x00"
// A placeholder that appears more than once maps to the same $N. An unknown // A placeholder that appears more than once maps to the same $N. An unknown
// placeholder (not built-in and not in staticParams) returns an error. // placeholder (not built-in and not in staticParams) returns an error.
// PostgreSQL cast syntax (::type) is left untouched. // PostgreSQL cast syntax (::type) is left untouched.
func BuildQuery(call string, fileBytes []byte, filename string, staticParams map[string]string) (string, []any, error) { func BuildQuery(call string, fileBytes []byte, filename string, staticParams map[string]string) (query string, args []any, err error) {
// Protect :: casts before running the placeholder regex. // Protect :: casts before running the placeholder regex.
protected := strings.ReplaceAll(call, "::", pgCastMarker) protected := strings.ReplaceAll(call, "::", pgCastMarker)
paramIndex := map[string]int{} // name → 1-based position paramIndex := map[string]int{} // name → 1-based position
var args []any
var firstErr error var firstErr error
result := namedPlaceholder.ReplaceAllStringFunc(protected, func(match string) string { query = namedPlaceholder.ReplaceAllStringFunc(protected, func(match string) string {
if firstErr != nil { if firstErr != nil {
return match return match
} }
@@ -78,9 +77,9 @@ func BuildQuery(call string, fileBytes []byte, filename string, staticParams map
} }
// Restore :: casts. // Restore :: casts.
result = strings.ReplaceAll(result, pgCastMarker, "::") query = strings.ReplaceAll(query, pgCastMarker, "::")
return result, args, nil return query, args, nil
} }
// ExecuteItem reads the asset file referenced by item.Entry.File (which is the // ExecuteItem reads the asset file referenced by item.Entry.File (which is the