MCPcopy
hub / github.com/redwoodjs/graphql / findBy

Method findBy

packages/record/src/redwoodrecord/Core.js:79–86  ·  view source on GitHub ↗
(attributes, options = {})

Source from the content-addressed store, hash-verified

77 // Returns the first record matching the given `where`, otherwise first in the
78 // whole table (whatever the DB determines is the first record)
79 static async findBy(attributes, options = {}) {
80 const record = await this.accessor.findFirst({
81 where: attributes,
82 ...options,
83 })
84
85 return record ? await this.build(record) : null
86 }
87
88 // Alias for findBy
89 static async first(...args) {

Callers 4

findMethod · 0.95
firstMethod · 0.95
Core.test.jsFile · 0.45

Calls 2

buildMethod · 0.95
findFirstMethod · 0.45

Tested by

no test coverage detected