app.cash.sqldelight.dialects.postgresql.grammar.mixins.CopyMixin.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of postgresql-dialect Show documentation
Show all versions of postgresql-dialect Show documentation
The PostgreSQL Dialect for SQLDelight
package app.cash.sqldelight.dialects.postgresql.grammar.mixins
import app.cash.sqldelight.dialects.postgresql.grammar.psi.PostgreSqlCopyStdin
import com.alecstrong.sql.psi.core.psi.QueryElement.QueryResult
import com.alecstrong.sql.psi.core.psi.SqlCompositeElementImpl
import com.alecstrong.sql.psi.core.psi.SqlTableName
import com.intellij.lang.ASTNode
import com.intellij.psi.PsiElement
internal abstract class CopyMixin(node: ASTNode) : SqlCompositeElementImpl(node), PostgreSqlCopyStdin {
override fun queryAvailable(child: PsiElement): Collection {
val tableName = child.parent.children.filterIsInstance().single()
return tableAvailable(child, tableName.name)
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy