packages feed

graphql-w-persistent 0.1.0.5 → 0.1.0.6

raw patch · 7 files changed

+25/−21 lines, 7 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

ChangeLog.md view
@@ -1,4 +1,4 @@-# Revision history for graphql-w-yesod
+# Revision history for graphql-w-persistent
 
 ## 0.1.0.0 -- 2018-10-18
 
@@ -22,4 +22,8 @@ 
 ## 0.1.0.5 -- 2018-10-22
 
-* Add duplicated queries feature+* Add duplicated queries feature
+
+## 0.1.0.6 -- 2018-10-24
+
+* Update documentation
graphql-w-persistent.cabal view
@@ -10,7 +10,7 @@ -- PVP summary:      +-+------- breaking API changes
 --                   | | +----- non-breaking API additions
 --                   | | | +--- code changes with no API change
-version:             0.1.0.5
+version:             0.1.0.6
 
 -- A short (one-line) description of the package.
 synopsis:            Haskell GraphQL query parser-interpreter-data processor.
src/Components/DataProcessors/PersistentDataProcessor.hs view
@@ -1,4 +1,4 @@-module Components.DataProcessors.PersistentDataProcessor where
+module Components.DataProcessors.PersistentDataProcessor (processReturnedValues) where
 
 import Data.Maybe
 import Data.Either
src/Components/ObjectHandlers/ServerObjectValidator.hs view
@@ -1,4 +1,4 @@-module Components.ObjectHandlers.ServerObjectValidator where
+module Components.ObjectHandlers.ServerObjectValidator (checkObjectsAttributes) where
 
 import qualified Control.Exception as E
 import Data.Maybe
src/Components/Parsers/QueryParser.hs view
@@ -1,4 +1,4 @@-module Components.Parsers.QueryParser where
+module Components.Parsers.QueryParser (processString,validateQuery,parseStringToObjects) where
 
 
 import qualified Control.Exception as E
src/Components/QueryComposers/SQLQueryComposer.hs view
@@ -1,4 +1,4 @@-module Components.QueryComposers.SQLQueryComposer where
+module Components.QueryComposers.SQLQueryComposer (makeSqlQueries) where
 
 import Data.Either
 import qualified Data.Map.Strict as M
