PageRenderTime 100ms CodeModel.GetById 46ms RepoModel.GetById 0ms app.codeStats 3ms

/_examples/pgcatalog/pgcatalog/pgcatalog.xo.go

https://github.com/xo/xo
Go | 12072 lines | 8683 code | 860 blank | 2529 comment | 1475 complexity | e0ce5dccc891ed58e1e979f4aca9e850 MD5 | raw file

Large files files are truncated, but you can click here to view the full file

  1. // Package pgcatalog contains generated code for schema 'pg_catalog'.
  2. package pgcatalog
  3. // Code generated by xo. DO NOT EDIT.
  4. import (
  5. "context"
  6. "database/sql"
  7. "database/sql/driver"
  8. "encoding/csv"
  9. "fmt"
  10. "io"
  11. "regexp"
  12. "strings"
  13. "time"
  14. "github.com/xo/xo/_examples/pgcatalog/pgtypes"
  15. "github.com/google/uuid"
  16. )
  17. var (
  18. // logf is used by generated code to log SQL queries.
  19. logf = func(string, ...interface{}) {}
  20. // errf is used by generated code to log SQL errors.
  21. errf = func(string, ...interface{}) {}
  22. )
  23. // logerror logs the error and returns it.
  24. func logerror(err error) error {
  25. errf("ERROR: %v", err)
  26. return err
  27. }
  28. // Logf logs a message using the package logger.
  29. func Logf(s string, v ...interface{}) {
  30. logf(s, v...)
  31. }
  32. // SetLogger sets the package logger. Valid logger types:
  33. //
  34. // io.Writer
  35. // func(string, ...interface{}) (int, error) // fmt.Printf
  36. // func(string, ...interface{}) // log.Printf
  37. //
  38. func SetLogger(logger interface{}) {
  39. logf = convLogger(logger)
  40. }
  41. // Errorf logs an error message using the package error logger.
  42. func Errorf(s string, v ...interface{}) {
  43. errf(s, v...)
  44. }
  45. // SetErrorLogger sets the package error logger. Valid logger types:
  46. //
  47. // io.Writer
  48. // func(string, ...interface{}) (int, error) // fmt.Printf
  49. // func(string, ...interface{}) // log.Printf
  50. //
  51. func SetErrorLogger(logger interface{}) {
  52. errf = convLogger(logger)
  53. }
  54. // convLogger converts logger to the standard logger interface.
  55. func convLogger(logger interface{}) func(string, ...interface{}) {
  56. switch z := logger.(type) {
  57. case io.Writer:
  58. return func(s string, v ...interface{}) {
  59. fmt.Fprintf(z, s, v...)
  60. }
  61. case func(string, ...interface{}) (int, error): // fmt.Printf
  62. return func(s string, v ...interface{}) {
  63. _, _ = z(s, v...)
  64. }
  65. case func(string, ...interface{}): // log.Printf
  66. return z
  67. }
  68. panic(fmt.Sprintf("unsupported logger type %T", logger))
  69. }
  70. // DB is the common interface for database operations that can be used with
  71. // types from schema 'pg_catalog'.
  72. //
  73. // This works with both database/sql.DB and database/sql.Tx.
  74. type DB interface {
  75. ExecContext(context.Context, string, ...interface{}) (sql.Result, error)
  76. QueryContext(context.Context, string, ...interface{}) (*sql.Rows, error)
  77. QueryRowContext(context.Context, string, ...interface{}) *sql.Row
  78. }
  79. // Error is an error.
  80. type Error string
  81. // Error satisfies the error interface.
  82. func (err Error) Error() string {
  83. return string(err)
  84. }
  85. // Error values.
  86. const (
  87. // ErrAlreadyExists is the already exists error.
  88. ErrAlreadyExists Error = "already exists"
  89. // ErrDoesNotExist is the does not exist error.
  90. ErrDoesNotExist Error = "does not exist"
  91. // ErrMarkedForDeletion is the marked for deletion error.
  92. ErrMarkedForDeletion Error = "marked for deletion"
  93. )
  94. // ErrInsertFailed is the insert failed error.
  95. type ErrInsertFailed struct {
  96. Err error
  97. }
  98. // Error satisfies the error interface.
  99. func (err *ErrInsertFailed) Error() string {
  100. return fmt.Sprintf("insert failed: %v", err.Err)
  101. }
  102. // Unwrap satisfies the unwrap interface.
  103. func (err *ErrInsertFailed) Unwrap() error {
  104. return err.Err
  105. }
  106. // ErrUpdateFailed is the update failed error.
  107. type ErrUpdateFailed struct {
  108. Err error
  109. }
  110. // Error satisfies the error interface.
  111. func (err *ErrUpdateFailed) Error() string {
  112. return fmt.Sprintf("update failed: %v", err.Err)
  113. }
  114. // Unwrap satisfies the unwrap interface.
  115. func (err *ErrUpdateFailed) Unwrap() error {
  116. return err.Err
  117. }
  118. // ErrUpsertFailed is the upsert failed error.
  119. type ErrUpsertFailed struct {
  120. Err error
  121. }
  122. // Error satisfies the error interface.
  123. func (err *ErrUpsertFailed) Error() string {
  124. return fmt.Sprintf("upsert failed: %v", err.Err)
  125. }
  126. // Unwrap satisfies the unwrap interface.
  127. func (err *ErrUpsertFailed) Unwrap() error {
  128. return err.Err
  129. }
  130. // ErrDecodeFailed is the decode failed error.
  131. type ErrDecodeFailed struct {
  132. Err error
  133. }
  134. // Error satisfies the error interface.
  135. func (err *ErrDecodeFailed) Error() string {
  136. return fmt.Sprintf("unable to decode: %v", err.Err)
  137. }
  138. // Unwrap satisfies the unwrap interface.
  139. func (err *ErrDecodeFailed) Unwrap() error {
  140. return err.Err
  141. }
  142. // ErrInvalidStringSlice is the invalid StringSlice error.
  143. const ErrInvalidStringSlice Error = "invalid StringSlice"
  144. // StringSlice is a slice of strings.
  145. type StringSlice []string
  146. // Scan satisfies the sql.Scanner interface for StringSlice.
  147. func (ss *StringSlice) Scan(v interface{}) error {
  148. buf, ok := v.([]byte)
  149. if !ok {
  150. return logerror(ErrInvalidStringSlice)
  151. }
  152. // change quote escapes for csv parser
  153. str := strings.Replace(quoteEscRE.ReplaceAllString(string(buf), `$1""`), `\\`, `\`, -1)
  154. str = str[1 : len(str)-1]
  155. // bail if only one
  156. if len(str) == 0 {
  157. return nil
  158. }
  159. // parse with csv reader
  160. r := csv.NewReader(strings.NewReader(str))
  161. line, err := r.Read()
  162. if err != nil {
  163. return logerror(&ErrDecodeFailed{err})
  164. }
  165. *ss = StringSlice(line)
  166. return nil
  167. }
  168. // quoteEscRE matches escaped characters in a string.
  169. var quoteEscRE = regexp.MustCompile(`([^\\]([\\]{2})*)\\"`)
  170. // Value satisfies the sql/driver.Valuer interface.
  171. func (ss StringSlice) Value() (driver.Value, error) {
  172. v := make([]string, len(ss))
  173. for i, s := range ss {
  174. v[i] = `"` + strings.Replace(strings.Replace(s, `\`, `\\\`, -1), `"`, `\"`, -1) + `"`
  175. }
  176. return "{" + strings.Join(v, ",") + "}", nil
  177. }
  178. // PgAggregate represents a row from 'pg_catalog.pg_aggregate'.
  179. type PgAggregate struct {
  180. Tableoid pgtypes.Oid `json:"tableoid"` // tableoid
  181. Cmax pgtypes.Cid `json:"cmax"` // cmax
  182. Xmax pgtypes.Xid `json:"xmax"` // xmax
  183. Cmin pgtypes.Cid `json:"cmin"` // cmin
  184. Xmin pgtypes.Xid `json:"xmin"` // xmin
  185. Ctid pgtypes.Tid `json:"ctid"` // ctid
  186. Aggfnoid pgtypes.Regproc `json:"aggfnoid"` // aggfnoid
  187. Aggkind pgtypes.Char `json:"aggkind"` // aggkind
  188. Aggnumdirectargs int16 `json:"aggnumdirectargs"` // aggnumdirectargs
  189. Aggtransfn pgtypes.Regproc `json:"aggtransfn"` // aggtransfn
  190. Aggfinalfn pgtypes.Regproc `json:"aggfinalfn"` // aggfinalfn
  191. Aggcombinefn pgtypes.Regproc `json:"aggcombinefn"` // aggcombinefn
  192. Aggserialfn pgtypes.Regproc `json:"aggserialfn"` // aggserialfn
  193. Aggdeserialfn pgtypes.Regproc `json:"aggdeserialfn"` // aggdeserialfn
  194. Aggmtransfn pgtypes.Regproc `json:"aggmtransfn"` // aggmtransfn
  195. Aggminvtransfn pgtypes.Regproc `json:"aggminvtransfn"` // aggminvtransfn
  196. Aggmfinalfn pgtypes.Regproc `json:"aggmfinalfn"` // aggmfinalfn
  197. Aggfinalextra bool `json:"aggfinalextra"` // aggfinalextra
  198. Aggmfinalextra bool `json:"aggmfinalextra"` // aggmfinalextra
  199. Aggfinalmodify pgtypes.Char `json:"aggfinalmodify"` // aggfinalmodify
  200. Aggmfinalmodify pgtypes.Char `json:"aggmfinalmodify"` // aggmfinalmodify
  201. Aggsortop pgtypes.Oid `json:"aggsortop"` // aggsortop
  202. Aggtranstype pgtypes.Oid `json:"aggtranstype"` // aggtranstype
  203. Aggtransspace int `json:"aggtransspace"` // aggtransspace
  204. Aggmtranstype pgtypes.Oid `json:"aggmtranstype"` // aggmtranstype
  205. Aggmtransspace int `json:"aggmtransspace"` // aggmtransspace
  206. Agginitval sql.NullString `json:"agginitval"` // agginitval
  207. Aggminitval sql.NullString `json:"aggminitval"` // aggminitval
  208. }
  209. // PgAm represents a row from 'pg_catalog.pg_am'.
  210. type PgAm struct {
  211. Tableoid pgtypes.Oid `json:"tableoid"` // tableoid
  212. Cmax pgtypes.Cid `json:"cmax"` // cmax
  213. Xmax pgtypes.Xid `json:"xmax"` // xmax
  214. Cmin pgtypes.Cid `json:"cmin"` // cmin
  215. Xmin pgtypes.Xid `json:"xmin"` // xmin
  216. Ctid pgtypes.Tid `json:"ctid"` // ctid
  217. Oid pgtypes.Oid `json:"oid"` // oid
  218. Amname string `json:"amname"` // amname
  219. Amhandler pgtypes.Regproc `json:"amhandler"` // amhandler
  220. Amtype pgtypes.Char `json:"amtype"` // amtype
  221. }
  222. // PgAmop represents a row from 'pg_catalog.pg_amop'.
  223. type PgAmop struct {
  224. Tableoid pgtypes.Oid `json:"tableoid"` // tableoid
  225. Cmax pgtypes.Cid `json:"cmax"` // cmax
  226. Xmax pgtypes.Xid `json:"xmax"` // xmax
  227. Cmin pgtypes.Cid `json:"cmin"` // cmin
  228. Xmin pgtypes.Xid `json:"xmin"` // xmin
  229. Ctid pgtypes.Tid `json:"ctid"` // ctid
  230. Oid pgtypes.Oid `json:"oid"` // oid
  231. Amopfamily pgtypes.Oid `json:"amopfamily"` // amopfamily
  232. Amoplefttype pgtypes.Oid `json:"amoplefttype"` // amoplefttype
  233. Amoprighttype pgtypes.Oid `json:"amoprighttype"` // amoprighttype
  234. Amopstrategy int16 `json:"amopstrategy"` // amopstrategy
  235. Amoppurpose pgtypes.Char `json:"amoppurpose"` // amoppurpose
  236. Amopopr pgtypes.Oid `json:"amopopr"` // amopopr
  237. Amopmethod pgtypes.Oid `json:"amopmethod"` // amopmethod
  238. Amopsortfamily pgtypes.Oid `json:"amopsortfamily"` // amopsortfamily
  239. }
  240. // PgAmproc represents a row from 'pg_catalog.pg_amproc'.
  241. type PgAmproc struct {
  242. Tableoid pgtypes.Oid `json:"tableoid"` // tableoid
  243. Cmax pgtypes.Cid `json:"cmax"` // cmax
  244. Xmax pgtypes.Xid `json:"xmax"` // xmax
  245. Cmin pgtypes.Cid `json:"cmin"` // cmin
  246. Xmin pgtypes.Xid `json:"xmin"` // xmin
  247. Ctid pgtypes.Tid `json:"ctid"` // ctid
  248. Oid pgtypes.Oid `json:"oid"` // oid
  249. Amprocfamily pgtypes.Oid `json:"amprocfamily"` // amprocfamily
  250. Amproclefttype pgtypes.Oid `json:"amproclefttype"` // amproclefttype
  251. Amprocrighttype pgtypes.Oid `json:"amprocrighttype"` // amprocrighttype
  252. Amprocnum int16 `json:"amprocnum"` // amprocnum
  253. Amproc pgtypes.Regproc `json:"amproc"` // amproc
  254. }
  255. // PgAttrdef represents a row from 'pg_catalog.pg_attrdef'.
  256. type PgAttrdef struct {
  257. Tableoid pgtypes.Oid `json:"tableoid"` // tableoid
  258. Cmax pgtypes.Cid `json:"cmax"` // cmax
  259. Xmax pgtypes.Xid `json:"xmax"` // xmax
  260. Cmin pgtypes.Cid `json:"cmin"` // cmin
  261. Xmin pgtypes.Xid `json:"xmin"` // xmin
  262. Ctid pgtypes.Tid `json:"ctid"` // ctid
  263. Oid pgtypes.Oid `json:"oid"` // oid
  264. Adrelid pgtypes.Oid `json:"adrelid"` // adrelid
  265. Adnum int16 `json:"adnum"` // adnum
  266. Adbin pgtypes.PgNodeTree `json:"adbin"` // adbin
  267. }
  268. // PgAttribute represents a row from 'pg_catalog.pg_attribute'.
  269. type PgAttribute struct {
  270. Tableoid pgtypes.Oid `json:"tableoid"` // tableoid
  271. Cmax pgtypes.Cid `json:"cmax"` // cmax
  272. Xmax pgtypes.Xid `json:"xmax"` // xmax
  273. Cmin pgtypes.Cid `json:"cmin"` // cmin
  274. Xmin pgtypes.Xid `json:"xmin"` // xmin
  275. Ctid pgtypes.Tid `json:"ctid"` // ctid
  276. Attrelid pgtypes.Oid `json:"attrelid"` // attrelid
  277. Attname string `json:"attname"` // attname
  278. Atttypid pgtypes.Oid `json:"atttypid"` // atttypid
  279. Attstattarget int `json:"attstattarget"` // attstattarget
  280. Attlen int16 `json:"attlen"` // attlen
  281. Attnum int16 `json:"attnum"` // attnum
  282. Attndims int `json:"attndims"` // attndims
  283. Attcacheoff int `json:"attcacheoff"` // attcacheoff
  284. Atttypmod int `json:"atttypmod"` // atttypmod
  285. Attbyval bool `json:"attbyval"` // attbyval
  286. Attstorage pgtypes.Char `json:"attstorage"` // attstorage
  287. Attalign pgtypes.Char `json:"attalign"` // attalign
  288. Attnotnull bool `json:"attnotnull"` // attnotnull
  289. Atthasdef bool `json:"atthasdef"` // atthasdef
  290. Atthasmissing bool `json:"atthasmissing"` // atthasmissing
  291. Attidentity pgtypes.Char `json:"attidentity"` // attidentity
  292. Attgenerated pgtypes.Char `json:"attgenerated"` // attgenerated
  293. Attisdropped bool `json:"attisdropped"` // attisdropped
  294. Attislocal bool `json:"attislocal"` // attislocal
  295. Attinhcount int `json:"attinhcount"` // attinhcount
  296. Attcollation pgtypes.Oid `json:"attcollation"` // attcollation
  297. Attacl []pgtypes.NullAclitem `json:"attacl"` // attacl
  298. Attoptions []sql.NullString `json:"attoptions"` // attoptions
  299. Attfdwoptions []sql.NullString `json:"attfdwoptions"` // attfdwoptions
  300. Attmissingval pgtypes.NullAnyarray `json:"attmissingval"` // attmissingval
  301. }
  302. // PgAuthMember represents a row from 'pg_catalog.pg_auth_members'.
  303. type PgAuthMember struct {
  304. Tableoid pgtypes.Oid `json:"tableoid"` // tableoid
  305. Cmax pgtypes.Cid `json:"cmax"` // cmax
  306. Xmax pgtypes.Xid `json:"xmax"` // xmax
  307. Cmin pgtypes.Cid `json:"cmin"` // cmin
  308. Xmin pgtypes.Xid `json:"xmin"` // xmin
  309. Ctid pgtypes.Tid `json:"ctid"` // ctid
  310. Roleid pgtypes.Oid `json:"roleid"` // roleid
  311. Member pgtypes.Oid `json:"member"` // member
  312. Grantor pgtypes.Oid `json:"grantor"` // grantor
  313. AdminOption bool `json:"admin_option"` // admin_option
  314. }
  315. // PgAuthid represents a row from 'pg_catalog.pg_authid'.
  316. type PgAuthid struct {
  317. Tableoid pgtypes.Oid `json:"tableoid"` // tableoid
  318. Cmax pgtypes.Cid `json:"cmax"` // cmax
  319. Xmax pgtypes.Xid `json:"xmax"` // xmax
  320. Cmin pgtypes.Cid `json:"cmin"` // cmin
  321. Xmin pgtypes.Xid `json:"xmin"` // xmin
  322. Ctid pgtypes.Tid `json:"ctid"` // ctid
  323. Oid pgtypes.Oid `json:"oid"` // oid
  324. Rolname string `json:"rolname"` // rolname
  325. Rolsuper bool `json:"rolsuper"` // rolsuper
  326. Rolinherit bool `json:"rolinherit"` // rolinherit
  327. Rolcreaterole bool `json:"rolcreaterole"` // rolcreaterole
  328. Rolcreatedb bool `json:"rolcreatedb"` // rolcreatedb
  329. Rolcanlogin bool `json:"rolcanlogin"` // rolcanlogin
  330. Rolreplication bool `json:"rolreplication"` // rolreplication
  331. Rolbypassrls bool `json:"rolbypassrls"` // rolbypassrls
  332. Rolconnlimit int `json:"rolconnlimit"` // rolconnlimit
  333. Rolpassword sql.NullString `json:"rolpassword"` // rolpassword
  334. Rolvaliduntil sql.NullTime `json:"rolvaliduntil"` // rolvaliduntil
  335. }
  336. // PgAvailableExtension represents a row from 'pg_catalog.pg_available_extensions'.
  337. type PgAvailableExtension struct {
  338. Name sql.NullString `json:"name"` // name
  339. DefaultVersion sql.NullString `json:"default_version"` // default_version
  340. InstalledVersion sql.NullString `json:"installed_version"` // installed_version
  341. Comment sql.NullString `json:"comment"` // comment
  342. }
  343. // PgAvailableExtensionVersion represents a row from 'pg_catalog.pg_available_extension_versions'.
  344. type PgAvailableExtensionVersion struct {
  345. Name sql.NullString `json:"name"` // name
  346. Version sql.NullString `json:"version"` // version
  347. Installed sql.NullBool `json:"installed"` // installed
  348. Superuser sql.NullBool `json:"superuser"` // superuser
  349. Trusted sql.NullBool `json:"trusted"` // trusted
  350. Relocatable sql.NullBool `json:"relocatable"` // relocatable
  351. Schema sql.NullString `json:"schema"` // schema
  352. Requires []sql.NullString `json:"requires"` // requires
  353. Comment sql.NullString `json:"comment"` // comment
  354. }
  355. // PgCast represents a row from 'pg_catalog.pg_cast'.
  356. type PgCast struct {
  357. Tableoid pgtypes.Oid `json:"tableoid"` // tableoid
  358. Cmax pgtypes.Cid `json:"cmax"` // cmax
  359. Xmax pgtypes.Xid `json:"xmax"` // xmax
  360. Cmin pgtypes.Cid `json:"cmin"` // cmin
  361. Xmin pgtypes.Xid `json:"xmin"` // xmin
  362. Ctid pgtypes.Tid `json:"ctid"` // ctid
  363. Oid pgtypes.Oid `json:"oid"` // oid
  364. Castsource pgtypes.Oid `json:"castsource"` // castsource
  365. Casttarget pgtypes.Oid `json:"casttarget"` // casttarget
  366. Castfunc pgtypes.Oid `json:"castfunc"` // castfunc
  367. Castcontext pgtypes.Char `json:"castcontext"` // castcontext
  368. Castmethod pgtypes.Char `json:"castmethod"` // castmethod
  369. }
  370. // PgClass represents a row from 'pg_catalog.pg_class'.
  371. type PgClass struct {
  372. Tableoid pgtypes.Oid `json:"tableoid"` // tableoid
  373. Cmax pgtypes.Cid `json:"cmax"` // cmax
  374. Xmax pgtypes.Xid `json:"xmax"` // xmax
  375. Cmin pgtypes.Cid `json:"cmin"` // cmin
  376. Xmin pgtypes.Xid `json:"xmin"` // xmin
  377. Ctid pgtypes.Tid `json:"ctid"` // ctid
  378. Oid pgtypes.Oid `json:"oid"` // oid
  379. Relname string `json:"relname"` // relname
  380. Relnamespace pgtypes.Oid `json:"relnamespace"` // relnamespace
  381. Reltype pgtypes.Oid `json:"reltype"` // reltype
  382. Reloftype pgtypes.Oid `json:"reloftype"` // reloftype
  383. Relowner pgtypes.Oid `json:"relowner"` // relowner
  384. Relam pgtypes.Oid `json:"relam"` // relam
  385. Relfilenode pgtypes.Oid `json:"relfilenode"` // relfilenode
  386. Reltablespace pgtypes.Oid `json:"reltablespace"` // reltablespace
  387. Relpages int `json:"relpages"` // relpages
  388. Reltuples float32 `json:"reltuples"` // reltuples
  389. Relallvisible int `json:"relallvisible"` // relallvisible
  390. Reltoastrelid pgtypes.Oid `json:"reltoastrelid"` // reltoastrelid
  391. Relhasindex bool `json:"relhasindex"` // relhasindex
  392. Relisshared bool `json:"relisshared"` // relisshared
  393. Relpersistence pgtypes.Char `json:"relpersistence"` // relpersistence
  394. Relkind pgtypes.Char `json:"relkind"` // relkind
  395. Relnatts int16 `json:"relnatts"` // relnatts
  396. Relchecks int16 `json:"relchecks"` // relchecks
  397. Relhasrules bool `json:"relhasrules"` // relhasrules
  398. Relhastriggers bool `json:"relhastriggers"` // relhastriggers
  399. Relhassubclass bool `json:"relhassubclass"` // relhassubclass
  400. Relrowsecurity bool `json:"relrowsecurity"` // relrowsecurity
  401. Relforcerowsecurity bool `json:"relforcerowsecurity"` // relforcerowsecurity
  402. Relispopulated bool `json:"relispopulated"` // relispopulated
  403. Relreplident pgtypes.Char `json:"relreplident"` // relreplident
  404. Relispartition bool `json:"relispartition"` // relispartition
  405. Relrewrite pgtypes.Oid `json:"relrewrite"` // relrewrite
  406. Relfrozenxid pgtypes.Xid `json:"relfrozenxid"` // relfrozenxid
  407. Relminmxid pgtypes.Xid `json:"relminmxid"` // relminmxid
  408. Relacl []pgtypes.NullAclitem `json:"relacl"` // relacl
  409. Reloptions []sql.NullString `json:"reloptions"` // reloptions
  410. Relpartbound pgtypes.NullPgNodeTree `json:"relpartbound"` // relpartbound
  411. }
  412. // PgCollation represents a row from 'pg_catalog.pg_collation'.
  413. type PgCollation struct {
  414. Tableoid pgtypes.Oid `json:"tableoid"` // tableoid
  415. Cmax pgtypes.Cid `json:"cmax"` // cmax
  416. Xmax pgtypes.Xid `json:"xmax"` // xmax
  417. Cmin pgtypes.Cid `json:"cmin"` // cmin
  418. Xmin pgtypes.Xid `json:"xmin"` // xmin
  419. Ctid pgtypes.Tid `json:"ctid"` // ctid
  420. Oid pgtypes.Oid `json:"oid"` // oid
  421. Collname string `json:"collname"` // collname
  422. Collnamespace pgtypes.Oid `json:"collnamespace"` // collnamespace
  423. Collowner pgtypes.Oid `json:"collowner"` // collowner
  424. Collprovider pgtypes.Char `json:"collprovider"` // collprovider
  425. Collisdeterministic bool `json:"collisdeterministic"` // collisdeterministic
  426. Collencoding int `json:"collencoding"` // collencoding
  427. Collcollate string `json:"collcollate"` // collcollate
  428. Collctype string `json:"collctype"` // collctype
  429. Collversion sql.NullString `json:"collversion"` // collversion
  430. }
  431. // PgConfig represents a row from 'pg_catalog.pg_config'.
  432. type PgConfig struct {
  433. Name sql.NullString `json:"name"` // name
  434. Setting sql.NullString `json:"setting"` // setting
  435. }
  436. // PgConstraint represents a row from 'pg_catalog.pg_constraint'.
  437. type PgConstraint struct {
  438. Tableoid pgtypes.Oid `json:"tableoid"` // tableoid
  439. Cmax pgtypes.Cid `json:"cmax"` // cmax
  440. Xmax pgtypes.Xid `json:"xmax"` // xmax
  441. Cmin pgtypes.Cid `json:"cmin"` // cmin
  442. Xmin pgtypes.Xid `json:"xmin"` // xmin
  443. Ctid pgtypes.Tid `json:"ctid"` // ctid
  444. Oid pgtypes.Oid `json:"oid"` // oid
  445. Conname string `json:"conname"` // conname
  446. Connamespace pgtypes.Oid `json:"connamespace"` // connamespace
  447. Contype pgtypes.Char `json:"contype"` // contype
  448. Condeferrable bool `json:"condeferrable"` // condeferrable
  449. Condeferred bool `json:"condeferred"` // condeferred
  450. Convalidated bool `json:"convalidated"` // convalidated
  451. Conrelid pgtypes.Oid `json:"conrelid"` // conrelid
  452. Contypid pgtypes.Oid `json:"contypid"` // contypid
  453. Conindid pgtypes.Oid `json:"conindid"` // conindid
  454. Conparentid pgtypes.Oid `json:"conparentid"` // conparentid
  455. Confrelid pgtypes.Oid `json:"confrelid"` // confrelid
  456. Confupdtype pgtypes.Char `json:"confupdtype"` // confupdtype
  457. Confdeltype pgtypes.Char `json:"confdeltype"` // confdeltype
  458. Confmatchtype pgtypes.Char `json:"confmatchtype"` // confmatchtype
  459. Conislocal bool `json:"conislocal"` // conislocal
  460. Coninhcount int `json:"coninhcount"` // coninhcount
  461. Connoinherit bool `json:"connoinherit"` // connoinherit
  462. Conkey []sql.NullInt64 `json:"conkey"` // conkey
  463. Confkey []sql.NullInt64 `json:"confkey"` // confkey
  464. Conpfeqop []pgtypes.NullOid `json:"conpfeqop"` // conpfeqop
  465. Conppeqop []pgtypes.NullOid `json:"conppeqop"` // conppeqop
  466. Conffeqop []pgtypes.NullOid `json:"conffeqop"` // conffeqop
  467. Conexclop []pgtypes.NullOid `json:"conexclop"` // conexclop
  468. Conbin pgtypes.NullPgNodeTree `json:"conbin"` // conbin
  469. }
  470. // PgConversion represents a row from 'pg_catalog.pg_conversion'.
  471. type PgConversion struct {
  472. Tableoid pgtypes.Oid `json:"tableoid"` // tableoid
  473. Cmax pgtypes.Cid `json:"cmax"` // cmax
  474. Xmax pgtypes.Xid `json:"xmax"` // xmax
  475. Cmin pgtypes.Cid `json:"cmin"` // cmin
  476. Xmin pgtypes.Xid `json:"xmin"` // xmin
  477. Ctid pgtypes.Tid `json:"ctid"` // ctid
  478. Oid pgtypes.Oid `json:"oid"` // oid
  479. Conname string `json:"conname"` // conname
  480. Connamespace pgtypes.Oid `json:"connamespace"` // connamespace
  481. Conowner pgtypes.Oid `json:"conowner"` // conowner
  482. Conforencoding int `json:"conforencoding"` // conforencoding
  483. Contoencoding int `json:"contoencoding"` // contoencoding
  484. Conproc pgtypes.Regproc `json:"conproc"` // conproc
  485. Condefault bool `json:"condefault"` // condefault
  486. }
  487. // PgCursor represents a row from 'pg_catalog.pg_cursors'.
  488. type PgCursor struct {
  489. Name sql.NullString `json:"name"` // name
  490. Statement sql.NullString `json:"statement"` // statement
  491. IsHoldable sql.NullBool `json:"is_holdable"` // is_holdable
  492. IsBinary sql.NullBool `json:"is_binary"` // is_binary
  493. IsScrollable sql.NullBool `json:"is_scrollable"` // is_scrollable
  494. CreationTime sql.NullTime `json:"creation_time"` // creation_time
  495. }
  496. // PgDatabase represents a row from 'pg_catalog.pg_database'.
  497. type PgDatabase struct {
  498. Tableoid pgtypes.Oid `json:"tableoid"` // tableoid
  499. Cmax pgtypes.Cid `json:"cmax"` // cmax
  500. Xmax pgtypes.Xid `json:"xmax"` // xmax
  501. Cmin pgtypes.Cid `json:"cmin"` // cmin
  502. Xmin pgtypes.Xid `json:"xmin"` // xmin
  503. Ctid pgtypes.Tid `json:"ctid"` // ctid
  504. Oid pgtypes.Oid `json:"oid"` // oid
  505. Datname string `json:"datname"` // datname
  506. Datdba pgtypes.Oid `json:"datdba"` // datdba
  507. Encoding int `json:"encoding"` // encoding
  508. Datcollate string `json:"datcollate"` // datcollate
  509. Datctype string `json:"datctype"` // datctype
  510. Datistemplate bool `json:"datistemplate"` // datistemplate
  511. Datallowconn bool `json:"datallowconn"` // datallowconn
  512. Datconnlimit int `json:"datconnlimit"` // datconnlimit
  513. Datlastsysoid pgtypes.Oid `json:"datlastsysoid"` // datlastsysoid
  514. Datfrozenxid pgtypes.Xid `json:"datfrozenxid"` // datfrozenxid
  515. Datminmxid pgtypes.Xid `json:"datminmxid"` // datminmxid
  516. Dattablespace pgtypes.Oid `json:"dattablespace"` // dattablespace
  517. Datacl []pgtypes.NullAclitem `json:"datacl"` // datacl
  518. }
  519. // PgDbRoleSetting represents a row from 'pg_catalog.pg_db_role_setting'.
  520. type PgDbRoleSetting struct {
  521. Tableoid pgtypes.Oid `json:"tableoid"` // tableoid
  522. Cmax pgtypes.Cid `json:"cmax"` // cmax
  523. Xmax pgtypes.Xid `json:"xmax"` // xmax
  524. Cmin pgtypes.Cid `json:"cmin"` // cmin
  525. Xmin pgtypes.Xid `json:"xmin"` // xmin
  526. Ctid pgtypes.Tid `json:"ctid"` // ctid
  527. Setdatabase pgtypes.Oid `json:"setdatabase"` // setdatabase
  528. Setrole pgtypes.Oid `json:"setrole"` // setrole
  529. Setconfig []sql.NullString `json:"setconfig"` // setconfig
  530. }
  531. // PgDefaultACL represents a row from 'pg_catalog.pg_default_acl'.
  532. type PgDefaultACL struct {
  533. Tableoid pgtypes.Oid `json:"tableoid"` // tableoid
  534. Cmax pgtypes.Cid `json:"cmax"` // cmax
  535. Xmax pgtypes.Xid `json:"xmax"` // xmax
  536. Cmin pgtypes.Cid `json:"cmin"` // cmin
  537. Xmin pgtypes.Xid `json:"xmin"` // xmin
  538. Ctid pgtypes.Tid `json:"ctid"` // ctid
  539. Oid pgtypes.Oid `json:"oid"` // oid
  540. Defaclrole pgtypes.Oid `json:"defaclrole"` // defaclrole
  541. Defaclnamespace pgtypes.Oid `json:"defaclnamespace"` // defaclnamespace
  542. Defaclobjtype pgtypes.Char `json:"defaclobjtype"` // defaclobjtype
  543. Defaclacl []pgtypes.Aclitem `json:"defaclacl"` // defaclacl
  544. }
  545. // PgDepend represents a row from 'pg_catalog.pg_depend'.
  546. type PgDepend struct {
  547. Tableoid pgtypes.Oid `json:"tableoid"` // tableoid
  548. Cmax pgtypes.Cid `json:"cmax"` // cmax
  549. Xmax pgtypes.Xid `json:"xmax"` // xmax
  550. Cmin pgtypes.Cid `json:"cmin"` // cmin
  551. Xmin pgtypes.Xid `json:"xmin"` // xmin
  552. Ctid pgtypes.Tid `json:"ctid"` // ctid
  553. Classid pgtypes.Oid `json:"classid"` // classid
  554. Objid pgtypes.Oid `json:"objid"` // objid
  555. Objsubid int `json:"objsubid"` // objsubid
  556. Refclassid pgtypes.Oid `json:"refclassid"` // refclassid
  557. Refobjid pgtypes.Oid `json:"refobjid"` // refobjid
  558. Refobjsubid int `json:"refobjsubid"` // refobjsubid
  559. Deptype pgtypes.Char `json:"deptype"` // deptype
  560. }
  561. // PgDescription represents a row from 'pg_catalog.pg_description'.
  562. type PgDescription struct {
  563. Tableoid pgtypes.Oid `json:"tableoid"` // tableoid
  564. Cmax pgtypes.Cid `json:"cmax"` // cmax
  565. Xmax pgtypes.Xid `json:"xmax"` // xmax
  566. Cmin pgtypes.Cid `json:"cmin"` // cmin
  567. Xmin pgtypes.Xid `json:"xmin"` // xmin
  568. Ctid pgtypes.Tid `json:"ctid"` // ctid
  569. Objoid pgtypes.Oid `json:"objoid"` // objoid
  570. Classoid pgtypes.Oid `json:"classoid"` // classoid
  571. Objsubid int `json:"objsubid"` // objsubid
  572. Description string `json:"description"` // description
  573. }
  574. // PgEnum represents a row from 'pg_catalog.pg_enum'.
  575. type PgEnum struct {
  576. Tableoid pgtypes.Oid `json:"tableoid"` // tableoid
  577. Cmax pgtypes.Cid `json:"cmax"` // cmax
  578. Xmax pgtypes.Xid `json:"xmax"` // xmax
  579. Cmin pgtypes.Cid `json:"cmin"` // cmin
  580. Xmin pgtypes.Xid `json:"xmin"` // xmin
  581. Ctid pgtypes.Tid `json:"ctid"` // ctid
  582. Oid pgtypes.Oid `json:"oid"` // oid
  583. Enumtypid pgtypes.Oid `json:"enumtypid"` // enumtypid
  584. Enumsortorder float32 `json:"enumsortorder"` // enumsortorder
  585. Enumlabel string `json:"enumlabel"` // enumlabel
  586. }
  587. // PgEventTrigger represents a row from 'pg_catalog.pg_event_trigger'.
  588. type PgEventTrigger struct {
  589. Tableoid pgtypes.Oid `json:"tableoid"` // tableoid
  590. Cmax pgtypes.Cid `json:"cmax"` // cmax
  591. Xmax pgtypes.Xid `json:"xmax"` // xmax
  592. Cmin pgtypes.Cid `json:"cmin"` // cmin
  593. Xmin pgtypes.Xid `json:"xmin"` // xmin
  594. Ctid pgtypes.Tid `json:"ctid"` // ctid
  595. Oid pgtypes.Oid `json:"oid"` // oid
  596. Evtname string `json:"evtname"` // evtname
  597. Evtevent string `json:"evtevent"` // evtevent
  598. Evtowner pgtypes.Oid `json:"evtowner"` // evtowner
  599. Evtfoid pgtypes.Oid `json:"evtfoid"` // evtfoid
  600. Evtenabled pgtypes.Char `json:"evtenabled"` // evtenabled
  601. Evttags []sql.NullString `json:"evttags"` // evttags
  602. }
  603. // PgExtension represents a row from 'pg_catalog.pg_extension'.
  604. type PgExtension struct {
  605. Tableoid pgtypes.Oid `json:"tableoid"` // tableoid
  606. Cmax pgtypes.Cid `json:"cmax"` // cmax
  607. Xmax pgtypes.Xid `json:"xmax"` // xmax
  608. Cmin pgtypes.Cid `json:"cmin"` // cmin
  609. Xmin pgtypes.Xid `json:"xmin"` // xmin
  610. Ctid pgtypes.Tid `json:"ctid"` // ctid
  611. Oid pgtypes.Oid `json:"oid"` // oid
  612. Extname string `json:"extname"` // extname
  613. Extowner pgtypes.Oid `json:"extowner"` // extowner
  614. Extnamespace pgtypes.Oid `json:"extnamespace"` // extnamespace
  615. Extrelocatable bool `json:"extrelocatable"` // extrelocatable
  616. Extversion string `json:"extversion"` // extversion
  617. Extconfig []pgtypes.NullOid `json:"extconfig"` // extconfig
  618. Extcondition []sql.NullString `json:"extcondition"` // extcondition
  619. }
  620. // PgFileSetting represents a row from 'pg_catalog.pg_file_settings'.
  621. type PgFileSetting struct {
  622. Sourcefile sql.NullString `json:"sourcefile"` // sourcefile
  623. Sourceline sql.NullInt64 `json:"sourceline"` // sourceline
  624. Seqno sql.NullInt64 `json:"seqno"` // seqno
  625. Name sql.NullString `json:"name"` // name
  626. Setting sql.NullString `json:"setting"` // setting
  627. Applied sql.NullBool `json:"applied"` // applied
  628. Error sql.NullString `json:"error"` // error
  629. }
  630. // PgForeignDataWrapper represents a row from 'pg_catalog.pg_foreign_data_wrapper'.
  631. type PgForeignDataWrapper struct {
  632. Tableoid pgtypes.Oid `json:"tableoid"` // tableoid
  633. Cmax pgtypes.Cid `json:"cmax"` // cmax
  634. Xmax pgtypes.Xid `json:"xmax"` // xmax
  635. Cmin pgtypes.Cid `json:"cmin"` // cmin
  636. Xmin pgtypes.Xid `json:"xmin"` // xmin
  637. Ctid pgtypes.Tid `json:"ctid"` // ctid
  638. Oid pgtypes.Oid `json:"oid"` // oid
  639. Fdwname string `json:"fdwname"` // fdwname
  640. Fdwowner pgtypes.Oid `json:"fdwowner"` // fdwowner
  641. Fdwhandler pgtypes.Oid `json:"fdwhandler"` // fdwhandler
  642. Fdwvalidator pgtypes.Oid `json:"fdwvalidator"` // fdwvalidator
  643. Fdwacl []pgtypes.NullAclitem `json:"fdwacl"` // fdwacl
  644. Fdwoptions []sql.NullString `json:"fdwoptions"` // fdwoptions
  645. }
  646. // PgForeignServer represents a row from 'pg_catalog.pg_foreign_server'.
  647. type PgForeignServer struct {
  648. Tableoid pgtypes.Oid `json:"tableoid"` // tableoid
  649. Cmax pgtypes.Cid `json:"cmax"` // cmax
  650. Xmax pgtypes.Xid `json:"xmax"` // xmax
  651. Cmin pgtypes.Cid `json:"cmin"` // cmin
  652. Xmin pgtypes.Xid `json:"xmin"` // xmin
  653. Ctid pgtypes.Tid `json:"ctid"` // ctid
  654. Oid pgtypes.Oid `json:"oid"` // oid
  655. Srvname string `json:"srvname"` // srvname
  656. Srvowner pgtypes.Oid `json:"srvowner"` // srvowner
  657. Srvfdw pgtypes.Oid `json:"srvfdw"` // srvfdw
  658. Srvtype sql.NullString `json:"srvtype"` // srvtype
  659. Srvversion sql.NullString `json:"srvversion"` // srvversion
  660. Srvacl []pgtypes.NullAclitem `json:"srvacl"` // srvacl
  661. Srvoptions []sql.NullString `json:"srvoptions"` // srvoptions
  662. }
  663. // PgForeignTable represents a row from 'pg_catalog.pg_foreign_table'.
  664. type PgForeignTable struct {
  665. Tableoid pgtypes.Oid `json:"tableoid"` // tableoid
  666. Cmax pgtypes.Cid `json:"cmax"` // cmax
  667. Xmax pgtypes.Xid `json:"xmax"` // xmax
  668. Cmin pgtypes.Cid `json:"cmin"` // cmin
  669. Xmin pgtypes.Xid `json:"xmin"` // xmin
  670. Ctid pgtypes.Tid `json:"ctid"` // ctid
  671. Ftrelid pgtypes.Oid `json:"ftrelid"` // ftrelid
  672. Ftserver pgtypes.Oid `json:"ftserver"` // ftserver
  673. Ftoptions []sql.NullString `json:"ftoptions"` // ftoptions
  674. }
  675. // PgGroup represents a row from 'pg_catalog.pg_group'.
  676. type PgGroup struct {
  677. Groname sql.NullString `json:"groname"` // groname
  678. Grosysid pgtypes.NullOid `json:"grosysid"` // grosysid
  679. Grolist []pgtypes.NullOid `json:"grolist"` // grolist
  680. }
  681. // PgHbaFileRule represents a row from 'pg_catalog.pg_hba_file_rules'.
  682. type PgHbaFileRule struct {
  683. LineNumber sql.NullInt64 `json:"line_number"` // line_number
  684. Type sql.NullString `json:"type"` // type
  685. Database []sql.NullString `json:"database"` // database
  686. UserName []sql.NullString `json:"user_name"` // user_name
  687. Address sql.NullString `json:"address"` // address
  688. Netmask sql.NullString `json:"netmask"` // netmask
  689. AuthMethod sql.NullString `json:"auth_method"` // auth_method
  690. Options []sql.NullString `json:"options"` // options
  691. Error sql.NullString `json:"error"` // error
  692. }
  693. // PgIndex represents a row from 'pg_catalog.pg_indexes'.
  694. type PgIndex struct {
  695. Schemaname sql.NullString `json:"schemaname"` // schemaname
  696. Tablename sql.NullString `json:"tablename"` // tablename
  697. Indexname sql.NullString `json:"indexname"` // indexname
  698. Tablespace sql.NullString `json:"tablespace"` // tablespace
  699. Indexdef sql.NullString `json:"indexdef"` // indexdef
  700. }
  701. // PgIndex represents a row from 'pg_catalog.pg_index'.
  702. type PgIndex struct {
  703. Tableoid pgtypes.Oid `json:"tableoid"` // tableoid
  704. Cmax pgtypes.Cid `json:"cmax"` // cmax
  705. Xmax pgtypes.Xid `json:"xmax"` // xmax
  706. Cmin pgtypes.Cid `json:"cmin"` // cmin
  707. Xmin pgtypes.Xid `json:"xmin"` // xmin
  708. Ctid pgtypes.Tid `json:"ctid"` // ctid
  709. Indexrelid pgtypes.Oid `json:"indexrelid"` // indexrelid
  710. Indrelid pgtypes.Oid `json:"indrelid"` // indrelid
  711. Indnatts int16 `json:"indnatts"` // indnatts
  712. Indnkeyatts int16 `json:"indnkeyatts"` // indnkeyatts
  713. Indisunique bool `json:"indisunique"` // indisunique
  714. Indisprimary bool `json:"indisprimary"` // indisprimary
  715. Indisexclusion bool `json:"indisexclusion"` // indisexclusion
  716. Indimmediate bool `json:"indimmediate"` // indimmediate
  717. Indisclustered bool `json:"indisclustered"` // indisclustered
  718. Indisvalid bool `json:"indisvalid"` // indisvalid
  719. Indcheckxmin bool `json:"indcheckxmin"` // indcheckxmin
  720. Indisready bool `json:"indisready"` // indisready
  721. Indislive bool `json:"indislive"` // indislive
  722. Indisreplident bool `json:"indisreplident"` // indisreplident
  723. Indkey pgtypes.Int2vector `json:"indkey"` // indkey
  724. Indcollation pgtypes.Oidvector `json:"indcollation"` // indcollation
  725. Indclass pgtypes.Oidvector `json:"indclass"` // indclass
  726. Indoption pgtypes.Int2vector `json:"indoption"` // indoption
  727. Indexprs pgtypes.NullPgNodeTree `json:"indexprs"` // indexprs
  728. Indpred pgtypes.NullPgNodeTree `json:"indpred"` // indpred
  729. }
  730. // PgInherit represents a row from 'pg_catalog.pg_inherits'.
  731. type PgInherit struct {
  732. Tableoid pgtypes.Oid `json:"tableoid"` // tableoid
  733. Cmax pgtypes.Cid `json:"cmax"` // cmax
  734. Xmax pgtypes.Xid `json:"xmax"` // xmax
  735. Cmin pgtypes.Cid `json:"cmin"` // cmin
  736. Xmin pgtypes.Xid `json:"xmin"` // xmin
  737. Ctid pgtypes.Tid `json:"ctid"` // ctid
  738. Inhrelid pgtypes.Oid `json:"inhrelid"` // inhrelid
  739. Inhparent pgtypes.Oid `json:"inhparent"` // inhparent
  740. Inhseqno int `json:"inhseqno"` // inhseqno
  741. }
  742. // PgInitPriv represents a row from 'pg_catalog.pg_init_privs'.
  743. type PgInitPriv struct {
  744. Tableoid pgtypes.Oid `json:"tableoid"` // tableoid
  745. Cmax pgtypes.Cid `json:"cmax"` // cmax
  746. Xmax pgtypes.Xid `json:"xmax"` // xmax
  747. Cmin pgtypes.Cid `json:"cmin"` // cmin
  748. Xmin pgtypes.Xid `json:"xmin"` // xmin
  749. Ctid pgtypes.Tid `json:"ctid"` // ctid
  750. Objoid pgtypes.Oid `json:"objoid"` // objoid
  751. Classoid pgtypes.Oid `json:"classoid"` // classoid
  752. Objsubid int `json:"objsubid"` // objsubid
  753. Privtype pgtypes.Char `json:"privtype"` // privtype
  754. Initprivs []pgtypes.Aclitem `json:"initprivs"` // initprivs
  755. }
  756. // PgLanguage represents a row from 'pg_catalog.pg_language'.
  757. type PgLanguage struct {
  758. Tableoid pgtypes.Oid `json:"tableoid"` // tableoid
  759. Cmax pgtypes.Cid `json:"cmax"` // cmax
  760. Xmax pgtypes.Xid `json:"xmax"` // xmax
  761. Cmin pgtypes.Cid `json:"cmin"` // cmin
  762. Xmin pgtypes.Xid `json:"xmin"` // xmin
  763. Ctid pgtypes.Tid `json:"ctid"` // ctid
  764. Oid pgtypes.Oid `json:"oid"` // oid
  765. Lanname string `json:"lanname"` // lanname
  766. Lanowner pgtypes.Oid `json:"lanowner"` // lanowner
  767. Lanispl bool `json:"lanispl"` // lanispl
  768. Lanpltrusted bool `json:"lanpltrusted"` // lanpltrusted
  769. Lanplcallfoid pgtypes.Oid `json:"lanplcallfoid"` // lanplcallfoid
  770. Laninline pgtypes.Oid `json:"laninline"` // laninline
  771. Lanvalidator pgtypes.Oid `json:"lanvalidator"` // lanvalidator
  772. Lanacl []pgtypes.NullAclitem `json:"lanacl"` // lanacl
  773. }
  774. // PgLargeobject represents a row from 'pg_catalog.pg_largeobject'.
  775. type PgLargeobject struct {
  776. Tableoid pgtypes.Oid `json:"tableoid"` // tableoid
  777. Cmax pgtypes.Cid `json:"cmax"` // cmax
  778. Xmax pgtypes.Xid `json:"xmax"` // xmax
  779. Cmin pgtypes.Cid `json:"cmin"` // cmin
  780. Xmin pgtypes.Xid `json:"xmin"` // xmin
  781. Ctid pgtypes.Tid `json:"ctid"` // ctid
  782. Loid pgtypes.Oid `json:"loid"` // loid
  783. Pageno int `json:"pageno"` // pageno
  784. Data []byte `json:"data"` // data
  785. }
  786. // PgLargeobjectMetadatum represents a row from 'pg_catalog.pg_largeobject_metadata'.
  787. type PgLargeobjectMetadatum struct {
  788. Tableoid pgtypes.Oid `json:"tableoid"` // tableoid
  789. Cmax pgtypes.Cid `json:"cmax"` // cmax
  790. Xmax pgtypes.Xid `json:"xmax"` // xmax
  791. Cmin pgtypes.Cid `json:"cmin"` // cmin
  792. Xmin pgtypes.Xid `json:"xmin"` // xmin
  793. Ctid pgtypes.Tid `json:"ctid"` // ctid
  794. Oid pgtypes.Oid `json:"oid"` // oid
  795. Lomowner pgtypes.Oid `json:"lomowner"` // lomowner
  796. Lomacl []pgtypes.NullAclitem `json:"lomacl"` // lomacl
  797. }
  798. // PgLock represents a row from 'pg_catalog.pg_locks'.
  799. type PgLock struct {
  800. Locktype sql.NullString `json:"locktype"` // locktype
  801. Database pgtypes.NullOid `json:"database"` // database
  802. Relation pgtypes.NullOid `json:"relation"` // relation
  803. Page sql.NullInt64 `json:"page"` // page
  804. Tuple sql.NullInt64 `json:"tuple"` // tuple
  805. Virtualxid sql.NullString `json:"virtualxid"` // virtualxid
  806. Transactionid pgtypes.NullXid `json:"transactionid"` // transactionid
  807. Classid pgtypes.NullOid `json:"classid"` // classid
  808. Objid pgtypes.NullOid `json:"objid"` // objid
  809. Objsubid sql.NullInt64 `json:"objsubid"` // objsubid
  810. Virtualtransaction sql.NullString `json:"virtualtransaction"` // virtualtransaction
  811. Pid sql.NullInt64 `json:"pid"` // pid
  812. Mode sql.NullString `json:"mode"` // mode
  813. Granted sql.NullBool `json:"granted"` // granted
  814. Fastpath sql.NullBool `json:"fastpath"` // fastpath
  815. }
  816. // PgMatview represents a row from 'pg_catalog.pg_matviews'.
  817. type PgMatview struct {
  818. Schemaname sql.NullString `json:"schemaname"` // schemaname
  819. Matviewname sql.NullString `json:"matviewname"` // matviewname
  820. Matviewowner sql.NullString `json:"matviewowner"` // matviewowner
  821. Tablespace sql.NullString `json:"tablespace"` // tablespace
  822. Hasindexes sql.NullBool `json:"hasindexes"` // hasindexes
  823. Ispopulated sql.NullBool `json:"ispopulated"` // ispopulated
  824. Definition sql.NullString `json:"definition"` // definition
  825. }
  826. // PgNamespace represents a row from 'pg_catalog.pg_namespace'.
  827. type PgNamespace struct {
  828. Tableoid pgtypes.Oid `json:"tableoid"` // tableoid
  829. Cmax pgtypes.Cid `json:"cmax"` // cmax
  830. Xmax pgtypes.Xid `json:"xmax"` // xmax
  831. Cmin pgtypes.Cid `json:"cmin"` // cmin
  832. Xmin pgtypes.Xid `json:"xmin"` // xmin
  833. Ctid pgtypes.Tid `json:"ctid"` // ctid
  834. Oid pgtypes.Oid `json:"oid"` // oid
  835. Nspname string `json:"nspname"` // nspname
  836. Nspowner pgtypes.Oid `json:"nspowner"` // nspowner
  837. Nspacl []pgtypes.NullAclitem `json:"nspacl"` // nspacl
  838. }
  839. // PgOpclass represents a row from 'pg_catalog.pg_opclass'.
  840. type PgOpclass struct {
  841. Tableoid pgtypes.Oid `json:"tableoid"` // tableoid
  842. Cmax pgtypes.Cid `json:"cmax"` // cmax
  843. Xmax pgtypes.Xid `json:"xmax"` // xmax
  844. Cmin pgtypes.Cid `json:"cmin"` // cmin
  845. Xmin pgtypes.Xid `json:"xmin"` // xmin
  846. Ctid pgtypes.Tid `json:"ctid"` // ctid
  847. Oid pgtypes.Oid `json:"oid"` // oid
  848. Opcmethod pgtypes.Oid `json:"opcmethod"` // opcmethod
  849. Opcname string `json:"opcname"` // opcname
  850. Opcnamespace pgtypes.Oid `json:"opcnamespace"` // opcnamespace
  851. Opcowner pgtypes.Oid `json:"opcowner"` // opcowner
  852. Opcfamily pgtypes.Oid `json:"opcfamily"` // opcfamily
  853. Opcintype pgtypes.Oid `json:"opcintype"` // opcintype
  854. Opcdefault bool `json:"opcdefault"` // opcdefault
  855. Opckeytype pgtypes.Oid `json:"opckeytype"` // opckeytype
  856. }
  857. // PgOperator represents a row from 'pg_catalog.pg_operator'.
  858. type PgOperator struct {
  859. Tableoid pgtypes.Oid `json:"tableoid"` // tableoid
  860. Cmax pgtypes.Cid `json:"cmax"` // cmax
  861. Xmax pgtypes.Xid `json:"xmax"` // xmax
  862. Cmin pgtypes.Cid `json:"cmin"` // cmin
  863. Xmin pgtypes.Xid `json:"xmin"` // xmin
  864. Ctid pgtypes.Tid `json:"ctid"` // ctid
  865. Oid pgtypes.Oid `json:"oid"` // oid
  866. Oprname string `json:"oprname"` // oprname
  867. Oprnamespace pgtypes.Oid `json:"oprnamespace"` // oprnamespace
  868. Oprowner pgtypes.Oid `json:"oprowner"` // oprowner
  869. Oprkind pgtypes.Char `json:"oprkind"` // oprkind
  870. Oprcanmerge bool `json:"oprcanmerge"` // oprcanmerge
  871. Oprcanhash bool `json:"oprcanhash"` // oprcanhash
  872. Oprleft pgtypes.Oid `json:"oprleft"` // oprleft
  873. Oprright pgtypes.Oid `json:"oprright"` // oprright
  874. Oprresult pgtypes.Oid `json:"oprresult"` // oprresult
  875. Oprcom pgtypes.Oid `json:"oprcom"` // oprcom
  876. Oprnegate pgtypes.Oid `json:"oprnegate"` // oprnegate
  877. Oprcode pgtypes.Regproc `json:"oprcode"` // oprcode
  878. Oprrest pgtypes.Regproc `json:"oprrest"` // oprrest
  879. Oprjoin pgtypes.Regproc `json:"oprjoin"` // oprjoin
  880. }
  881. // PgOpfamily represents a row from 'pg_catalog.pg_opfamily'.
  882. type PgOpfamily struct {
  883. Tableoid pgtypes.Oid `json:"tableoid"` // tableoid
  884. Cmax pgtypes.Cid `json:"cmax"` // cmax
  885. Xmax pgtypes.Xid `json:"xmax"` // xmax
  886. Cmin pgtypes.Cid `json:"cmin"` // cmin
  887. Xmin pgtypes.Xid `json:"xmin"` // xmin
  888. Ctid pgtypes.Tid `json:"ctid"` // ctid
  889. Oid pgtypes.Oid `json:"oid"` // oid
  890. Opfmethod pgtypes.Oid `json:"opfmethod"` // opfmethod
  891. Opfname string `json:"opfname"` // opfname
  892. Opfnamespace pgtypes.Oid `json:"opfnamespace"` // opfnamespace
  893. Opfowner pgtypes.Oid `json:"opfowner"` // opfowner
  894. }
  895. // PgPartitionedTable represents a row from 'pg_catalog.pg_partitioned_table'.
  896. type PgPartitionedTable struct {
  897. Tableoid pgtypes.Oid `json:"tableoid"` // tableoid
  898. Cmax pgtypes.Cid `json:"cmax"` // cmax
  899. Xmax pgtypes.Xid `json:"xmax"` // xmax
  900. Cmin pgtypes.Cid `json:"cmin"` // cmin
  901. Xmin pgtypes.Xid `json:"xmin"` // xmin
  902. Ctid pgtypes.Tid `json:"ctid"` // ctid
  903. Partrelid pgtypes.Oid `json:"partrelid"` // partrelid
  904. Partstrat pgtypes.Char `json:"partstrat"` // partstrat
  905. Partnatts int16 `json:"partnatts"` // partnatts
  906. Partdefid pgtypes.Oid `json:"partdefid"` // partdefid
  907. Partattrs pgtypes.Int2vector `json:"partattrs"` // partattrs
  908. Partclass pgtypes.Oidvector `json:"partclass"` // partclass
  909. Partcollation pgtypes.Oidvector `json:"partcollation"` // partcollation
  910. Partexprs pgtypes.NullPgNodeTree `json:"partexprs"` // partexprs
  911. }
  912. // PgPolicy represents a row from 'pg_catalog.pg_policies'.
  913. type PgPolicy struct {
  914. Schemaname sql.NullString `json:"schemaname"` // schemaname
  915. Tablename sql.NullString `json:"tablename"` // tab…

Large files files are truncated, but you can click here to view the full file