|
| 1 | +--- |
| 2 | +title: Recent Updates & Releases |
| 3 | +description: Latest features, improvements, and protocol extensions in ObjectStack |
| 4 | +--- |
| 5 | + |
| 6 | +# Recent Updates & Releases |
| 7 | + |
| 8 | +Stay up-to-date with the latest features and improvements to the ObjectStack protocol. |
| 9 | + |
| 10 | +## Latest Release (2026-01-27) |
| 11 | + |
| 12 | +### 🎯 ObjectQL (Data Layer) - 100% Completion! |
| 13 | + |
| 14 | +We've completed all advanced query features and AI/ML field types, bringing ObjectQL to feature parity with enterprise database systems. |
| 15 | + |
| 16 | +#### Window Functions ✅ |
| 17 | + |
| 18 | +Full support for analytical window functions: |
| 19 | + |
| 20 | +**Ranking Functions:** |
| 21 | +- `ROW_NUMBER()` - Sequential numbering within partitions |
| 22 | +- `RANK()` - Ranking with gaps for ties |
| 23 | +- `DENSE_RANK()` - Ranking without gaps |
| 24 | +- `NTILE(n)` - Distribution into n buckets |
| 25 | + |
| 26 | +**Navigation Functions:** |
| 27 | +- `LAG(field, offset)` - Access previous row values |
| 28 | +- `LEAD(field, offset)` - Access next row values |
| 29 | +- `FIRST_VALUE(field)` - First value in window |
| 30 | +- `LAST_VALUE(field)` - Last value in window |
| 31 | + |
| 32 | +**Aggregate Window Functions:** |
| 33 | +- `SUM()`, `AVG()`, `COUNT()`, `MIN()`, `MAX()` - With OVER clause |
| 34 | + |
| 35 | +**Example Usage:** |
| 36 | +```typescript |
| 37 | +import { ObjectQL } from '@objectstack/objectql'; |
| 38 | + |
| 39 | +const query = { |
| 40 | + from: 'opportunity', |
| 41 | + select: [ |
| 42 | + 'account_name', |
| 43 | + 'amount', |
| 44 | + { |
| 45 | + window: { |
| 46 | + function: 'ROW_NUMBER', |
| 47 | + partitionBy: ['account_name'], |
| 48 | + orderBy: [{ field: 'amount', direction: 'desc' }], |
| 49 | + }, |
| 50 | + as: 'rank_in_account' |
| 51 | + }, |
| 52 | + { |
| 53 | + window: { |
| 54 | + function: 'SUM', |
| 55 | + field: 'amount', |
| 56 | + partitionBy: ['account_name'], |
| 57 | + }, |
| 58 | + as: 'total_account_revenue' |
| 59 | + } |
| 60 | + ], |
| 61 | +}; |
| 62 | +``` |
| 63 | + |
| 64 | +#### HAVING Clause ✅ |
| 65 | + |
| 66 | +Filter aggregated results in GROUP BY queries: |
| 67 | + |
| 68 | +```typescript |
| 69 | +const query = { |
| 70 | + from: 'opportunity', |
| 71 | + select: [ |
| 72 | + 'stage', |
| 73 | + { aggregate: 'SUM', field: 'amount', as: 'total_revenue' }, |
| 74 | + { aggregate: 'COUNT', field: 'id', as: 'deal_count' }, |
| 75 | + ], |
| 76 | + groupBy: ['stage'], |
| 77 | + having: [ |
| 78 | + { field: 'total_revenue', operator: 'greaterThan', value: 1000000 }, |
| 79 | + { field: 'deal_count', operator: 'greaterThan', value: 10 }, |
| 80 | + ], |
| 81 | +}; |
| 82 | +``` |
| 83 | + |
| 84 | +#### DISTINCT Queries ✅ |
| 85 | + |
| 86 | +Full support for SELECT DISTINCT: |
| 87 | + |
| 88 | +```typescript |
| 89 | +// Distinct single field |
| 90 | +const query = { |
| 91 | + from: 'contact', |
| 92 | + select: ['industry'], |
| 93 | + distinct: true, |
| 94 | +}; |
| 95 | + |
| 96 | +// Distinct multiple fields |
| 97 | +const query = { |
| 98 | + from: 'opportunity', |
| 99 | + select: ['stage', 'type'], |
| 100 | + distinct: true, |
| 101 | +}; |
| 102 | + |
| 103 | +// Distinct with aggregate |
| 104 | +const query = { |
| 105 | + from: 'account', |
| 106 | + select: [ |
| 107 | + { aggregate: 'COUNT', field: 'industry', distinct: true, as: 'unique_industries' }, |
| 108 | + ], |
| 109 | +}; |
| 110 | +``` |
| 111 | + |
| 112 | +#### Subqueries ✅ |
| 113 | + |
| 114 | +Nested queries in JOIN clauses: |
| 115 | + |
| 116 | +```typescript |
| 117 | +const query = { |
| 118 | + from: 'account', |
| 119 | + select: ['name', 'industry', 'total_deals'], |
| 120 | + joins: [ |
| 121 | + { |
| 122 | + type: 'left', |
| 123 | + subquery: { |
| 124 | + from: 'opportunity', |
| 125 | + select: [ |
| 126 | + 'account_id', |
| 127 | + { aggregate: 'COUNT', field: 'id', as: 'total_deals' }, |
| 128 | + ], |
| 129 | + groupBy: ['account_id'], |
| 130 | + }, |
| 131 | + alias: 'deal_stats', |
| 132 | + on: [{ left: 'id', operator: 'equals', right: 'deal_stats.account_id' }], |
| 133 | + }, |
| 134 | + ], |
| 135 | +}; |
| 136 | +``` |
| 137 | + |
| 138 | +#### Vector Field Type ✅ |
| 139 | + |
| 140 | +AI/ML embeddings for semantic search and RAG workflows: |
| 141 | + |
| 142 | +```typescript |
| 143 | +import { Field } from '@objectstack/spec'; |
| 144 | + |
| 145 | +const KnowledgeArticle = { |
| 146 | + name: 'knowledge_article', |
| 147 | + fields: { |
| 148 | + title: Field.text({ required: true }), |
| 149 | + content: Field.textarea({ required: true }), |
| 150 | + |
| 151 | + // Store embeddings for semantic search |
| 152 | + content_embedding: Field.vector({ |
| 153 | + label: 'Content Embedding', |
| 154 | + dimensions: 1536, // OpenAI ada-002 |
| 155 | + description: 'Vector representation for semantic search', |
| 156 | + }), |
| 157 | + }, |
| 158 | +}; |
| 159 | + |
| 160 | +// Query by semantic similarity |
| 161 | +const similarArticles = await ql.query({ |
| 162 | + from: 'knowledge_article', |
| 163 | + where: [ |
| 164 | + { |
| 165 | + field: 'content_embedding', |
| 166 | + operator: 'similar_to', |
| 167 | + value: queryEmbedding, |
| 168 | + threshold: 0.8, // Cosine similarity threshold |
| 169 | + }, |
| 170 | + ], |
| 171 | + limit: 5, |
| 172 | +}); |
| 173 | +``` |
| 174 | + |
| 175 | +**Supported Operations:** |
| 176 | +- `similar_to` - Cosine similarity search |
| 177 | +- `knn` - K-nearest neighbors |
| 178 | +- Integration with vector databases (Pinecone, Weaviate, pgvector) |
| 179 | + |
| 180 | +#### Location Field Type ✅ |
| 181 | + |
| 182 | +GPS coordinates for geospatial applications: |
| 183 | + |
| 184 | +```typescript |
| 185 | +import { Field } from '@objectstack/spec'; |
| 186 | + |
| 187 | +const Store = { |
| 188 | + name: 'store', |
| 189 | + fields: { |
| 190 | + name: Field.text({ required: true }), |
| 191 | + address: Field.address(), |
| 192 | + |
| 193 | + // Store GPS coordinates |
| 194 | + location: Field.location({ |
| 195 | + label: 'Store Location', |
| 196 | + description: 'GPS coordinates for mapping', |
| 197 | + }), |
| 198 | + }, |
| 199 | +}; |
| 200 | + |
| 201 | +// Query by distance |
| 202 | +const nearbyStores = await ql.query({ |
| 203 | + from: 'store', |
| 204 | + where: [ |
| 205 | + { |
| 206 | + field: 'location', |
| 207 | + operator: 'within_radius', |
| 208 | + value: { |
| 209 | + lat: 37.7749, |
| 210 | + lng: -122.4194, |
| 211 | + radius: 10, // kilometers |
| 212 | + }, |
| 213 | + }, |
| 214 | + ], |
| 215 | + orderBy: [ |
| 216 | + { |
| 217 | + field: 'location', |
| 218 | + direction: 'distance_from', |
| 219 | + value: { lat: 37.7749, lng: -122.4194 }, |
| 220 | + }, |
| 221 | + ], |
| 222 | +}); |
| 223 | +``` |
| 224 | + |
| 225 | +**Supported Operations:** |
| 226 | +- `within_radius` - Find locations within distance |
| 227 | +- `within_bounds` - Find locations in bounding box |
| 228 | +- `distance_from` - Calculate distance |
| 229 | +- Integration with mapping services (Google Maps, Mapbox) |
| 230 | + |
| 231 | +--- |
| 232 | + |
| 233 | +## Previous Releases |
| 234 | + |
| 235 | +### v1.3.0 (2026-01-15) - Advanced Query Features |
| 236 | + |
| 237 | +- Added support for Common Table Expressions (CTE) |
| 238 | +- Improved query optimizer performance |
| 239 | +- Added transaction isolation levels |
| 240 | + |
| 241 | +### v1.2.0 (2025-12-20) - AI Protocol |
| 242 | + |
| 243 | +- Complete AI protocol suite (8 schemas) |
| 244 | +- Agent orchestration and RAG pipeline |
| 245 | +- Natural language query processing |
| 246 | +- AI cost tracking and budgeting |
| 247 | + |
| 248 | +### v1.1.0 (2025-11-30) - UI Enhancements |
| 249 | + |
| 250 | +- Advanced theming system |
| 251 | +- Custom widget lifecycle hooks |
| 252 | +- Dashboard grid layouts |
| 253 | +- Report builder improvements |
| 254 | + |
| 255 | +### v1.0.0 (2025-10-15) - Initial Release |
| 256 | + |
| 257 | +- Core ObjectQL, ObjectUI, ObjectOS protocols |
| 258 | +- PostgreSQL and MongoDB drivers |
| 259 | +- Basic plugin system |
| 260 | +- Documentation site |
| 261 | + |
| 262 | +--- |
| 263 | + |
| 264 | +## Migration Guides |
| 265 | + |
| 266 | +### Upgrading to v1.4.0 |
| 267 | + |
| 268 | +The new window functions and vector/location field types are backward compatible. No breaking changes. |
| 269 | + |
| 270 | +**To use vector fields:** |
| 271 | +1. Update `@objectstack/spec` to `^1.4.0` |
| 272 | +2. Add vector database driver (e.g., `@objectstack/driver-pgvector`) |
| 273 | +3. Define vector fields in your objects |
| 274 | + |
| 275 | +**To use location fields:** |
| 276 | +1. Update `@objectstack/spec` to `^1.4.0` |
| 277 | +2. Use with any driver (coordinates stored as JSON) |
| 278 | +3. For advanced geospatial queries, use PostGIS driver |
| 279 | + |
| 280 | +--- |
| 281 | + |
| 282 | +## Roadmap |
| 283 | + |
| 284 | +### Q1 2026 |
| 285 | +- [ ] GraphQL Gateway |
| 286 | +- [ ] Real-time subscriptions (WebSocket) |
| 287 | +- [ ] Multi-tenant data isolation |
| 288 | + |
| 289 | +### Q2 2026 |
| 290 | +- [ ] Performance monitoring dashboard |
| 291 | +- [ ] Advanced caching strategies |
| 292 | +- [ ] Plugin marketplace |
| 293 | + |
| 294 | +--- |
| 295 | + |
| 296 | +## Get Involved |
| 297 | + |
| 298 | +- **Report Issues:** [GitHub Issues](https://github.com/objectstack-ai/spec/issues) |
| 299 | +- **Contribute:** [Contributing Guide](/docs/introduction/contributing) |
| 300 | +- **Discuss:** [GitHub Discussions](https://github.com/objectstack-ai/spec/discussions) |
0 commit comments