CSV

io.github.quafadas.scautable.CSV
object CSV

Attributes

Experimental
true
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
CSV.type

Members list

Type members

Classlikes

object CSVParser

According to chatGPT will parse RFC 4180 compliant CSV.

According to chatGPT will parse RFC 4180 compliant CSV.

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
CSVParser.type
class CsvIterator[K](filePath: String) extends Iterator[NamedTuple[K & Tuple, StringyTuple[K & Tuple]]]

Attributes

Supertypes
trait Iterator[NamedTuple[K & Tuple, StringyTuple[K & Tuple]]]
trait IterableOnceOps[NamedTuple[K & Tuple, StringyTuple[K & Tuple]], Iterator, Iterator[NamedTuple[K & Tuple, StringyTuple[K & Tuple]]]]
trait IterableOnce[NamedTuple[K & Tuple, StringyTuple[K & Tuple]]]
class Object
trait Matchable
class Any
Show all

Types

type Concat[X <: String, Y <: Tuple] = X *: Y
type ConcatSingle[X, A] = X *: A *: EmptyTuple
type DropAfterName[T, StrConst <: String] = T match { case EmptyTuple => EmptyTuple case head *: tail => IsMatch[StrConst, head] match { case true => EmptyTuple case false => head *: DropAfterName[tail, StrConst] } }
type DropOneName[T, StrConst <: String] = T match { case EmptyTuple => EmptyTuple case head *: tail => IsMatch[StrConst, head] match { case true => DropOneName[tail, StrConst] case false => head *: DropOneName[tail, StrConst] } }
type DropOneTypeAtName[N <: Tuple, StrConst <: String, T <: Tuple] = (N, T) match { case (EmptyTuple, _$15) => EmptyTuple case (_$16, EmptyTuple) => EmptyTuple case (nameHead *: nameTail, typeHead *: typeTail) => IsMatch[nameHead, StrConst] match { case true => typeTail case false => typeHead *: DropOneTypeAtName[nameTail, StrConst, typeTail] } }
type GetTypeAtName[N <: Tuple, StrConst <: String, T <: Tuple] = (N, T) match { case (EmptyTuple, _$17) => EmptyTuple case (_$18, EmptyTuple) => EmptyTuple case (nameHead *: nameTail, typeHead *: typeTail) => IsMatch[nameHead, StrConst] match { case true => typeHead case false => GetTypeAtName[nameTail, StrConst, typeTail] } }
type IsColumn[StrConst <: String, T <: Tuple] = T match { case EmptyTuple => false case head *: tail => IsMatch[StrConst, head] match { case true => true case false => IsColumn[StrConst, tail] } case Any => false }
type IsMatch[A <: String, B <: String] = B match { case A => true case Any => false }
type ReReverseXLL[t] = Size[t] match { case 0 => EmptyTuple case 1 => t case 2 => t case 3 => t case 4 => t case 5 => t case 6 => t case 7 => t case 8 => t case 9 => t case 10 => t case 11 => t case 12 => t case 13 => t case 14 => t case 15 => t case 16 => t case 17 => t case 18 => t case 19 => t case 20 => t case 21 => t case 22 => t case Any => ReverseTuple[t] }
type ReplaceOneName[T <: Tuple, StrConst <: String, A <: String] = T match { case EmptyTuple => EmptyTuple case nameHead *: nameTail => IsMatch[nameHead, StrConst] match { case true => A *: nameTail case false => nameHead *: ReplaceOneName[nameTail, StrConst, A] } }
type ReplaceOneTypeAtName[N <: Tuple, StrConst <: String, T <: Tuple, A] = (N, T) match { case (EmptyTuple, _$13) => EmptyTuple case (_$14, EmptyTuple) => EmptyTuple case (nameHead *: nameTail, typeHead *: typeTail) => IsMatch[nameHead, StrConst] match { case true => A *: typeTail case false => typeHead *: ReplaceOneTypeAtName[nameTail, StrConst, typeTail, A] } }
type ReverseTuple[T <: Tuple] = T match { case EmptyTuple => EmptyTuple case x *: xs => ReverseTuple[xs] *: x }
type Size[T] = T match { case EmptyTuple => 0 case x *: xs => 1 + Size[xs] }
type StringifyTuple[T >: Tuple] = T match { case EmptyTuple => EmptyTuple case head *: tail => NamedTuple[Tuple1["head"], Tuple1[String]] *: StringifyTuple[tail] }
type StringyTuple[T <: Tuple] = T match { case EmptyTuple => EmptyTuple case head *: tail => String *: StringyTuple[tail] }
type Tail[T <: Tuple, S <: String] = T match { case EmptyTuple => EmptyTuple case head *: tail => IsMatch[S, head] match { case true => EmptyTuple case false => Tail[tail, S] } }

Value members

Concrete methods

transparent inline def absolutePath[T](inline path: String): CsvIterator[_]
transparent inline def pwd[T](inline path: String): CsvIterator[_]
def readCsvAbolsutePath(pathExpr: Expr[String])(using Quotes): Expr[CsvIterator[_]]
transparent inline def resource[T](inline path: String): CsvIterator[_]
transparent inline def url[T](inline path: String): CsvIterator[_]

Givens

Givens

given IteratorToExpr2[K](using x$1: ToExpr[String], x$2: Type[K]): IteratorToExpr2[K]

Extensions

Extensions

extension [K, V, K1 <: Tuple & K, V1 <: Tuple & K](itr: Iterator[NamedTuple[K1, V1]])
inline def addColumn[S <: String, A](fct: NamedTuple[K1, V1] => A): Iterator[NamedTuple[S *: K1, A *: V1]]
inline def column[S <: String](using ev: IsColumn[S, K1] =:= true, s: ValueOf[S]): Iterator[GetTypeAtName[K1, S, V1]]
inline def dropColumn[S <: String](using ev: IsColumn[S, K1] =:= true, s: ValueOf[S]): Iterator[NamedTuple[DropOneName[K1, S], DropOneTypeAtName[K1, S, V1]]]
inline def forceColumnType[S <: String, A]: Iterator[NamedTuple[K1, ReplaceOneTypeAtName[K1, S, V1, A]]]
inline def mapColumn[S <: String, A](fct: GetTypeAtName[K1, S, V1] => A)(using ev: IsColumn[S, K1] =:= true, s: ValueOf[S]): Iterator[NamedTuple[K1, ReplaceOneTypeAtName[K1, S, V1, A]]]
inline def renameColumn[From <: String, To <: String](using ev: IsColumn[From, K1] =:= true, FROM: ValueOf[From], TO: ValueOf[To]): Iterator[NamedTuple[ReplaceOneName[K1, From, To], V1]]
extension [K <: Tuple, V <: Tuple](nt: Seq[NamedTuple[K, V]])
inline def consoleFormatNt: String
inline def consoleFormatNt(headers: Option[List[String]], fansi: Boolean): String