Code Monkey home page Code Monkey logo

Comments (2)

thhermansen avatar thhermansen commented on July 23, 2024

Progress has been made on this, see comparison between develop and my refactor branch: develop...feature/refactor_schema

I think these changes are good, and in short we now have:

  • Made ColumnFamilies into a set; it is no longer possible to have column families with the same name.
  • Made Fields into a set; it is no longer possible to have fields with the same name.
  • The enforcement of fields with unique names are global across all column families.
  • The attributes_schema() is read from from the column family set, and there are no longer a need to maintain multiple hashes which reflected the column families and fields in different ways.
  • Added simple interface for dynamically adding fields to a family: ATableClass.add_field_to_column_family(:info, :name, :default => "NA"). It will take care of keeping the ATableClass consistent with read/write and other attribute methods it creates based on the schema.
  • ORM::Column is now implemented, mening that it should be easier to subclass it, and define fields given the DSL we have defined in the README.
  • ORM::Column has attributes_schema(), known_attribute_names(), default_attributes_from_schmea() just like the ORM::Table. In fact, these methods comes from the same module.
  • All old tests passes, and I suspect that we should not need to do a lot of changing in the Front. What we can do in the front is clean up classes which inherits from ORM::Column, as we can now define fields for these classes as well :-)

from massive_record.

thhermansen avatar thhermansen commented on July 23, 2024

Merged into master :-)

from massive_record.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.