Skip to content

Commit 8da203b

Browse files
Copilothotlong
andcommitted
Fix broken documentation links and add missing example code
Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
1 parent 7767f3c commit 8da203b

9 files changed

Lines changed: 73 additions & 20 deletions

File tree

docs/api/attachments.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1236,7 +1236,7 @@ Configure file storage behavior using environment variables:
12361236
## Related Documentation
12371237

12381238
- [Object Definition Specification](../spec/object.md) - Field type definitions
1239-
- [API Reference](./README.md) - Complete API documentation
1239+
- [API Reference](./index.md) - Complete API documentation
12401240
- [Validation Rules](../spec/validation.md) - File validation configuration
12411241
- [Server Integration](../guide/server-integration.md) - Setting up file storage
12421242

docs/api/graphql.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -938,7 +938,7 @@ mutation DeleteUser($id: String!) {
938938

939939
- [GraphQL Specification](https://spec.graphql.org/)
940940
- [ObjectQL Query Language](../spec/query-language.md)
941-
- [REST API Documentation](./README.md#rest-style-api)
941+
- [REST API Documentation](./index.md)
942942
- [Authentication Guide](./authentication.md)
943943

944944
---

docs/api/quick-reference.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -484,10 +484,10 @@ GET /api/metadata/objects/orders/actions
484484

485485
## Next Steps
486486

487-
- [Complete API Reference](./README.md)
487+
- [Complete API Reference](./index.md)
488488
- [Authentication Guide](./authentication.md)
489489
- [Query Language Spec](../spec/query-language.md)
490-
- [Examples](./README.md#examples)
490+
- [Examples](./examples.md)
491491

492492
---
493493

docs/contributing.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ Then create a pull request on GitHub.
189189

190190
### 🔌 New Drivers
191191

192-
See the [Driver Extensibility Guide](./docs/guide/drivers/extensibility.md) for detailed instructions.
192+
See the [Driver Extensibility Guide](./guide/drivers/extensibility.md) for detailed instructions.
193193

194194
Quick steps:
195195
1. Create a new package in `packages/drivers/`
@@ -437,7 +437,7 @@ Description of the function.
437437

438438
## See Also
439439

440-
- [Related Feature](./related-feature.md)
440+
- Related Feature (link to specific feature documentation as needed)
441441
- [API Reference](/api/)
442442
````
443443

docs/development-plan.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -396,7 +396,7 @@ We welcome community contributions in the following areas:
396396
- **Examples** - Sample applications
397397
- **Bug Fixes** - Issue resolution
398398

399-
See [CONTRIBUTING.md](./CONTRIBUTING.md) for guidelines.
399+
See [Contributing Guide](./contributing.md) for guidelines.
400400

401401
---
402402

@@ -538,10 +538,10 @@ See [CONTRIBUTING.md](./CONTRIBUTING.md) for guidelines.
538538

539539
### Related Documents
540540

541-
- [ROADMAP.md](./ROADMAP.md) - Long-term vision and milestones
542-
- [CONTRIBUTING.md](./CONTRIBUTING.md) - Contribution guidelines
543-
- [ARCHITECTURE.md](./docs/guide/architecture/overview.md) - System architecture
544-
- [CHANGELOG.md](./CHANGELOG.md) - Version history
541+
- [Roadmap](./roadmap.md) - Long-term vision and milestones
542+
- [Contributing Guide](./contributing.md) - Contribution guidelines
543+
- [Architecture Overview](./guide/architecture/overview.md) - System architecture
544+
- [GitHub Releases](https://github.com/objectstack-ai/objectql/releases) - Version history
545545

546546
### References
547547

docs/project-status.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ ObjectQL is a universal data compiler that transforms declarative YAML metadata
242242
- [ ] Complete audit system
243243
- [ ] Performance optimization
244244

245-
See [ROADMAP.md](./ROADMAP.md) for complete roadmap.
245+
See [Roadmap](./roadmap.md) for complete roadmap.
246246

247247
---
248248

@@ -350,16 +350,16 @@ See [ROADMAP.md](./ROADMAP.md) for complete roadmap.
350350

351351
We welcome contributions! See:
352352

353-
- [CONTRIBUTING.md](./CONTRIBUTING.md) - Contribution guidelines
354-
- [DEVELOPMENT_PLAN.md](./DEVELOPMENT_PLAN.md) - Detailed development plan
353+
- [Contributing Guide](./contributing.md) - Contribution guidelines
354+
- [Development Plan](./development-plan.md) - Detailed development plan
355355
- [GitHub Issues](https://github.com/objectstack-ai/objectql/issues) - Open issues
356356

357357
---
358358

359359
## License
360360

361-
ObjectQL is released under the PolyForm Shield License 1.0.0. See [LICENSE](./LICENSE) for details.
361+
ObjectQL is released under the PolyForm Shield License 1.0.0. See [LICENSE](../LICENSE) for details.
362362

363363
---
364364

365-
*This status document is updated monthly. For real-time updates, see the [CHANGELOG.md](./CHANGELOG.md) and [GitHub Releases](https://github.com/objectstack-ai/objectql/releases).*
365+
*This status document is updated monthly. For real-time updates, see [GitHub Releases](https://github.com/objectstack-ai/objectql/releases).*

docs/roadmap.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,7 @@ ObjectQL aims to be the **Standard Protocol for AI Software Generation** - a uni
303303
This roadmap represents the core team's priorities, but we welcome community input:
304304

305305
1. **Feature Requests** - Open an issue with the `enhancement` label
306-
2. **Driver Contributions** - See [Driver Extensibility Guide](./docs/guide/drivers/extensibility.md)
306+
2. **Driver Contributions** - See [Driver Extensibility Guide](./guide/drivers/extensibility.md)
307307
3. **Documentation** - Submit PRs to improve guides and examples
308308
4. **Testing** - Help increase test coverage and report bugs
309309

docs/schema-introspection.md

Lines changed: 55 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -260,9 +260,62 @@ Convert introspected schema to ObjectQL object configurations.
260260

261261
**Returns:** `ObjectConfig[]` - Array of object configurations
262262

263-
## Examples
263+
## Complete Example
264264

265-
See [examples/connect-existing-database.ts](../examples/connect-existing-database.ts) for a complete working example.
265+
Here's a complete working example combining all features:
266+
267+
```typescript
268+
import { ObjectQL } from '@objectql/core';
269+
import { SqlDriver } from '@objectql/driver-sql';
270+
import * as fs from 'fs';
271+
import * as yaml from 'js-yaml';
272+
273+
async function connectExistingDatabase() {
274+
// Create driver for existing database
275+
const driver = new SqlDriver({
276+
client: 'postgresql',
277+
connection: {
278+
host: 'localhost',
279+
database: 'my_existing_db',
280+
user: 'username',
281+
password: 'password'
282+
}
283+
});
284+
285+
// Initialize ObjectQL
286+
const app = new ObjectQL({
287+
datasources: { default: driver }
288+
});
289+
290+
// Introspect and register all tables
291+
const objects = await app.introspectAndRegister('default', {
292+
excludeTables: ['migrations', 'schema_version']
293+
});
294+
295+
console.log(`Discovered ${objects.length} tables`);
296+
297+
// Initialize and use
298+
await app.init();
299+
const ctx = app.createContext({ isSystem: true });
300+
301+
// Query existing data
302+
const users = await ctx.object('users').find({
303+
top: 10
304+
});
305+
306+
console.log('Users:', users);
307+
308+
// Optionally export metadata to files
309+
objects.forEach(obj => {
310+
fs.writeFileSync(
311+
`src/objects/${obj.name}.object.yml`,
312+
yaml.dump(obj)
313+
);
314+
});
315+
}
316+
317+
connectExistingDatabase().catch(console.error);
318+
```
266319

267320
## Chinese Documentation (中文文档)
268321

docs/spec/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Complete metadata specifications for the ObjectQL platform. ObjectQL is a metada
44

55
📖 **[Read the Complete Metadata Standard Guide](./metadata-standard.md)** - A comprehensive overview of the entire metadata system and how all pieces fit together.
66

7-
📊 **[Implementation Progress Report](../../PROGRESS.md)** - Current implementation status of all specifications (v1.8.4 - 70% complete)
7+
📊 **[Implementation Progress Report](../project-status.md)** - Current implementation status of all specifications
88

99
## Core Data Layer
1010

0 commit comments

Comments
 (0)