Skip to content

Commit 8d38116

Browse files
committed
0.1.5: Fixups after migration to Ladybug
1 parent f71b5e9 commit 8d38116

8 files changed

Lines changed: 4805 additions & 7331 deletions

File tree

typescript/examples/basic-usage-working.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ async function queryExample() {
136136
// Get a specific book by ID
137137
const book = await client.getObjectById('book-1', 'Book');
138138
if (book) {
139-
console.log('Found book:', book.properties.title);
139+
console.log('Found book:', book.properties['title']);
140140
}
141141

142142
// Find all books

typescript/examples/basic-usage.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ async function queryExample() {
145145
// Get a specific book by ID
146146
const book = await client.getObjectById('book-1', 'Book');
147147
if (book) {
148-
console.log('Found book:', book.properties.title);
148+
console.log('Found book:', book.properties['title']);
149149
}
150150

151151
// Find all books

typescript/examples/data-operations.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,12 @@ async function basicCrudExample() {
4444
},
4545
});
4646

47-
console.log('✅ Created person:', person.properties.name);
47+
console.log('✅ Created person:', person.properties['name']);
4848

4949
// Read the person (Read)
5050
const retrievedPerson = await client.getObjectById('person-1', 'Person');
5151
if (retrievedPerson) {
52-
console.log('✅ Retrieved person:', retrievedPerson.properties.name);
52+
console.log('✅ Retrieved person:', retrievedPerson.properties['name']);
5353
}
5454

5555
// Update the person (Update)
@@ -65,7 +65,7 @@ async function basicCrudExample() {
6565
},
6666
});
6767

68-
console.log('✅ Updated person age to:', updatedPerson.properties.age);
68+
console.log('✅ Updated person age to:', updatedPerson.properties['age']);
6969

7070
// Delete the person (Delete)
7171
const deleted = await client.deleteObject('person-1', 'Person');
@@ -219,7 +219,7 @@ async function basicRelationsExample() {
219219
},
220220
});
221221

222-
console.log('✅ Created relation:', relation.properties.role);
222+
console.log('✅ Created relation:', relation.properties?.['role'] ?? 'Unknown role');
223223

224224
// Query outgoing relations from person
225225
const outgoingRelations = await client.getOutgoingRelations(person.id, 'Person', 'WORKS_ON');

typescript/examples/schema-management.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,7 @@ async function schemaEvolutionExample() {
321321
},
322322
});
323323

324-
console.log('✅ Created user with initial schema:', user1.properties.username);
324+
console.log('✅ Created user with initial schema:', user1.properties['username']);
325325

326326
// Note: In a real scenario, you would need to handle schema migration
327327
// This example shows the pattern, but actual schema modification
@@ -391,7 +391,7 @@ async function schemaEvolutionExample() {
391391
},
392392
});
393393

394-
console.log('✅ Created extended user:', extendedUser.properties.username);
394+
console.log('✅ Created extended user:', extendedUser.properties['username']);
395395
}
396396

397397
// Run all examples

0 commit comments

Comments
 (0)