-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1181 from atlanhq/FT-717
Adds interchangeable Excel and CSV options for export packages
- Loading branch information
Showing
29 changed files
with
1,244 additions
and
389 deletions.
There are no files selected for viewing
38 changes: 38 additions & 0 deletions
38
package-toolkit/runtime/src/main/kotlin/com/atlan/pkg/serde/TabularWriter.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
/* SPDX-License-Identifier: Apache-2.0 | ||
Copyright 2023 Atlan Pte. Ltd. */ | ||
package com.atlan.pkg.serde | ||
|
||
/** | ||
* Generic interface through which to write out tabular content. | ||
*/ | ||
interface TabularWriter { | ||
/** | ||
* Create a header row for the tabular output. | ||
* | ||
* @param headers ordered map of header names and descriptions | ||
*/ | ||
fun writeHeader(headers: Map<String, String>) | ||
|
||
/** | ||
* Create a header row for the tabular output. | ||
* | ||
* @param values ordered list of header column names | ||
*/ | ||
fun writeHeader(values: Iterable<String>) | ||
|
||
/** | ||
* Write a row of data into the tabular output, where key of the map is the column name and the value | ||
* is the value to write for that column of the row of data. | ||
* Note: be sure you have first called {@code writeHeader} to output the header row. | ||
* | ||
* @param values map keyed by column name with values for the row of data | ||
*/ | ||
fun writeRecord(values: Map<String, Any?>?) | ||
|
||
/** | ||
* Add a row of data to the end of the tabular output. | ||
* | ||
* @param data the row of data to add | ||
*/ | ||
fun writeRecord(data: Iterable<Any?>?) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.