src/GraphQL.hs view
@@ -21,7 +21,7 @@ (4) make a list of all above mentioned server objects in separate tuples with a list to all reference database table name(s) as you read them
 (5) make a list of database table names in separate tuples with another database table name and a list to the SQL database tables that are between the two first tables; the list order is...
 identity table name (the first String in this tuple), identity leaving-field name, referring table name (the table that's corresponding to the second String in this tuple), referring table entering-field name, and (if present) 
-three String sequences that is itermediary-table name, intermediary-table entering-column name, and intermediary-table leaving-column name. The intermediary tables are ordered from closest to indentity table to closest to referencing table.
+three String sequences that is intermediary-table name, intermediary-table entering-column name, and intermediary-table leaving-column name. The intermediary tables are ordered from closest to indentity table to closest to referencing table.
 
 These lists are later used as arguments in a query parsing function.
 
@@ -32,7 +32,7 @@    * add new tuple to third schema argument (where list is the intersection fields on all children),
    * and add new tuple to fourth schema argument (where list is all children database tables).
   
-   You should not need more cases within fifth schema argument, but you may find a child database table and and third schema argument list elements pair that is not included.
+   You should not need more cases within fifth schema argument, but you may find a child database table and third schema argument list elements pair that is not included.
    
    Then, you will need to include this, or error is thrown.
 
@@ -65,17 +65,17 @@    The ordered arguments are:
 
     * the GraphQL query as a string
-    * a list of tuple of String and list of String that is unique server object names and all names that are referencing then with any query
+    * a list of tuple of String and list of String that is unique server object names and all names that are referencing them with any query
     * a list of tuple of String and list of String that is exact same unique server object names while the list is the valid server object 
     scalar subfields as they are spelt in the database
     * a list of tuple of String and list of String that is exact same unique server object names while the list is the valid server object
-    nested object subfields as they are referenced in the next list of relationship tables
-    * a list of tuple of String, String, and list of String that is above server object names to make an identity name, a reference name,
-    and a list of String that is identity table, escape identity column name, reference table, arrival reference column name, and an from-to
+    nested object subfields as you want them named and as they are listed in first schema argument
+    * a list of tuple of String, String, and list of String that is database table name to make an identity name, a reference database table name,
+    and a list of String that is identity table, escape identity column name, reference table, arrival reference column name, and a from-to
     order of intermediate table triplet strings of intermediate table name, intermediate table arrival column name, and intermediate table
     departure column name
    
-   The return value is a tuple of server representation objects and a list of list of sql queries. The first list is holding lists that are
+   The return value is a tuple of server representation objects and a list of sql queries. The first list is holding lists that are
    grouping queries from the same GraphQL query. The inner list is holding the String value sql queries. The server representation objects
    is later used to format database results to the GraphQL return value syntax.
 
@@ -85,7 +85,7 @@    to illustrate the expected arguments.
 
 
-   * The first schema argument (second argument) is a mapping to names that a server object is possibly referred to in any GraphQL query:
+   * The first schema argument (second argument) is a mapping to names to which a server object is possibly referred in any GraphQL query:
 
    @
        [("Person",["Person","person","owner"]),("Family",["Family","family"]),("Genus",["Genus","genus"]),("Species",["Species","species"]),("Breed",["Breed","breed"]),("Pet",["Pet","pet"]),("Taxonomy",["Taxonomy","taxonomy"])]
@@ -107,7 +107,7 @@ 
    NOTE: You should give only the intersection subfields set to parent server objects with all the children server objects.
 
-   NOTE: These nested object names are exact reference to the destination argument in the below relationships schema argument (the last argument).
+   NOTE: You should also put the list names in the lists in the first argument to map the name to ServerObject.
 
    * The fourth schema argument is a mapping to exact database names (it is maybe helpful to first have the database schema and copy names to this list mapping) for every listed server object in the first schema argument:
 
@@ -126,7 +126,7 @@    The second String is the referencing database name.
 
    The third tuple value is a list that is showing the link between our identity table and referring table. The order is first identity database table name, second identity database leaving field name, 
-   third referencing database table name, fourth referencing database table arrival name, and the remainder (if identity table and referencing table are not directly linked) is a triplet of Strings that 
+   third referencing database table name, fourth referencing database table arrival field name, and the remainder (if identity table and referencing table are not directly linked) is a triplet of Strings that 
    are ordered from nearest to identity table to closer to referencing table. The triplets are intermediate database table name, intermediate database arrival field, and intermediate database exiting 
    field. Here is an illustration:
 
@@ -182,9 +182,9 @@ processQueryString :: String                      -- ^ GraphQL query argument as String.
                    -> [(String,[String])]         -- ^ Server object name to list of query reference names.
                    -> [(String,[String])]         -- ^ Server object name to list of valid scalar subfields (which are exactly named after database column names).
-                   -> [(String,[String])]         -- ^ Server object name to list of valid nested object subfields (which are exactly named after the from and to strings within the last function argument).
+                   -> [(String,[String])]         -- ^ Server object name to list of valid nested object subfields (which are named as pleased, though you must include these in the tuple list in the first argument list)
                    -> [(String,[String])]         -- ^ Server object name to list of database table names (which are exact references to table names).
-                   -> [(String,String,[String])]  -- ^ Server object name to list of from-to-and intermediate triplet strings as described above to identify all GraphQL relationships with database sequences.
+                   -> [(String,String,[String])]  -- ^ two database table names to list of from-to-and intermediate triplet strings as described above to identify all GraphQL relationships with database sequences.
                    -> ([RootObject],[[String]])   -- ^ The return value is one tuple with server objects and list of grouped sql query strings.
 processQueryString str svrobjs sss sos sodn sor = checkObjectsToSql sss sos sodn sor $ flip checkString svrobjs $ QP.processString str
 
@@ -200,7 +200,7 @@ 
     Making the first argument is demonstrated in the GitHub <https://github.com/jasonsychau/graphql-w-persistent example>.
 
-    Current implementation is to cast all values to Text since arbitrary columns data types are not infered.
+    Current implementation is to cast all values to Text since arbitrary columns data types are not inferred.
 
 
     When an error is encountered, an uncaught exception is thrown. The exceptions thrown are of:
@@ -210,7 +210,7 @@     * EOFDataProcessingException (when the given data is shorter than expected in reference to the given serve objects)
     * InvalidArgumentException (when there is an internal argument error - you should not observe this)
 -}
-processPersistentData :: [[[[Text]]]]  -- ^ database query return value as casted to only Text data types and with no other alterations (a list of GraphQL-grouped results list of SQL query results list of data row lists)
+processPersistentData :: [[[[Text]]]]       -- ^ database query return value as casted to only Text data types and with no other alterations (a list of GraphQL-grouped results list of SQL query results list of data row lists)
                       -> [RootObject]       -- ^ unmodified server objects that was given by the previous processQueryString function.
                       -> String             -- ^ The return value is a string type to describe the GraphQL-organized return values.
 processPersistentData dt ro = DP.processReturnedValues ro dt