• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

stephenafamo / bob
36%
main: 42%

Build:
Build:
LAST BUILD BRANCH: issue-574
DEFAULT BRANCH: main
Repo Added 01 Aug 2022 08:04AM UTC
Files 227
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

LAST BUILD ON BRANCH existing_relations
branch: existing_relations
CHANGE BRANCH
x
Reset
  • existing_relations
  • 497-match-by-regex
  • 500-unset-fields
  • ability-to-use-in-and-notin-where-mods-with-empty-values
  • add-support-for-custom-types-in-models-dir-v0.30
  • alias-starter
  • alias-warn
  • alias-where
  • antlr-visitor-improvments
  • atlas-int32
  • bind-named-args
  • bob-file-suffix
  • bobgen-psql-performance
  • bobgen-sql
  • bugfix/missing-primary-key-schema-alias
  • chores
  • codegen-driver
  • cols-in-insertq
  • column-limits
  • decimal-compare
  • deps
  • docs
  • docs-update
  • empty-in-null
  • enum-name
  • enum-symbols
  • enum-var
  • enums-in-queries
  • feat/update-to-1.24
  • feature/allow-changing-alias-of-table-ref
  • feature/allow-retrieve-alias-field-from-view
  • feature/grouped-hooks
  • feature/new-type-system-aarondl-null-and-pointers
  • feature/prepare-named-bind
  • feature/table-queries
  • feature/where-or-and
  • features/query-hooks
  • filter-marshal
  • fix-143
  • fix-443
  • fix-alias-clash
  • fix-cte-col-alias
  • fix-cte-parenthesis
  • fix-enum-types-match-by-db_type
  • fix-factory-rels
  • fix-join-using
  • fix-named-group
  • fix-not-able-to-retrieve-rows
  • fix-setter-if-relationships
  • fix-update/delete-all
  • fix/103-generated-rel-bug
  • fix/112-join-alias
  • fix/113-multi-fk
  • fix/119-many-to-many-load-bug
  • fix/better-go-version
  • fix/bytea-cmp
  • fix/coveralls
  • fix/func-as
  • fix/missing-pk-in-update
  • fix/mysql-setter-invalid-expression
  • fix/netip-import
  • fix/pgx-json-simple-protocol-
  • fixes
  • flexible-conflict-mod
  • generate-error-constants-for-unique-index
  • goland-type-inference
  • implicit-fk
  • improve-generated-join
  • in-package-types
  • inet
  • issue-574
  • join-helpers-context-remove
  • libsql-support
  • load-refactor
  • main
  • mappings-pkg
  • minor-doc-updates
  • mod-values
  • mysql-compound-query
  • mysql-file
  • mysql-fulltype
  • mysql-keyword-id
  • mysql-queries
  • mysql-querygen
  • mysql-retrieval
  • mysql-union
  • ncruces
  • nest-to-one
  • nested-factory-rels
  • nested-query
  • netip-prefix
  • nil-model-slice
  • no-factory-docs
  • non-cgo-pg-parse
  • null-index-sort
  • null-system-config
  • op
  • opt-system
  • other-lang-gen
  • patch-1
  • pgvector
  • pgx-improve
  • pgx-tx
  • pk-columns
  • plugins-galore
  • postgres-delete
  • prefix-annotation
  • preload-bug
  • psql-case-sensitive
  • psql-many-load
  • psql-select-combined-args
  • psql-update-query
  • queries
  • query-caching
  • query-gen-testing
  • query-improvements
  • random
  • randomize-test-fixes
  • refactor-table-methods
  • refs/tags/0.6.0
  • refs/tags/v0.10.0
  • refs/tags/v0.10.1
  • refs/tags/v0.11.0
  • refs/tags/v0.12.0
  • refs/tags/v0.12.1
  • refs/tags/v0.13.0
  • refs/tags/v0.14.0
  • refs/tags/v0.14.1
  • refs/tags/v0.15.0
  • refs/tags/v0.15.2
  • refs/tags/v0.15.3
  • refs/tags/v0.15.4
  • refs/tags/v0.15.5
  • refs/tags/v0.15.6
  • refs/tags/v0.16.0
  • refs/tags/v0.17.0
  • refs/tags/v0.17.1
  • refs/tags/v0.17.2
  • refs/tags/v0.17.3
  • refs/tags/v0.18.0
  • refs/tags/v0.18.1
  • refs/tags/v0.18.2
  • refs/tags/v0.19.0
  • refs/tags/v0.19.1
  • refs/tags/v0.2.0
  • refs/tags/v0.2.1
  • refs/tags/v0.2.2
  • refs/tags/v0.2.3
  • refs/tags/v0.20.0
  • refs/tags/v0.20.1
  • refs/tags/v0.20.2
  • refs/tags/v0.20.3
  • refs/tags/v0.20.4
  • refs/tags/v0.20.5
  • refs/tags/v0.20.6
  • refs/tags/v0.21.0
  • refs/tags/v0.21.1
  • refs/tags/v0.22.0
  • refs/tags/v0.23.0
  • refs/tags/v0.23.1
  • refs/tags/v0.23.2
  • refs/tags/v0.24.0
  • refs/tags/v0.25.0
  • refs/tags/v0.26.0
  • refs/tags/v0.26.1
  • refs/tags/v0.3.0
  • refs/tags/v0.3.1
  • refs/tags/v0.4.0
  • refs/tags/v0.5.1
  • refs/tags/v0.6.0
  • refs/tags/v0.6.1
  • refs/tags/v0.6.2
  • refs/tags/v0.7.1
  • refs/tags/v0.8.0
  • refs/tags/v0.8.1
  • refs/tags/v0.9.0
  • refs/tags/v0.9.1
  • related-where
  • scan-by-index
  • schema-in-preload
  • setter-insert-mod
  • sql-pattern
  • sqlite-delete
  • sqlite-insert
  • sqlite-int
  • sqlite-update
  • stdlib-null
  • subquery-parenthesis
  • template-restructure
  • testing
  • types
  • types-compare
  • uint64
  • um-set
  • uniques
  • update-docs
  • wrap-marshallable-types

