chore(8.0): final pre-RC1 sweep — API consistency, named errors, orphans, zero-cast codebase
This commit is contained in:
parent
970e08c466
commit
1f7e365a4e
237 changed files with 1951 additions and 49413 deletions
|
|
@ -193,21 +193,21 @@ console.log('✅ Created relationships')
|
|||
console.log('\n🔍 Querying relationships...')
|
||||
|
||||
// Who works for TechCorp?
|
||||
const techcorpEmployees = await brain.getRelations({
|
||||
const techcorpEmployees = await brain.related({
|
||||
to: techcorpId,
|
||||
type: VerbType.WorksWith
|
||||
})
|
||||
console.log(`TechCorp has ${techcorpEmployees.length} employees`)
|
||||
|
||||
// Who works on the AI project?
|
||||
const projectContributors = await brain.getRelations({
|
||||
const projectContributors = await brain.related({
|
||||
to: projectId,
|
||||
type: [VerbType.WorksOn, VerbType.Manages]
|
||||
})
|
||||
console.log(`AI Project has ${projectContributors.length} contributors`)
|
||||
|
||||
// Who does John collaborate with?
|
||||
const johnsCollaborators = await brain.getRelations({
|
||||
const johnsCollaborators = await brain.related({
|
||||
from: johnId,
|
||||
type: VerbType.CollaboratesWith
|
||||
})
|
||||
|
|
@ -294,7 +294,7 @@ await brain.update({
|
|||
1. Create an organizational hierarchy (CEO → Managers → Engineers)
|
||||
2. Build a project dependency graph
|
||||
3. Model a social network with CollaboratesWith relationships
|
||||
4. Query "Who reports to Alice?" using getRelations()
|
||||
4. Query "Who reports to Alice?" using related()
|
||||
5. Batch update all projects to add a "year: 2024" field
|
||||
|
||||
### Next Steps
|
||||
|
|
@ -676,7 +676,7 @@ if (readmeEntity.length > 0) {
|
|||
}
|
||||
|
||||
// Query relationships
|
||||
const conceptDocs = await brain.getRelations({
|
||||
const conceptDocs = await brain.related({
|
||||
from: conceptId,
|
||||
type: VerbType.DocumentedBy
|
||||
})
|
||||
|
|
@ -798,7 +798,7 @@ await brain.relate({
|
|||
})
|
||||
|
||||
// Query across boundaries
|
||||
const conceptDocs = await brain.getRelations({
|
||||
const conceptDocs = await brain.related({
|
||||
from: conceptId,
|
||||
type: VerbType.DocumentedBy
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue