Skip to content

Commit

Permalink
backtics in docs replaced by square brackets in core module
Browse files Browse the repository at this point in the history
  • Loading branch information
salamonpavel committed Jan 4, 2024
1 parent cb1fe0e commit fb92e83
Show file tree
Hide file tree
Showing 10 changed files with 28 additions and 27 deletions.
2 changes: 1 addition & 1 deletion core/src/main/scala/za/co/absa/fadb/DBEngine.scala
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import za.co.absa.fadb.exceptions.StatusException
import scala.language.higherKinds

/**
* `DBEngine` is an abstract class that represents a database engine.
* [[DBEngine]] is an abstract class that represents a database engine.
* It provides methods to execute queries and fetch results from a database.
* @tparam F - The type of the context in which the database queries are executed.
*/
Expand Down
10 changes: 5 additions & 5 deletions core/src/main/scala/za/co/absa/fadb/DBFunction.scala
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import za.co.absa.fadb.status.handling.StatusHandling
import scala.language.higherKinds

/**
* `DBFunction` is an abstract class that represents a database function.
* [[DBFunction]] is an abstract class that represents a database function.
* @param functionNameOverride - Optional parameter to override the class name if it does not match the database function name.
* @param schema - The schema the function belongs to.
* @param dBEngine - The database engine that is supposed to execute the function (contains connection to the database).
Expand Down Expand Up @@ -73,7 +73,7 @@ abstract class DBFunction[I, R, E <: DBEngine[F], F[_]](functionNameOverride: Op
}

/**
* `DBFunctionWithStatus` is an abstract class that represents a database function with a status.
* [[DBFunctionWithStatus]] is an abstract class that represents a database function with a status.
* It extends the [[DBFunction]] class and adds handling for the status of the function invocation.
* @param functionNameOverride - Optional parameter to override the class name if it does not match the database function name.
* @param schema - The schema the function belongs to.
Expand Down Expand Up @@ -131,7 +131,7 @@ abstract class DBFunctionWithStatus[I, R, E <: DBEngine[F], F[_]](functionNameOv
object DBFunction {

/**
* `DBMultipleResultFunction` is an abstract class that represents a database function returning multiple results.
* [[DBMultipleResultFunction]] is an abstract class that represents a database function returning multiple results.
* It extends the [[DBFunction]] class and overrides the apply method to return a sequence of results.
*/
abstract class DBMultipleResultFunction[I, R, E <: DBEngine[F], F[_]](
Expand All @@ -155,7 +155,7 @@ object DBFunction {
}

/**
* `DBSingleResultFunction` is an abstract class that represents a database function returning a single result.
* [[DBSingleResultFunction]] is an abstract class that represents a database function returning a single result.
* It extends the [[DBFunction]] class and overrides the apply method to return a single result.
*/
abstract class DBSingleResultFunction[I, R, E <: DBEngine[F], F[_]](
Expand All @@ -178,7 +178,7 @@ object DBFunction {
}

/**
* `DBOptionalResultFunction` is an abstract class that represents a database function returning an optional result.
* [[DBOptionalResultFunction]] is an abstract class that represents a database function returning an optional result.
* It extends the [[DBFunction]] class and overrides the apply method to return an optional result.
*/
abstract class DBOptionalResultFunction[I, R, E <: DBEngine[F], F[_]](
Expand Down
6 changes: 3 additions & 3 deletions core/src/main/scala/za/co/absa/fadb/DBSchema.scala
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import za.co.absa.fadb.naming.NamingConvention
* An abstract class, an ancestor to represent a database schema
* The database name of the schema is derived from the class name based on the provided naming convention
* @param schemaNameOverride - in case the class name would not match the database schema name, this gives the
* @param namingConvention - the [[za.co.absa.fadb.naming.NamingConvention NamingConvention]]
* @param namingConvention - the [[za.co.absa.fadb.naming.NamingConvention]]
* prescribing how to convert a class name into a db object name
*/
abstract class DBSchema(schemaNameOverride: Option[String] = None)(implicit val namingConvention: NamingConvention) {
Expand All @@ -40,13 +40,13 @@ abstract class DBSchema(schemaNameOverride: Option[String] = None)(implicit val
}

/**
* To easy pass over to `DBFunction` members of the schema
* To easy pass over to [[DBFunction]] members of the schema
*/
protected implicit val schema: DBSchema = this

/**
* Function to convert a class to the associated DB object name, based on the class' name. For transformation from the
* class name to usual db name the schema's [[za.co.absa.fadb.naming.NamingConvention NamingConvention]] is used.
* class name to usual db name the schema's [[za.co.absa.fadb.naming.NamingConvention]] is used.
* @param c - class which name to use to get the DB object name
* @return - the db object name
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@ package za.co.absa.fadb.naming
import za.co.absa.fadb.exceptions.NamingException

/**
* `ExplicitNamingRequired` is a `NamingConvention` that throws a `NamingConvention` for any string.
* [[ExplicitNamingRequired]] is a [[NamingConvention]] that throws a [[NamingException]] for any string.
* This is used when explicit naming is required and no other naming convention should be applied.
*/
class ExplicitNamingRequired extends NamingConvention {

/**
* Throws a `NamingConvention` with a message indicating that explicit naming is required.
* Throws a [[NamingException]] with a message indicating that explicit naming is required.
* @param original - The original string.
* @return Nothing, as a `NamingException` is always thrown.
* @return Nothing, as a [[NamingException]] is always thrown.
*/
override def stringPerConvention(original: String): String = {
val message = s"No convention for '$original', explicit naming required."
Expand All @@ -36,14 +36,14 @@ class ExplicitNamingRequired extends NamingConvention {
}

/**
* `ExplicitNamingRequired.Implicits` provides an implicit `NamingConvention` instance that
* throws a `NamingException` for any string.
* [[ExplicitNamingRequired.Implicits]] provides an implicit [[NamingConvention]] instance that
* throws a [[NamingException]] for any string.
*/
object ExplicitNamingRequired {
object Implicits {

/**
* An implicit `NamingConvention` instance that throws a `NamingException` for any string.
* An implicit [[NamingConvention]] instance that throws a [[NamingException]] for any string.
*/
implicit val namingConvention: NamingConvention = new ExplicitNamingRequired()
}
Expand Down
8 changes: 4 additions & 4 deletions core/src/main/scala/za/co/absa/fadb/naming/LettersCase.scala
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
package za.co.absa.fadb.naming

/**
* `LettersCase` is a sealed trait that represents different cases of letters.
* [[LettersCase]] is a sealed trait that represents different cases of letters.
* It provides a method to convert a string to the specific case.
*/
sealed trait LettersCase {
Expand All @@ -33,21 +33,21 @@ sealed trait LettersCase {
object LettersCase {

/**
* `AsIs` is a [[LettersCase]] that leaves strings as they are.
* [[AsIs]] is a [[LettersCase]] that leaves strings as they are.
*/
case object AsIs extends LettersCase {
override def convert(s: String): String = s
}

/**
* `LowerCase` is a [[LettersCase]] that converts strings to lower case.
* [[LowerCase]] is a [[LettersCase]] that converts strings to lower case.
*/
case object LowerCase extends LettersCase {
override def convert(s: String): String = s.toLowerCase
}

/**
* `UpperCase` is a [[LettersCase]] that converts strings to upper case.
* [[UpperCase]] is a [[LettersCase]] that converts strings to upper case.
*/
case object UpperCase extends LettersCase {
override def convert(s: String): String = s.toUpperCase
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
package za.co.absa.fadb.naming

/**
* `NamingConvention` is a base trait that defines the interface for different naming conventions.
* [[NamingConvention]] is a base trait that defines the interface for different naming conventions.
* It provides methods to convert a class name according to given naming convention.
*/
trait NamingConvention {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,9 @@ import za.co.absa.fadb.naming.{LettersCase, NamingConvention}
import LettersCase.AsIs

/**
* `AsIsNaming` provides a naming convention that leaves strings as they are.
* [[AsIsNaming]] provides a naming convention that leaves strings as they are.
* It implements the [[NamingConvention]] trait.
*
* @param lettersCase - The case of the letters in the string.
*/
class AsIsNaming(lettersCase: LettersCase) extends NamingConvention {
Expand All @@ -37,7 +38,7 @@ class AsIsNaming(lettersCase: LettersCase) extends NamingConvention {
}

/**
* `AsIsNaming.Implicits` provides an implicit [[NamingConvention]] instance that leaves strings as they are.
* [[AsIsNaming.Implicits]] provides an implicit [[NamingConvention]] instance that leaves strings as they are.
*/
object AsIsNaming {
object Implicits {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import za.co.absa.fadb.naming.{LettersCase, NamingConvention}
import LettersCase.LowerCase

/**
* `SnakeCaseNaming` provides a naming convention that converts camel case strings to snake case.
* [[SnakeCaseNaming]] provides a naming convention that converts camel case strings to snake case.
* It implements the [[NamingConvention]] trait.
* @param lettersCase - The case of the letters in the string.
*/
Expand Down Expand Up @@ -51,7 +51,7 @@ class SnakeCaseNaming(lettersCase: LettersCase) extends NamingConvention {
}

/**
* `SnakeCaseNaming.Implicits` provides an implicit [[NamingConvention]] instance that converts camel case strings to snake case.
* [[SnakeCaseNaming.Implicits]] provides an implicit [[NamingConvention]] instance that converts camel case strings to snake case.
*/
object SnakeCaseNaming {
object Implicits {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@ import za.co.absa.fadb.FunctionStatusWithData
import za.co.absa.fadb.exceptions.StatusException

/**
* `StatusHandling` is a base trait that defines the interface for handling the status of a function invocation.
* [[StatusHandling]] is a base trait that defines the interface for handling the status of a function invocation.
* It provides a method to check the status of a function invocation with data.
*/
trait StatusHandling {

/**
* Checks the status of a function invocation.
* @param statusWithData - The status of the function invocation with data.
* @return Either a `StatusException` if the status code indicates an error, or the data if the status code is successful.
* @return Either a [[StatusException]] if the status code indicates an error, or the data if the status code is successful.
*/
def checkStatus[A](statusWithData: FunctionStatusWithData[A]): Either[StatusException, A]
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import za.co.absa.fadb.exceptions._
import za.co.absa.fadb.status.handling.StatusHandling

/**
* `StandardStatusHandling` is a trait that extends the `StatusHandling` interface.
* [[StandardStatusHandling]] is a trait that implements the [[StatusHandling]] interface.
* It provides a standard implementation for checking the status of a function invocation.
*/
trait StandardStatusHandling extends StatusHandling {
Expand Down

0 comments on commit fb92e83

Please sign in to comment.