07 Jul 2025 06:43PM UTC coverage: 36.474%. Remained the same
16125232731

Pull #470

github

dutow
Add a WithExisting<Rel> function to one to many relations

Currently the factory code forcefully sets a template for required
relations if one isn't specified manually, even if the using code
manually specifies IDs for foreign keys.

With optional relations, it is possible to specify existing already
persisted records by setting the ID instead of the relation in a
template. With required relations, this is impossible because of the
above.

This commit lets users to select existing entries to one to many relations
with specifying an existing record.

The commit also introduces related generic functions, for example now it
is possible to use the FromExisting<Relation> functions in the main
Factory class, and return templates that are based on existing records,
and then can be customized further.
Pull Request #470: Factories should support using existing entries for required relations

8172 of 22405 relevant lines covered (36.47%)

273.91 hits per line

Relevant lines Covered
Build:
Build:
22405 RELEVANT LINES 8172 COVERED LINES
273.91 HITS PER LINE
Source Files on existing_relations
  • Tree
  • List 214
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line

Recent builds

Builds Branch Commit Type Ran Committer Via Coverage
16125232731 existing_relations Add a WithExisting<Rel> function to one to many relations Currently the factory code forcefully sets a template for required relations if one isn't specified manually, even if the using code manually specifies IDs for foreign keys. With optional... Pull #470 08 Jul 2025 09:19AM UTC dutow github
36.47
16059707149 existing_relations Add a WithExisting<Rel> function to one to many relations Currently the factory code forcefully sets a template for required relations if one isn't specified manually, even if the using code manually specifies IDs for foreign keys. With optional... Pull #470 06 Jul 2025 06:04PM UTC dutow github
36.47
16011675150 existing_relations Factories should support using existing entries for required relations Currently the factory code forcefully sets a template for required relations if one isn't specified manually, even if the using code manually specifies IDs for foreign keys. ... Pull #470 02 Jul 2025 06:55AM UTC dutow github
36.47
See All Builds (952)
  • Repo on GitHub
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc