-
Notifications
You must be signed in to change notification settings - Fork 6
Documentation improvements #101
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: 0.5.x
Are you sure you want to change the base?
Conversation
…s, additional SQL output demonstrations, and expanded Docker deployment options.
Split docs files and re-ordered 2-pass optimisation of examples and introductions Signed-off-by: Simon Mundy <simon.mundy@peptolab.com>
Signed-off-by: Simon Mundy <simon.mundy@peptolab.com>
Signed-off-by: Simon Mundy <simon.mundy@peptolab.com>
Split chapters/examples Linted documentation Signed-off-by: Simon Mundy <simon.mundy@peptolab.com>
Split chapters/examples Linted documentation Signed-off-by: Simon Mundy <simon.mundy@peptolab.com>
… documentation-improvements # Conflicts: # docs/book/adapter.md # docs/book/adapters/adapter-aware-trait.md # docs/book/application-integration/usage-in-a-laminas-mvc-application.md # docs/book/application-integration/usage-in-a-mezzio-application.md # docs/book/docker-deployment.md # docs/book/index.md # docs/book/metadata.md # docs/book/metadata/examples.md # docs/book/metadata/intro.md # docs/book/metadata/objects.md # docs/book/profiler.md # docs/book/result-set/advanced.md # docs/book/result-set/examples.md # docs/book/result-set/intro.md # docs/book/row-gateway.md # docs/book/sql-ddl.md # docs/book/sql-ddl/advanced.md # docs/book/sql-ddl/alter-drop.md # docs/book/sql-ddl/columns.md # docs/book/sql-ddl/constraints.md # docs/book/sql-ddl/examples.md # docs/book/sql-ddl/intro.md # docs/book/sql.md # docs/book/sql/examples.md # docs/book/sql/insert.md # docs/book/sql/intro.md # docs/book/sql/select.md # docs/book/sql/update-delete.md # docs/book/sql/where-having.md # docs/book/table-gateway.md Signed-off-by: Simon Mundy <simon.mundy@peptolab.com>
Signed-off-by: Simon Mundy <simon.mundy@peptolab.com>
Signed-off-by: Simon Mundy <46739456+simon-mundy@users.noreply.github.com>
Signed-off-by: Simon Mundy <simon.mundy@peptolab.com>
Signed-off-by: Simon Mundy <simon.mundy@peptolab.com>
… documentation-improvements # Conflicts: # .markdownlint.json Signed-off-by: Simon Mundy <simon.mundy@peptolab.com>
Removed orphaned files Fixed linting issues
tyrsson
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is still unresolved comments and at least one change is incorrect for the return type of AdapterAwareInterface getDbAdapter method.
| use PhpDb\Adapter\Adapter; | ||
| - Base adapter and interfaces | ||
| - Abstract PDO driver classes | ||
| - Platform abstractions |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TableGateway/RowGateway Features was missed here.
| 'database' => 'path/to/sqlite.db', | ||
| ```php title="MySQL Connection" | ||
| use PhpDb\Adapter\Adapter; | ||
| use PhpDb\Mysql\Driver\Mysql; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The namespaces here are incorrect.
PhpDb\Adapter\Mysql\Driver\Mysqli\Mysqli
PhpDb\Adapter\Mysql\Driver\Pdo\Pdo
I plan to refactor this before mysql 1.0.0 but its going to take a lot of work and I wanted everything stable before starting it.
| 'platform' => 'IbmDb2', | ||
| 'platform_options' => ['quote_identifiers' => false], | ||
| ]); | ||
| $adapter = new Adapter($driver, new MysqlPlatform()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is incorrect. The PhpDb\Adapter\Mysql\Driver\Platform instance requires a Driver instance as a constructor argument.
| From this `DriverInterface`, you can | ||
| From this `DriverInterface`, you can: | ||
|
|
||
| - Determine the name of the platform this driver supports (useful for choosing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Point 1 and 2 here are really not relevant any longer. The code has just not been refactored to that point as of yet. I would not promote checking the Platform Name as this will very likely be removed.
| public function getDbAdapter(): ?AdapterInterface | ||
| { | ||
| return $this->adapter ?? null; | ||
| return $this; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This method can't return the AdapterAwareInterface type. It must return the AdapterInterface instance.
The documentation for sql-ddl.md (available at https://docs.laminas.dev/laminas-db/sql-ddl/ for reference) shows some detail but does not show the full scope of these classes and methods.
This PR goes further and re-organises the existing sections, adds further examples and optimises syntax.
Closes #88