!i      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~                                                                      Safe !Common helper functions.Noney"#$%&Logic regarding the '`Content-Range` headers and limitoffset querystring arguments.None6   DPostgREST common types and functions used by the rest of the modulesNone"7dk0  postgrest8Current database connection status data ConnectionStatus postgrestCjspath expression, e.g. .property, .property[0] or ."property-dash" postgrest*full jspath, e.g. .property[0].attr.detail( postgrest+A table alias is used in case of self joins) postgrestLOnly used for Many to Many joins. Parent and Child joins use explicit joins.4 postgrest`Path of the embedded levels, e.g "clients.projects.name=eq.." gives Path ["clients", "projects"]5 postgrestDisambiguates an embedding operation when there's multiple relationships between two tables. | Can be the name of a foreign key constraint, column name or the junction in an m2m relationship.6 postgrest7This type will hold information about which particular o between two tables to choose when there are multiple ones. Specifically, it will contain the name of the foreign key or the join table in many to many relations.7 postgrestuCustom guc header, it's obtained by parsing the json in a: `SET LOCAL "response.headers" = '[{"Set-Cookie": ".."}]'> postgrestRepresents the key( `->'key'` ) or index(`->'1`a::int`), the index is Text because we reuse our escaping functons and let pg do the casting with '1'::intB postgrestRepresents the single arrow `->` or double arrow ->> operatorsF postgrest%Json path operations as specified in >https://www.postgresql.org/docs/9.4/static/functions-json.htmlH postgrestKBoolean logic expression tree e.g. "and(name.eq.N,or(id.eq.1,id.eq.2))" is:TAnd / name.eq.N Or / id.eq.1 id.eq.2N postgrest@Represents a list value in a filter, e.g. id=in.(val1,val2,val3)O postgrest;Represents a single value in a filter, e.g. id=eq.singlevalc postgrest#Cached attributes of a JSON payloade postgrestThis is the raw ByteString that comes from the request body. We cache this instead of an Aeson Value because it was detected that for large payloads the encoding had high memory usage, see #1005 for more detailsg postgrestfKeys of the object or if it's an array these keys are guaranteed to be the same across all its objectsh postgrest%Junction table on an M2M relationshipo postgrestRelationship between two tables. The order of the relColumns and relFColumns should be maintained to get the join conditions right. TODO merge relColumns and relFColumns to a tuple or Data.Bimaps postgrestJust on O2M/M2O, Nothing on M2Mw postgrestJunction for M2M Cardinalityy postgrestThe relationship  8https://en.wikipedia.org/wiki/Cardinality_(data_modeling cardinality). | TODO: missing one-to-onez postgrest(one-to-many, previously known as Parent{ postgrest'many-to-one, previously known as Child| postgrest&many-to-many, previously known as Many} postgrestRepresents a pg identifier with a prepended schema name "schema.table" When qiSchema is "", the schema is defined by the pg search_path postgrest/The source table column a view column refers to postgrestA map of all procs, all of which can be overloaded(one entry will have more than one ProcDescription). | It uses a HashMap for a faster lookup. postgrestexact count(slower) postgrestIPostgreSQL query planner rows count guess. Done by using EXPLAIN {query}. postgrest_use the query planner rows if the count is superior to max-rows, otherwise get the exact count. postgrestAPass all parameters as a single json object to a stored procedure postgrest=Pass an array of json objects as params to a stored procedure postgrest%How to return the mutated data. From /https://tools.ietf.org/html/rfc7240#section-4.2 postgrest:Return the body plus the Location header(in case of POST). postgrestUReturn the Location header(in case of POST). This needs a SELECT privilege on the pk. postgrest%Return nothing from the mutated data. postgrest;A part of a SQL query that cannot be executed independently postgrest.A SQL query that can be executed independently postgrest9Enumeration of currently supported response content types postgrest.Convert from ContentType to a full HTTP Header postgrestCConvert from ContentType to a ByteString representing the mime type postgrestIConvert from ByteString to ContentType. Warning: discards MIME parameters postgrestGSearch a pg procedure by its parameters. Since a function can be overloaded, the name is not enough to find it. An overloaded function can have a different volatility or even a different return type. Ideally, handling overloaded functions should be left to pg itself. But we need to know certain proc attributes in advance. postgrestSearch the procedure parameters by matching them with the specified keys. If the key doesn't match a parameter, a parameter with a default type "text" is assumed. postgrest_Add headers not already included to allow the user to override them instead of duplicating them postgrestJTells the minimum PostgreSQL version required by this version of PostgREST # !"$%-,+*)(&'./0132456789:;<=>@?ABDCEFGHJIKMLNOPQTSRUVWXY]\[Z^`_abdcgfehinmlkjopwvutsrqxy|{z}~}~y|{zxopwvutsrqhinmlkjbdcgfe^`_aXY]\[ZWUVQTSRPONKMLHJIGFBDCE>@?A=<;:9786540132./$%-,+*)(&'# !" ,Helper functions for PostgREST.QueryBuilder.None_yS( postgrest'These CTEs convert a json object into a json array, this way we can use json_populate_recordset for all json payloads Otherwise we'd have to use json_populate_record for json objects and json_populate_recordset for json arrays We do this in SQL to avoid processing the JSON in application code)*(+,-./0123456789:;<=>?@A PostgREST single SQL statements.NoneB postgrestThe generic query result format used by API responses. The location header is represented as a list of strings containing variable bindings like  "k1=eq.42"3, or the empty list if there is no location header.C postgrestRead and Write api requests use a similar response format which includes various record counts and possible location header. This is the decoder for that common type of query.Z[\]Z[\]+PostgREST SQL queries generating functions.None"=>?d%a postgrest'SQL query meant for COUNTing the root node of the Tree. It only takes WHERE into account and doesn't include LIMIT/OFFSET because it would reduce the COUNT. SELECT 1 is done instead of SELECT * to prevent doing expensive operations(like functions based on the columns) inside the FROM target.^_`abcd^_a`bcdPostgREST error HTTP responsesNone=?-enmfghijklopqrswtuvxyz{|}~swtuvxyz{|}qrenmfghijklop~PostgREST parser combinatorsNone##PostgREST schema cacheNone $=>@AX(Manages PostgREST configuration options.NoneX_ postgrest#Config file settings for the server postgrest0CORS policy to be used in by Wai Cors middleware postgrestUser friendly version number postgrestVersion number used in docs postgrest8Function to read and parse options from the command line "PostgREST authorization functions.None>_ postgrest0Possible situations encountered with client JWTs postgrest_Receives the JWT secret and audience (from config) and a JWT and returns a map of JWT claims.D postgresttTurn JWT ClaimSet into something easier to work with, also here the jspath is applied to put the "role" in the map postgrest7Whether a response from jwtClaims contains a role claim postgrestParse  `jwt-secret`- configuration option and turn into a JWKSet. There are three ways to specify  `jwt-secret`: text secret, JSON Web Key (JWK), or JSON Web Key Set (JWKS). The first two are converted into a JWKSet with one key and the last is converted as is.E postgrestKInternal helper to generate a symmetric HMAC-SHA256 JWK from a text secret. QPostgREST functions to translate HTTP request to a domain type called ApiRequest.None_`Ģ postgrest&Describes what the user wants to do. This data type is a translation of the raw elements of an HTTP request into domain specific language. There is no guarantee that the intent is sensible, it is up to a later stage of processing to determine if it is an action we are able to perform. postgrestDSimilar but not identical to HTTP verb, e.g. Create/Invoke both POST postgrest'Requested range of rows within response postgrest*Requested range of rows from the top level postgrest5The target, be it calling a proc or accessing a table postgrestAContent types the client will accept, [CTAny] if no Accept header postgrest1Data sent by client and used for mutation actions postgrest)If client wants created items echoed back postgrest,How to pass parameters to a stored procedure postgrest'Whether the client wants a result count postgrestCWhether the client wants to UPSERT or ignore records on PK conflict postgrest%Filters on the result ("id", "eq.10") postgrest6&and and &or parameters used for complex boolean logic postgrest,&select parameter used to shape the response postgrest=&on_conflict parameter used to upsert on specific unique keys postgrest,&columns parameter used to shape the payload postgrest &order parameters for each level postgrest?Alphabetized (canonical) request query string for response URLs postgrestJSON Web Token postgrestHTTP request headers postgrestRequest Cookies postgrestRaw request path postgrestRaw request method postgrestVThe request profile for enabling use of multiple schemas. Follows the spec in hhttps:/ www.w3.orgTRdx-prof-connegttps:/ www.w3.orgTRdx-prof-conneg. postgrest3The request schema. Can vary depending on iProfile. postgrest%The target db object of a user action postgrest,Types of things a user wants to do to tablesviewsprocs  postgrest9Examines HTTP request and translates it into user intent.  postgrestFind the best match from a list of content types accepted by the client in order of decreasing preference and a list of types producible by the server. If there is no match but the client accepts */* then return the top server pick.F postgrest&Converts CSV like a,b 1,hi 2,byeHinto a JSON array like [ {"a": "1", "b": "hi"}, {"a": 2, "b": "bye"} ][The reason for its odd signature is so that it can compose directly with CSV.decodeByName;     ;     Generates the OpenAPI outputNone˳ postgrestTest whether a proxy uri is malformed or not. A valid proxy uri should be an absolute uri without query and user info, only http(s) schemes are valid, port number range is 1-65535.For example  !http://postgrest.com/openapi.json 'https://postgrest.com:8080/openapi.json TSets the PostgreSQL GUCs, role, search_path and pre-request function. Validates JWT.None>X{ "PostgREST database request builderNone"$>_d΋PostgREST main applicationNone$>X`sG !"#$$%&'()*+,-./0123456789:;<=>??@@ABCDEFFGHIJKLMNOPQRSTUVWXYZ[\]^_`abccdeefghijklmnopqrsttuvwxyzz{|}~      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrrstuvwxyz{|}~                                                                       !"#$%&'()*+,-./0123456789:;<=>?@ABC D E FG&postgrest-7.0.0-7MGwENJEbe2JaOXU2xyzlrPostgREST.RangeQueryPostgREST.TypesPostgREST.StatementsPostgREST.QueryBuilderPostgREST.ErrorPostgREST.ParsersPostgREST.DbStructurePostgREST.ConfigPostgREST.AuthPostgREST.ApiRequestPostgREST.OpenAPIPostgREST.MiddlewarePostgREST.DbRequestBuilder PostgREST.AppPaths_postgrestPostgREST.Private.CommonPostgREST.Private.QueryFragment NonnegRange rangeParserangeRequested restrictRange rangeLimit rangeOffsetrangeGeqallRangerangeStatusHeader contentRangeHConnectionStatus NotConnected ConnectedFatalConnectionError JSPathExpJSPKeyJSPIdxJSPath PgVersion$sel:pgvNum:PgVersion$sel:pgvName:PgVersionDepthReadNode MutateRequest ReadRequest MutateQueryInsertUpdateDelete$sel:in_:Insert$sel:insCols:Insert$sel:onConflict:Insert$sel:where_:Insert$sel:returning:Insert$sel:updCols:Insert ReadQuerySelect$sel:select:Select$sel:from:Select$sel:fromAlias:Select$sel:implicitJoins:Select$sel:where_:Select$sel:joinConditions:Select$sel:order:Select$sel:range_:Select JoinConditionFilter$sel:field:Filter$sel:opExpr:Filter EmbedPath EmbedHint SelectItem GucHeader RpcQParamNodeNameCastAliasField JsonOperandJKeyJIdx$sel:jVal:JKey JsonOperationJArrowJ2Arrow$sel:jOp:JArrowJsonPath FieldName LogicTreeExprStmnt LogicOperatorAndOrListVal SingleValLanguage OperationOpInFtsOpExprOperatorProxy$sel:proxyScheme:Proxy$sel:proxyHost:Proxy$sel:proxyPort:Proxy$sel:proxyPath:ProxyPJTypePJArrayPJObject$sel:pjaLength:PJArray PayloadJSON ProcessedJSONRawJSON$sel:pjRaw:ProcessedJSON$sel:pjType:ProcessedJSON$sel:pjKeys:ProcessedJSONJunction$sel:junTable:Junction$sel:junConstraint1:Junction$sel:junCols1:Junction$sel:junConstraint2:Junction$sel:junCols2:JunctionRelation$sel:relTable:Relation$sel:relColumns:Relation$sel:relConstraint:Relation$sel:relFTable:Relation$sel:relFColumns:Relation$sel:relType:Relation$sel:relJunction:RelationConstraintName CardinalityO2MM2OM2MQualifiedIdentifier!$sel:qiSchema:QualifiedIdentifier$sel:qiName:QualifiedIdentifier OrderTerm$sel:otTerm:OrderTerm$sel:otDirection:OrderTerm$sel:otNullOrder:OrderTerm OrderNullsOrderNullsFirstOrderNullsLastOrderDirectionOrderAsc OrderDesc PrimaryKey$sel:pkTable:PrimaryKey$sel:pkName:PrimaryKey ViewColumn SourceColumnColumn$sel:colTable:Column$sel:colName:Column$sel:colDescription:Column$sel:colPosition:Column$sel:colNullable:Column$sel:colType:Column$sel:colUpdatable:Column$sel:colMaxLen:Column$sel:colPrecision:Column$sel:colDefault:Column$sel:colEnum:Column$sel:colFK:Column ForeignKey$sel:fkCol:ForeignKeyTable$sel:tableSchema:Table$sel:tableName:Table$sel:tableDescription:Table$sel:tableInsertable:Table TableNameSchemaProcsMapProcDescription$sel:pdSchema:ProcDescription$sel:pdName:ProcDescription"$sel:pdDescription:ProcDescription$sel:pdArgs:ProcDescription!$sel:pdReturnType:ProcDescription!$sel:pdVolatility:ProcDescriptionProcVolatilityVolatileStable ImmutableRetTypeSingleSetOfPgTypeScalar CompositePgArg$sel:pgaName:PgArg$sel:pgaType:PgArg$sel:pgaReq:PgArg DbStructure$sel:dbTables:DbStructure$sel:dbColumns:DbStructure$sel:dbRelations:DbStructure$sel:dbPrimaryKeys:DbStructure$sel:dbProcs:DbStructure$sel:pgVersion:DbStructure PreferCount ExactCount PlannedCountEstimatedCountPreferParameters SingleObjectMultipleObjectsPreferRepresentationFull HeadersOnlyNonePreferResolutionMergeDuplicatesIgnoreDuplicates SqlFragmentSqlQuery ContentTypeCTApplicationJSONCTSingularJSON CTTextCSV CTTextPlain CTOpenAPI CTOctetStreamCTAnyCTOthertoHeadertoMimedecodeContentType tableCols tablePKColsfindProcspecifiedProcArgsprocReturnsScalar procTableNametableQiisSelfReference operators ftsOperatorsunwrapGucHeaderaddHeadersIfNotIncluded fstFieldNamesminimumPgVersion pgVersion94 pgVersion95 pgVersion96 pgVersion100 pgVersion109 pgVersion110 pgVersion112 pgVersion114 pgVersion121 sourceCTEName$fShowPreferResolution$fShowPreferRepresentation$fShowPreferParameters$fShowPreferCount $fEqTable$fShowOrderDirection$fShowOrderNulls$fHashableQualifiedIdentifier$fOrdProcDescription$fShowCardinality$fShowLogicOperator $fEqColumn$fFromJSONGucHeader$fOrdPgVersion$fShowContentType$fEqContentType$fEqPreferResolution$fEqPreferRepresentation$fEqPreferParameters$fEqPreferCount $fShowPgArg $fEqPgArg $fOrdPgArg$fEqProcVolatility$fShowProcVolatility$fOrdProcVolatility $fShowTable $fOrdTable$fShowPrimaryKey$fEqPrimaryKey$fEqOrderDirection$fEqOrderNulls$fShowQualifiedIdentifier$fEqQualifiedIdentifier$fOrdQualifiedIdentifier$fGenericQualifiedIdentifier $fEqPgType $fShowPgType $fOrdPgType $fEqRetType $fShowRetType $fOrdRetType$fShowProcDescription$fEqProcDescription$fEqCardinality $fShowPJType $fEqPJType$fShowPayloadJSON$fEqPayloadJSON $fShowProxy $fEqProxy $fEqOperation$fShowOperation $fEqOpExpr $fShowOpExpr$fEqLogicOperator $fShowColumn $fOrdColumn$fShowForeignKey$fEqForeignKey$fOrdForeignKey$fShowJunction $fEqJunction$fShowRelation $fEqRelation$fShowJsonOperand$fEqJsonOperand$fShowJsonOperation$fEqJsonOperation$fShowOrderTerm $fEqOrderTerm$fShowGucHeader $fEqGucHeader $fShowFilter $fEqFilter$fShowLogicTree $fEqLogicTree$fShowJoinCondition$fEqJoinCondition$fShowReadQuery $fEqReadQuery$fShowMutateQuery$fEqMutateQuery $fEqPgVersion$fShowPgVersion$fShowDbStructure$fEqDbStructure $fEqJSPathExp$fShowJSPathExp$fEqConnectionStatus$fShowConnectionStatuscreateWriteStatementcreateReadStatementcallProcStatementcreateExplainStatementreadRequestToQuerymutateRequestToQueryrequestToCallProcQueryreadRequestToCountQuery limitedQuery setLocalQuerysetLocalSearchPathQuery SimpleErrorGucHeadersErrorBinaryFieldErrorConnectionLostErrorPutSingletonErrorPutMatchingPkErrorPutRangeNotAllowedErrorPutPayloadIncompleteErrorJwtTokenMissingJwtTokenInvalidSingularityErrorContentTypeErrorPgErrorApiRequestErrorActionInappropriate InvalidRange InvalidBodyParseRequestError NoRelBetweenAmbiguousRelBetweenInvalidFiltersUnacceptableSchemaUnknownRelationUnsupportedVerb errorPayloaderrorResponseFor checkIsFatalsingularityError$fToJSONCommandError$fToJSONQueryError$fToJSONUsageError$fToJSONApiRequestError$fPgrstErrorApiRequestError$fToJSONPgError$fPgrstErrorPgError$fToJSONSimpleError$fPgrstErrorSimpleError$fShowApiRequestError$fEqApiRequestError$fShowSimpleError$fEqSimpleErrorpRequestSelectpRequestOnConflictpRequestFilter pRequestOrder pRequestRangepRequestLogicTreepRequestColumnswslexeme pTreePath pFieldForestpStar pFieldName pJsonPathpFieldaliasSeparatorpRelationSelect pFieldSelectpOpExpr pSingleValpListVal pListElement pQuotedValue pDelimiterpOrder pOrderTerm pLogicTreepLogicSingleVal pLogicPathpColumnsmapError pRoleClaimKeypJSPathpJSPKeypJSPIdxgetDbStructureaccessibleProcsschemaDescriptionaccessibleTables getPgVersion AppConfigconfigDatabaseconfigAnonRoleconfigOpenAPIProxyUri configSchemas configHost configPort configSocketconfigSocketModeconfigJwtSecretconfigJwtSecretIsBase64configJwtAudience configPoolconfigPoolTimeout configMaxRowsconfigReqCheck configQuietconfigSettingsconfigRoleClaimKeyconfigExtraSearchPathconfigRootSpecconfigRawMediaTypesconfigPoolTimeout' corsPolicy prettyVersion docsVersion readOptions JWTAttempt JWTInvalidJWTMissingSecret JWTClaims jwtClaims containsRole parseSecret$fEqJWTAttempt$fShowJWTAttempt ApiRequestiActioniRangeiTopLevelRangeiTargetiAcceptsiPayloadiPreferRepresentationiPreferParameters iPreferCountiPreferResolutioniFiltersiLogiciSelect iOnConflictiColumnsiOrder iCanonicalQSiJWTiHeadersiCookiesiPathiMethodiProfileiSchemaTarget TargetIdent TargetProcTargetDefaultSpec TargetUnknowntpQi tpIsRootSpec tdsSchemaAction ActionCreate ActionRead ActionUpdate ActionDeleteActionSingleUpsert ActionInvoke ActionInfo ActionInspectisHead InvokeMethodInvHeadInvGetInvPostuserApiRequestmutuallyAgreeable$fEqInvokeMethod $fEqAction $fEqTarget encodeOpenAPIisMalformedProxyUri pickProxy runWithClaims defaultMiddleunquoted readRequest mutateRequest postgrestversion getBinDir getLibDir getDynLibDir getDataDir getLibexecDir getSysconfDirgetDataFileNamecolumnnullableColumnelementparam arrayParam(Ranged-sets-0.4.0-4EqjInqAERALWVjdvbDVPeData.Ranged.RangesRangenormalizedBody noLocationF ignoredBody selectBodypgFmtLit pgFmtIdentasCsvFasJsonF asJsonSingleF asBinaryF locationFfromQi emptyOnFalse pgFmtColumn pgFmtFieldpgFmtSelectItempgFmtOrderTerm pgFmtFilterpgFmtJoinConditionpgFmtLogicTree pgFmtJsonPathpgFmtAs trimNullCharscountF returningFresponseHeadersFResultsWithCount standardRow claims2map jwkFromSecret csvToJson