0.6.17 • Published 6 years ago

@hypercortex/hypercortex-object v0.6.17

Weekly downloads
-
License
ISC
Repository
github
Last release
6 years ago

@hypercortex/hypercortex-object

TODO: description

Usage

   const taskSpecification = createHyperCortexObject({
      type: "task",
      calculateScore: task => ( /* do stuff */ 0 ),
      properties: {
         scalars: [
         "description",
         "priority",
         ]
         collections: [
            {
               name: "tags",
               sortBy: tag => tag,
            }
         ],
      }
      relations: {
         one: [
            {
               name: "properties",
               resolver: propertiesSpecification,
            }
         ],
         many: [
            {
               name: "dependsOn",
                     resolver: taskSpecification,
            }
         ]
      }
   });

   const { task, taskAll } = taskSpecification(db);

   const foo = task("id")
   await foo.descriptionSet("this is the description")
   const description = await foo.descriptionGet()
   const calculatedScore = await foo.scoreGet();

   const tasks = await taskAll();
   const foo = tasks[0]
0.6.17

6 years ago

0.6.15

6 years ago

0.6.13

6 years ago

0.6.9

6 years ago

0.6.7

6 years ago

0.6.6

6 years ago

0.6.2

6 years ago

0.6.0

6 years ago

0.5.18

6 years ago

0.5.17

6 years ago

0.5.15

6 years ago

0.5.12

6 years ago

0.5.7

6 years ago

0.5.6

6 years ago

0.5.5

6 years ago

0.5.4

6 years ago

0.5.3

7 years ago

0.5.3-alpha.0

7 years ago

0.5.2-alpha.0

7 years ago

0.5.1-alpha.0

7 years ago

0.5.0-alpha.0

7 years ago