Skip to content

Latest commit

 

History

History
40 lines (32 loc) · 1.3 KB

Database-Where-Config.md

File metadata and controls

40 lines (32 loc) · 1.3 KB

'Where' object (database-driven)

The Where object defines an additional where Statement to be added. This is in addition to those automatically added based on the StoredProcedure.Type.


Example

A YAML example is as follows:

tables:
- { name: Table, schema: Test, create: true, update: true, upsert: true, delete: true, merge: true, udt: true, getAll: true, getAllOrderBy: [ Name Des ], excludeColumns: [ Other ], permission: TestSec,
    storedProcedures: [
      { name: GetByArgs, type: GetColl, excludeColumns: [ Count ],
        parameters: [
          { name: Name, nullable: true, operator: LIKE },
          { name: MinCount, operator: GE, column: Count },
          { name: MaxCount, operator: LE, column: Count, nullable: true }
        ]
      },
      { name: Get, type: Get, withHints: NOLOCK,
        execute: [
          { statement: EXEC Demo.Before, location: Before },
          { statement: EXEC Demo.After }
        ]
      },
      { name: Update, type: Update }
    ]
  }

Properties

The Where object supports a number of properties that control the generated code output. The following properties with a bold name are those that are more typically used (considered more important).

Property Description
statement The where statement (TSQL). [Mandatory]