Skip to content

Commit

Permalink
tests for SQLDialect
Browse files Browse the repository at this point in the history
  • Loading branch information
xitology committed Dec 22, 2021
1 parent 236b4ea commit 443bb62
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 0 deletions.
41 changes: 41 additions & 0 deletions docs/src/test/dialects.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# SQL Dialects

In FunSQL, properties and capabilities of a particular SQL dialect
are encapsulated in a `SQLDialect` object.

using FunSQL: SQLDialect

The desired dialect can be specified by name.

postgresql_dialect = SQLDialect(:postgresql)
#-> SQLDialect(:postgresql)

display(postgresql_dialect)
#-> SQLDialect(:postgresql)

If necessary, the dialect can be customized.

postgresql_odbc_dialect = SQLDialect(:postgresql,
variable_style = :positional,
variable_prefix = '?')
#-> SQLDialect(:postgresql, …)

display(postgresql_odbc_dialect)
#-> SQLDialect(:postgresql, variable_style = :POSITIONAL, variable_prefix = '?')

The default dialect does not correspond to any particular database server.

default_dialect = SQLDialect()
#-> SQLDialect()

display(default_dialect)
#-> SQLDialect()

A completely custom dialect can be specified.

my_dialect = SQLDialect(:my, identifier_quotes = ('<', '>'))
#-> SQLDialect(name = :my, …)

display(my_dialect)
#-> SQLDialect(name = :my, identifier_quotes = ('<', '>'))

1 change: 1 addition & 0 deletions docs/src/test/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
```@contents
Pages = [
"clauses.md",
"dialects.md",
"entities.md",
"nodes.md",
]
Expand Down

2 comments on commit 443bb62

@xitology
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/51073

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.8.2 -m "<description of version>" 443bb626d8971042fe79ea30a8a9e08294b77b5c
git push origin v0.8.2

Please sign in to comment.