Skip to content
Richard Andrew Cattermole edited this page Jun 1, 2014 · 5 revisions

This page is essentially going to act as a TODO list.

TODO:

  • Add support for setting of keys from the provider

    This is doable via controlling of the unique id by Dvorm. This should be basically:

    @dbId
    @dbName("")
    MyId _id;  
    
    struct MyId {
       @dbId
       @dbName("id")
       ubyte[] uniqueId;
    
       private string hexString;
    
       void opAssign(ubyte[] val) {
         hexString = toHex(val);
         uniqueId = val;
       }
    
       string toString() {
         return hexString;
       }
    }

    This will be included as part of the mixin. It will be automatically pushed into the backend via ref.

  • Migration of data between databases

    Migration between e.g. MongoDb and Mysql is not directly possible because of index type differences. In MongoDb you must utilise a string of 12 bytes to index an entry. However in Mysql you utilise an numeric value. The maximum numeric type has a 8 byte value (BIGINT). So to combat this, its required to drop the id and let the provider generate a new one.

    This leads to interesting situations regarding migrating relationships that are objects. To accomplish an interesting algorithm will need to be created that takes care of handling all child entries before current. As well as mapping storage.

  • Support for manual writing of query/RUD implementation.

class Book {
    string isbn;
    ubyte edition;
    
    @QueryOverride(Book.query.edition_eq())
    static Book[] editionGetQuery(ubyte edition){}


    @CRUDOperation
    static Book read(string isbn, ubyte edition){}
}
Would need to add support for default values of query property functions.
Clone this wiki locally