|
| 1 | + |
| 2 | +Support emitted metadata |
| 3 | +------------------------ |
| 4 | + |
| 5 | +TypeScript supports emitting metadata for annotated entries (methods, properties etc..), using |
| 6 | +``emitDecoratorMetadata=true`` . |
| 7 | + |
| 8 | +This metadata contains already the type, so the following code could be possible : |
| 9 | + |
| 10 | +``` |
| 11 | +@Tsdb.embedded |
| 12 | +emb :TheType |
| 13 | +
|
| 14 | +@Tsdb.reference |
| 15 | +ref :TheType |
| 16 | +``` |
| 17 | + |
| 18 | + |
| 19 | +Un-evented unboxing |
| 20 | +------------------- |
| 21 | + |
| 22 | +Sometimes it's enough to properly "unbox" data, that is parse the json into the right class, |
| 23 | +without the need to have "proper" events for it. |
| 24 | + |
| 25 | +Evaluate if it's a good idea to have a specific annotation for this case, if it really can |
| 26 | +reduce the weight of using a normal "embedded" or not. |
| 27 | + |
| 28 | +Eventually, if emitDecoratorMetadata could emit metadata for all the properties of a class, |
| 29 | +also non annotated, then we could automatically do the right unboxing for all the non-annotated, |
| 30 | +non-primitive types. |
| 31 | + |
| 32 | + |
| 33 | +Move IDbOperations on the hybrid type itself |
| 34 | +-------------------------------------------- |
| 35 | + |
| 36 | +Currently, to load from a url, we have to write : |
| 37 | + |
| 38 | +``` |
| 39 | +Db().load(str); |
| 40 | +``` |
| 41 | + |
| 42 | +Also, if the db is obtained with the ``of``, we have to write the following (horrible) stuff: |
| 43 | + |
| 44 | +``` |
| 45 | +Tsdb.of(this)().load(str); |
| 46 | +Tsdb.of(this)(this).updated(...); |
| 47 | +``` |
| 48 | + |
| 49 | +Since it's a hybrid type, IDbOperations could be directly implemented by the static db type. |
| 50 | + |
| 51 | + |
| 52 | +Write an interface for database configuration |
| 53 | +--------------------------------------------- |
| 54 | + |
| 55 | + |
0 commit comments