Browse Source

Update README.md

Git-Leon 7 years ago
parent
commit
8ae0df5a11
1 changed files with 7 additions and 8 deletions
  1. 7
    8
      README.md

+ 7
- 8
README.md View File

1
--
2
 # Pagination
1
 # Pagination
3
 * To optimize performance, it is important to limit the amount of data returned, especially in the case of a mobile client.
2
 * To optimize performance, it is important to limit the amount of data returned, especially in the case of a mobile client.
4
 * REST services have the ability to give clients access large datasets in manageable chunks, by splitting the data into discrete pages or _paging data_. 
3
 * REST services have the ability to give clients access large datasets in manageable chunks, by splitting the data into discrete pages or _paging data_. 
44
 -
43
 -
45
 # Taking Action!
44
 # Taking Action!
46
 
45
 
47
-0. Create a `src/main/resource/import.sql` file with [DML statements](http://lmgtfy.com/?q=DML+statement) for populating the database upon bootstrap. The `import.sql` should insert at least 10 polls, each with 3 or more options.
46
+1. Create a `src/main/resource/import.sql` file with [DML statements](http://lmgtfy.com/?q=DML+statement) for populating the database upon bootstrap. The `import.sql` should insert at least 10 polls, each with 3 or more options.
48
 	* Below is an example of `SQL` statements for creating a single poll with only one option.
47
 	* Below is an example of `SQL` statements for creating a single poll with only one option.
49
 	
48
 	
50
 		* Poll Creation
49
 		* Poll Creation
58
 			insert into option (option_id, option_value, poll_id) values (1, 'Red', 1);
57
 			insert into option (option_id, option_value, poll_id) values (1, 'Red', 1);
59
 			``` 
58
 			``` 
60
 	
59
 	
61
-0. Restart your application.
62
-* Ensure database is populated by `import.sql`.
63
-* Utilize Spring's built-in page number pagination support by researching the `PagingAndSortingRepository` class.
64
-* Ensure the `Controller` methods handle `Pageable` arguments.
65
-* Send a `GET` request to `http://localhost:8080/polls?page=0&size=2` via Postman.
66
-	* Ensure the response is a `JSON` object with pagination-specific information.
60
+2. Restart your application.
61
+3. Ensure database is populated by `import.sql`.
62
+4. Utilize Spring's built-in page number pagination support by researching the `PagingAndSortingRepository` class.
63
+5. Ensure the `Controller` methods handle `Pageable` arguments.
64
+6. Send a `GET` request to `http://localhost:8080/polls?page=0&size=2` via Postman.
65
+	* Ensure the response is a `JSON` object with pagination-specific information.