ponairi/macroUtils

  Source   Edit

Types

Pragma = object
  name*: string
  parameters*: seq[NimNode]
Represents a pragma attached to a field/table   Source   Edit
Property = object
  name*: string
  typ*: NimNode
  pragmas*: seq[Pragma]
Represents a property of an object   Source   Edit

Procs

func `[]`(items: seq[Pragma]; name: string): Pragma {....raises: [], tags: [].}
  Source   Edit
func contains(items: seq[Pragma]; name: string): bool {....raises: [], tags: [].}
  Source   Edit
proc contains(t: CacheTable; key: string): bool {....raises: [], tags: [].}
  Source   Edit
func getColumn(pragma: Pragma): string {....raises: [], tags: [].}
Returns name of column for references pragma   Source   Edit
proc getName(n: NimNode): string {....raises: [], tags: [].}
  Source   Edit
proc getProperties(impl: NimNode): seq[Property] {....raises: [], tags: [].}
  Source   Edit
func getTable(pragma: Pragma): string {....raises: [], tags: [].}
Returns name of table for references pragma   Source   Edit
proc hasProperty(obj: NimNode; property: string | NimNode): bool
  Source   Edit
func initPragma(pragmaVal: NimNode): Pragma {....raises: [], tags: [].}
Creates a pragma object from nnkPragmaExpr node   Source   Edit
func isOptional(prop: Property): bool {....raises: [], tags: [].}
Returns true if the property has an optional type   Source   Edit
func isPrimary(prop: Property): bool {....raises: [], tags: [].}
Returns true if the property is a primary key   Source   Edit
proc lookupImpl(T: NimNode): NimNode {....raises: [], tags: [].}
Performs a series of magical lookups to get the original type def of something   Source   Edit