Skip to content

Commit

Permalink
[support-mariadb-dumps-with-newline] Add new Base abstract class for …
Browse files Browse the repository at this point in the history
…database engines
  • Loading branch information
josacar committed Dec 28, 2023
1 parent 8c4b42e commit 85bd50d
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 3 deletions.
5 changes: 5 additions & 0 deletions src/triki/base.cr
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
class Triki
abstract struct Base
abstract def parse(obfuscator, config, input_io, output_io)
end
end
2 changes: 1 addition & 1 deletion src/triki/mysql.cr
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
require "string_scanner"

class Triki
struct Mysql
struct Mysql < Base
alias Field = String?
alias Fields = Array(Field)
alias Rows = Array(Fields)
Expand Down
2 changes: 1 addition & 1 deletion src/triki/postgres.cr
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
class Triki
struct Postgres
struct Postgres < Base
include Triki::ConfigScaffoldGenerator

# Postgres uses COPY statements instead of INSERT and look like:
Expand Down
2 changes: 1 addition & 1 deletion src/triki/sql_server.cr
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
class Triki
struct SqlServer
struct SqlServer < Base
include Triki::InsertStatementParser
include Triki::ConfigScaffoldGenerator

Expand Down

0 comments on commit 85bd50d

Please sign in to comment.