Skip to content

change a lot of thing

Compare
Choose a tag to compare
@hemedani hemedani released this 15 Oct 13:12
· 703 commits to main since this release

In this release we change the relation concept to:

{
  [key]: {
    optional: false,
    schemaName: "some collection name like country",
    type: "single",
    relatedRelations: {
      [key]: {
        type: "multiple",
        limit: 50,
        sort: {
          field: "_id",
          order: "desc",
        },
      },
    },
}

add a lot of things to playground and redesign it.
add some new method for relation such ad addRelation and removeRelation to every collection.
migrate dependencies to npm version of that. so that we can easily create node and bun version of Lesan.
add staticPath option to runServer for serving static files.
add cors option to runServer.
add type safety to every collection methods like insert, deleteOne and so on.
add deleteOne method which remove one document with all documents related to that.
add insertMany method which accept relation and add multiple document and updated dependent relation also.