Skip to content

Rename sqlparser_derive to sqlparser_procmacro, document features #775

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ default = ["std"]
std = []
# Enable JSON output in the `cli` example:
json_example = ["serde_json", "serde"]
visitor = ["sqlparser_derive"]
visitor = ["sqlparser_procmacro"]

[dependencies]
bigdecimal = { version = "0.3", features = ["serde"], optional = true }
Expand All @@ -33,7 +33,7 @@ serde = { version = "1.0", features = ["derive"], optional = true }
# of dev-dependencies because of
# https://github.com/rust-lang/cargo/issues/1596
serde_json = { version = "1.0", optional = true }
sqlparser_derive = { version = "0.1", path = "derive", optional = true }
sqlparser_procmacro = { version = "0.1", path = "procmacro", optional = true }

[dev-dependencies]
simple_logger = "4.0"
Expand All @@ -45,3 +45,7 @@ pretty_assertions = "1"
# https://github.com/sunng87/cargo-release/blob/master/docs/reference.md#config-fields
# See docs/releasing.md for details.
publish = false

[package.metadata.docs.rs]
# Document these features on docs.rs
features = ["serde", "visitor"]
6 changes: 3 additions & 3 deletions derive/Cargo.toml → procmacro/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[package]
name = "sqlparser_derive"
description = "proc macro for sqlparser"
name = "sqlparser_procmacro"
description = "proc macros for sqlparser"
version = "0.1.0"
authors = ["Andy Grove <[email protected]>"]
authors = ["sqlparser authors"]
homepage = "https://github.com/sqlparser-rs/sqlparser-rs"
documentation = "https://docs.rs/sqlparser/"
keywords = ["ansi", "sql", "lexer", "parser"]
Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion src/ast/data_type.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ use core::fmt;
use serde::{Deserialize, Serialize};

#[cfg(feature = "visitor")]
use sqlparser_derive::Visit;
use sqlparser_procmacro::Visit;

use crate::ast::ObjectName;

Expand Down
2 changes: 1 addition & 1 deletion src/ast/ddl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ use core::fmt;
use serde::{Deserialize, Serialize};

#[cfg(feature = "visitor")]
use sqlparser_derive::Visit;
use sqlparser_procmacro::Visit;

use crate::ast::value::escape_single_quote_string;
use crate::ast::{display_comma_separated, display_separated, DataType, Expr, Ident, ObjectName};
Expand Down
2 changes: 1 addition & 1 deletion src/ast/helpers/stmt_create_table.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use alloc::{boxed::Box, format, string::String, vec, vec::Vec};
use serde::{Deserialize, Serialize};

#[cfg(feature = "visitor")]
use sqlparser_derive::Visit;
use sqlparser_procmacro::Visit;

use crate::ast::{
ColumnDef, FileFormat, HiveDistributionStyle, HiveFormat, ObjectName, OnCommit, Query,
Expand Down
2 changes: 1 addition & 1 deletion src/ast/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ use core::fmt;
use serde::{Deserialize, Serialize};

#[cfg(feature = "visitor")]
use sqlparser_derive::Visit;
use sqlparser_procmacro::Visit;

pub use self::data_type::{
CharLengthUnits, CharacterLength, DataType, ExactNumberInfo, TimezoneInfo,
Expand Down
2 changes: 1 addition & 1 deletion src/ast/operator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ use alloc::{string::String, vec::Vec};
use serde::{Deserialize, Serialize};

#[cfg(feature = "visitor")]
use sqlparser_derive::Visit;
use sqlparser_procmacro::Visit;

use super::display_separated;

Expand Down
2 changes: 1 addition & 1 deletion src/ast/query.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ use alloc::{boxed::Box, vec::Vec};
use serde::{Deserialize, Serialize};

#[cfg(feature = "visitor")]
use sqlparser_derive::Visit;
use sqlparser_procmacro::Visit;

use crate::ast::*;

Expand Down
2 changes: 1 addition & 1 deletion src/ast/value.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ use bigdecimal::BigDecimal;
use serde::{Deserialize, Serialize};

#[cfg(feature = "visitor")]
use sqlparser_derive::Visit;
use sqlparser_procmacro::Visit;

/// Primitive SQL values such as number and string
#[derive(Debug, Clone, PartialEq, PartialOrd, Eq, Ord, Hash)]
Expand Down
2 changes: 1 addition & 1 deletion src/keywords.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
use serde::{Deserialize, Serialize};

#[cfg(feature = "visitor")]
use sqlparser_derive::Visit;
use sqlparser_procmacro::Visit;

/// Defines a string constant for a single keyword: `kw_def!(SELECT);`
/// expands to `pub const SELECT = "SELECT";`
Expand Down
2 changes: 1 addition & 1 deletion src/tokenizer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ use core::str::Chars;
use serde::{Deserialize, Serialize};

#[cfg(feature = "visitor")]
use sqlparser_derive::Visit;
use sqlparser_procmacro::Visit;

use crate::dialect::SnowflakeDialect;
use crate::dialect::{Dialect, MySqlDialect};
Expand Down