selectStruct

const selectStruct = <T>(schema: keyof TSchemas, depth: number | T = 2)
Example
    
  const cities = coreApp.odm.newModel("city", locationPure, {
    country: {
      schemaName: "country",
      type: "single",
      optional: false,
      relatedRelations: {
        cities: {
          type: "multiple",
          limit: 5,
          sort: {
            field: "_id",
            order: "asc",
          },
        },
      },
    },
  });
      

const selectStruct = coreApp.schemas.selectStruct("city", {});

Return Of Example
    
{
  "type": "object",
  "schema": {
    "_id": {
      "type": "enums",
      "schema": {
        "0": 0,
        "1": 1
      }
    },
    "name": {
      "type": "enums",
      "schema": {
        "0": 0,
        "1": 1
      }
    },
    "population": {
      "type": "enums",
      "schema": {
        "0": 0,
        "1": 1
      }
    },
    "abb": {
      "type": "enums",
      "schema": {
        "0": 0,
        "1": 1
      }
    }
  }
}
    
  

Parameters

  
  schema: keyof TSchemas,
  depth: number | T = 2